Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update branch #7

36 changes: 26 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,51 @@ assignees: ''

<!--
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
Please follow the instructions below. Failure to do so may result in your issue being closed.
Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use one of the support links at https://github.com/MarlinFirmware/Marlin/issues/new/choose
### Before Reporting a Bug
Before filing an issue be sure to test the "bugfix" branches to see whether the issue has been resolved.
1. Test with the `bugfix-2.0.x` branch to see whether the issue still exists.
2. Get troubleshooting help from the Marlin community to confirm it's a bug and not just a configuration error. Links at https://github.com/MarlinFirmware/Marlin/issues/new/choose
### Instructions
1. Fill out every section of the template below.
2. Always attach configuration files, regardless of whether you think they are involved.
3. Read and understand Marlin's Code of Conduct. By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
-->

### Bug Description

<!-- Description of the bug -->
<!-- Describe the bug in this section. (You can remove this invisible comment.) -->

### Configuration Files

### My Configurations
**Required:** Include a ZIP file containing `Configuration.h` and `Configuration_adv.h`.

**Required:** Please include a ZIP file containing your `Configuration.h` and `Configuration_adv.h` files.
If you've made any other modifications describe them in detail here.

### Steps to Reproduce

<!-- Please describe the steps needed to reproduce the issue -->
<!-- Describe the steps needed to reproduce the issue. (You can remove this invisible comment.) -->

1. [First Step]
2. [Second Step]
3. [and so on...]

**Expected behavior:** [What you expect to happen]
**Expected behavior:**

<!-- Describe what you expected to happen here. (You can remove this invisible comment.) -->

**Actual behavior:**

**Actual behavior:** [What actually happens]
<!-- Describe what actually happens here. (You can remove this invisible comment.) -->

#### Additional Information

* Provide pictures or links to videos that clearly demonstrate the issue.
* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.
* See [Contributing to Marlin](https://github.com/MarlinFirmware/Marlin/blob/2.0.x/.github/contributing.md) for additional guidelines.
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* Marlin release version identifier
*/
//#define SHORT_BUILD_VERSION "2.0.7.1"
//#define SHORT_BUILD_VERSION "2.0.7.2"

/**
* Verbose version identifier which should contain a reference to the location
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/HAL/SAMD51/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@

// MYSERIAL0 required before MarlinSerial includes!

#define _MSERIAL(X) Serial##X
#define __MSERIAL(X) Serial##X
#define _MSERIAL(X) __MSERIAL(X)
#define MSERIAL(X) _MSERIAL(INCREMENT(X))

#if SERIAL_PORT == -1
Expand Down
10 changes: 5 additions & 5 deletions Marlin/src/HAL/STM32/fastio.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ void FastIO_init(); // Must be called before using fast io macros

#if defined(STM32F0xx) || defined(STM32F1xx) || defined(STM32F3xx) || defined(STM32L0xx) || defined(STM32L4xx)
#define _WRITE(IO, V) do { \
if (V) FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO])) ; \
else FastIOPortMap[STM_PORT(digitalPin[IO])]->BRR = _BV32(STM_PIN(digitalPin[IO])) ; \
if (V) FastIOPortMap[STM_PORT(digitalPinToPinName(IO))]->BSRR = _BV32(STM_PIN(digitalPinToPinName(IO))) ; \
else FastIOPortMap[STM_PORT(digitalPinToPinName(IO))]->BRR = _BV32(STM_PIN(digitalPinToPinName(IO))) ; \
}while(0)
#else
#define _WRITE(IO, V) (FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO]) + ((V) ? 0 : 16)))
#define _WRITE(IO, V) (FastIOPortMap[STM_PORT(digitalPinToPinName(IO))]->BSRR = _BV32(STM_PIN(digitalPinToPinName(IO)) + ((V) ? 0 : 16)))
#endif

#define _READ(IO) bool(READ_BIT(FastIOPortMap[STM_PORT(digitalPin[IO])]->IDR, _BV32(STM_PIN(digitalPin[IO]))))
#define _TOGGLE(IO) (FastIOPortMap[STM_PORT(digitalPin[IO])]->ODR ^= _BV32(STM_PIN(digitalPin[IO])))
#define _READ(IO) bool(READ_BIT(FastIOPortMap[STM_PORT(digitalPinToPinName(IO))]->IDR, _BV32(STM_PIN(digitalPinToPinName(IO)))))
#define _TOGGLE(IO) (FastIOPortMap[STM_PORT(digitalPinToPinName(IO))]->ODR ^= _BV32(STM_PIN(digitalPinToPinName(IO))))

#define _GET_MODE(IO)
#define _SET_MODE(IO,M) pinMode(IO, M)
Expand Down
10 changes: 4 additions & 6 deletions Marlin/src/HAL/STM32/pinsDebug_STM32duino.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
* It contains:
* - name of the signal
* - the Ard_num assigned by the pins_YOUR_BOARD.h file using the platform defines.
* EXAMPLE: "#define KILL_PIN PB1" results in Ard_num of 57. 57 is then used as an
* index into digitalPin[] to get the Port_pin number
* EXAMPLE: "#define KILL_PIN PB1" results in Ard_num of 57. 57 is then used as the
* argument to digitalPinToPinName(IO) to get the Port_pin number
* - if it is a digital or analog signal. PWMs are considered digital here.
*
* pin_xref is a structure generated by this header file. It is generated by the
Expand All @@ -68,8 +68,6 @@
* signal. The Arduino pin number is listed by the M43 I command.
*/

extern const PinName digitalPin[]; // provided by the platform

////////////////////////////////////////////////////////
//
// make a list of the Arduino pin numbers in the Port/Pin order
Expand Down Expand Up @@ -137,7 +135,7 @@ const XrefInfo pin_xref[] PROGMEM = {

uint8_t get_pin_mode(const pin_t Ard_num) {
uint32_t mode_all = 0;
const PinName dp = digitalPin[Ard_num];
const PinName dp = digitalPinToPinName(Ard_num);
switch (PORT_ALPHA(dp)) {
case 'A' : mode_all = GPIOA->MODER; break;
case 'B' : mode_all = GPIOB->MODER; break;
Expand Down Expand Up @@ -218,7 +216,7 @@ bool pwm_status(const pin_t Ard_num) {
void pwm_details(const pin_t Ard_num) {
if (pwm_status(Ard_num)) {
uint32_t alt_all = 0;
const PinName dp = digitalPin[Ard_num];
const PinName dp = digitalPinToPinName(Ard_num);
pin_t pin_number = uint8_t(PIN_NUM(dp));
const bool over_7 = pin_number >= 8;
const uint8_t ind = over_7 ? 1 : 0;
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/bedlevel/abl/abl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ float bilinear_z_offset(const xy_pos_t &raw) {
* Prepare a bilinear-leveled linear move on Cartesian,
* splitting the move where it crosses grid borders.
*/
void bilinear_line_to_destination(const feedRate_t scaled_fr_mm_s, uint16_t x_splits, uint16_t y_splits) {
void bilinear_line_to_destination(const feedRate_t &scaled_fr_mm_s, uint16_t x_splits, uint16_t y_splits) {
// Get current and destination cells for this line
xy_int_t c1 { CELL_INDEX(x, current_position.x), CELL_INDEX(y, current_position.y) },
c2 { CELL_INDEX(x, destination.x), CELL_INDEX(y, destination.y) };
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/gcode/gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
#if ENABLED(PASSWORD_FEATURE)
if (password.is_locked && !(parser.command_letter == 'M' && parser.codenum == 511)) {
SERIAL_ECHO_MSG(STR_PRINTER_LOCKED);
if (!no_ok) queue.ok_to_send();
return;
}
#endif
Expand Down
42 changes: 21 additions & 21 deletions Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@
#elif ENABLED(CARTESIO_UI)

#define DOGLCD
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1

#elif EITHER(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE)

#define IS_DWIN_MARLINUI 1
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1

#elif ENABLED(ZONESTAR_LCD)

#define ADC_KEYPAD
#define IS_RRW_KEYPAD
#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
#define ADC_KEY_NUM 8
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1

// This helps to implement ADC_KEYPAD menus
#define REVERSE_MENU_DIRECTION
Expand All @@ -98,7 +98,7 @@
#define IS_U8GLIB_SSD1306

#elif ENABLED(RADDS_DISPLAY)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define ENCODER_PULSES_PER_STEP 2

#elif EITHER(ANET_FULL_GRAPHICS_LCD, BQ_LCD_SMART_CONTROLLER)
Expand All @@ -108,7 +108,7 @@
#elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)

#define DOGLCD
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1

#if ENABLED(miniVIKI)
#define U8GLIB_ST7565_64128N
Expand All @@ -123,19 +123,19 @@
#elif ENABLED(OLED_PANEL_TINYBOY2)

#define IS_U8GLIB_SSD1306
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1

#elif ENABLED(RA_CONTROL_PANEL)

#define LCD_I2C_TYPE_PCA8574
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1

#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)

#define DOGLCD
#define U8GLIB_ST7920
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1

#elif ENABLED(CR10_STOCKDISPLAY)

Expand Down Expand Up @@ -179,7 +179,7 @@

#define FYSETC_MINI_12864
#define DOGLCD
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define LED_COLORS_REDUCE_GREEN
#if ENABLED(PSU_CONTROL) && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
#define LED_BACKLIGHT_TIMEOUT 10000
Expand All @@ -205,7 +205,7 @@

#elif ENABLED(ULTI_CONTROLLER)

#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define U8GLIB_SSD1309
#define LCD_RESET_PIN LCD_PINS_D6 // This controller need a reset pin
#define ENCODER_PULSES_PER_STEP 2
Expand All @@ -220,7 +220,7 @@
#elif EITHER(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C)

#define IS_TFTGLCD_PANEL 1
#define IS_ULTIPANEL // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD
#define IS_ULTIPANEL 1 // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD

#if ENABLED(SDSUPPORT) && DISABLED(LCD_PROGRESS_BAR)
#define LCD_PROGRESS_BAR
Expand All @@ -246,7 +246,7 @@
#endif

#if EITHER(MAKRPANEL, MINIPANEL)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define DOGLCD
#if ENABLED(MAKRPANEL)
#define U8GLIB_ST7565_64128N
Expand All @@ -258,7 +258,7 @@
#endif

#if ENABLED(OVERLORD_OLED)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define U8GLIB_SH1106
/**
* PCA9632 for buzzer and LEDs via i2c
Expand Down Expand Up @@ -302,13 +302,13 @@

// Basic Ultipanel-like displays
#if ANY(ULTIMAKERCONTROLLER, REPRAP_DISCOUNT_SMART_CONTROLLER, G3D_PANEL, RIGIDBOT_PANEL, PANEL_ONE, U8GLIB_SH1106)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#endif

// Einstart OLED has Cardinal nav via pins defined in pins_EINSTART-S.h
#if ENABLED(U8GLIB_SH1106_EINSTART)
#define DOGLCD
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#endif

// Compatibility
Expand Down Expand Up @@ -350,7 +350,7 @@

#if TFT_SCALED_DOGLCD
#define DOGLCD
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define DELAYED_BACKLIGHT_INIT
#elif ENABLED(TFT_LVGL_UI)
#define DELAYED_BACKLIGHT_INIT
Expand All @@ -359,7 +359,7 @@
// Color UI
#if ENABLED(TFT_COLOR_UI)
#define HAS_GRAPHICAL_TFT 1
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#endif

/**
Expand All @@ -383,7 +383,7 @@
#define LCD_I2C_TYPE_MCP23017
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (optional)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1

#elif ENABLED(LCD_I2C_VIKI)

Expand All @@ -398,7 +398,7 @@
#define LCD_I2C_TYPE_MCP23017
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1

#define ENCODER_FEEDRATE_DEADZONE 4

Expand Down Expand Up @@ -443,10 +443,10 @@
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
#if ENABLED(FF_INTERFACEBOARD)
#define SR_LCD_3W_NL // Non latching 3 wire shift register
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#elif ENABLED(SAV_3DLCD)
#define SR_LCD_2W_NL // Non latching 2 wire shift register
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#endif

#if ENABLED(IS_ULTIPANEL)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Release version. Leave the Marlin version or apply a custom scheme.
*/
#ifndef SHORT_BUILD_VERSION
#define SHORT_BUILD_VERSION "2.0.7.1"
#define SHORT_BUILD_VERSION "2.0.7.2"
#endif

/**
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/menu/menu_motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
#if E_MANUAL

inline void _goto_menu_move_distance_e() {
ui.goto_screen([]{ _menu_move_distance(E_AXIS, []{ lcd_move_e(); }, -1); });
ui.goto_screen([]{ _menu_move_distance(E_AXIS, []{ lcd_move_e(TERN_(MULTI_MANUAL, active_extruder)); }, -1); });
}

inline void _menu_move_distance_e_maybe() {
Expand Down
8 changes: 5 additions & 3 deletions Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1466,26 +1466,28 @@ void set_axis_never_homed(const AxisEnum axis) {
effectorBackoutDir, // Direction in which the effector mm coordinates move away from endstop.
stepperBackoutDir; // Direction in which the TMC µstep count(phase) move away from endstop.

#define PHASE_PER_MICROSTEP(N) (256 / _MAX(1, N##_MICROSTEPS))

switch (axis) {
#ifdef X_MICROSTEPS
case X_AXIS:
phasePerUStep = 256 / (X_MICROSTEPS);
phasePerUStep = PHASE_PER_MICROSTEP(X);
phaseCurrent = stepperX.get_microstep_counter();
effectorBackoutDir = -X_HOME_DIR;
stepperBackoutDir = INVERT_X_DIR ? effectorBackoutDir : -effectorBackoutDir;
break;
#endif
#ifdef Y_MICROSTEPS
case Y_AXIS:
phasePerUStep = 256 / (Y_MICROSTEPS);
phasePerUStep = PHASE_PER_MICROSTEP(Y);
phaseCurrent = stepperY.get_microstep_counter();
effectorBackoutDir = -Y_HOME_DIR;
stepperBackoutDir = INVERT_Y_DIR ? effectorBackoutDir : -effectorBackoutDir;
break;
#endif
#ifdef Z_MICROSTEPS
case Z_AXIS:
phasePerUStep = 256 / (Z_MICROSTEPS);
phasePerUStep = PHASE_PER_MICROSTEP(Z);
phaseCurrent = stepperZ.get_microstep_counter();
effectorBackoutDir = -Z_HOME_DIR;
stepperBackoutDir = INVERT_Z_DIR ? effectorBackoutDir : -effectorBackoutDir;
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/module/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2261,7 +2261,6 @@ uint32_t Stepper::block_phase_isr() {
interval = LA_isr_rate;
}
else if (step_events_completed < decelerate_after && LA_current_adv_steps < LA_max_adv_steps) {
//step_events_completed <= (uint32_t)accelerate_until) {
LA_steps++;
LA_current_adv_steps++;
interval = LA_isr_rate;
Expand All @@ -2272,6 +2271,8 @@ uint32_t Stepper::block_phase_isr() {
else
interval = LA_ADV_NEVER;

if (!LA_steps) return interval; // Leave pins alone if there are no steps!

DIR_WAIT_BEFORE();

#if ENABLED(MIXING_EXTRUDER)
Expand Down
Loading