diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 48beca2c2d18..6e735974a921 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -9,35 +9,51 @@ assignees: '' ### Bug Description - + + +### 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 - + 1. [First Step] 2. [Second Step] 3. [and so on...] -**Expected behavior:** [What you expect to happen] +**Expected behavior:** + + + +**Actual behavior:** -**Actual behavior:** [What actually happens] + #### 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. diff --git a/Marlin/Version.h b/Marlin/Version.h index f642fec7567a..60e068ba3521 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -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 diff --git a/Marlin/src/HAL/SAMD51/HAL.h b/Marlin/src/HAL/SAMD51/HAL.h index abc6c04a693b..7cb3635bd7c9 100644 --- a/Marlin/src/HAL/SAMD51/HAL.h +++ b/Marlin/src/HAL/SAMD51/HAL.h @@ -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 diff --git a/Marlin/src/HAL/STM32/fastio.h b/Marlin/src/HAL/STM32/fastio.h index f000d68cf0c3..ea28b8f3bfaa 100644 --- a/Marlin/src/HAL/STM32/fastio.h +++ b/Marlin/src/HAL/STM32/fastio.h @@ -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) diff --git a/Marlin/src/HAL/STM32/pinsDebug_STM32duino.h b/Marlin/src/HAL/STM32/pinsDebug_STM32duino.h index 09f2bb54e66a..71480153a717 100644 --- a/Marlin/src/HAL/STM32/pinsDebug_STM32duino.h +++ b/Marlin/src/HAL/STM32/pinsDebug_STM32duino.h @@ -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 @@ -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 @@ -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; @@ -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; diff --git a/Marlin/src/feature/bedlevel/abl/abl.cpp b/Marlin/src/feature/bedlevel/abl/abl.cpp index a585c1e1553d..39d8815fad98 100644 --- a/Marlin/src/feature/bedlevel/abl/abl.cpp +++ b/Marlin/src/feature/bedlevel/abl/abl.cpp @@ -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) }; diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index f2bd81e670dc..f2eb37b304e5 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -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 diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 56ce2ca5ed82..45921f7be3b0 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -63,12 +63,12 @@ #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) @@ -76,7 +76,7 @@ #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 @@ -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) @@ -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 @@ -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) @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -359,7 +359,7 @@ // Color UI #if ENABLED(TFT_COLOR_UI) #define HAS_GRAPHICAL_TFT 1 - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #endif /** @@ -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) @@ -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 @@ -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) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index efe04d64dd54..00ca940662e9 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -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 /** diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 2972920f34a7..939a0480b94c 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -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() { diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 5b3fab10b1e9..a39ce5267427 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1466,10 +1466,12 @@ 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; @@ -1477,7 +1479,7 @@ void set_axis_never_homed(const AxisEnum axis) { #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; @@ -1485,7 +1487,7 @@ void set_axis_never_homed(const AxisEnum axis) { #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; diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 8a5de4b6087b..6d451f8f0240 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -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; @@ -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) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 9ecbb7c766fd..cf35bbcd8f12 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1668,12 +1668,12 @@ void Temperature::updateTemperaturesFromRawValues() { #endif #define INIT_FAN_PIN(P) do{ _INIT_FAN_PIN(P); SET_FAST_PWM_FREQ(P); }while(0) #if EXTRUDER_AUTO_FAN_SPEED != 255 - #define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(FAST_PWM_FAN_FREQUENCY); } else SET_OUTPUT(P); }while(0) + #define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) #else #define INIT_E_AUTO_FAN_PIN(P) SET_OUTPUT(P) #endif #if CHAMBER_AUTO_FAN_SPEED != 255 - #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(FAST_PWM_FAN_FREQUENCY); } else SET_OUTPUT(P); }while(0) + #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) #else #define INIT_CHAMBER_AUTO_FAN_PIN(P) SET_OUTPUT(P) #endif @@ -1702,10 +1702,10 @@ void Temperature::init() { #endif // Thermistor activation by MCU pin - #if PIN_EXISTS(TEMP_0_TR_ENABLE_PIN) + #if PIN_EXISTS(TEMP_0_TR_ENABLE) OUT_WRITE(TEMP_0_TR_ENABLE_PIN, ENABLED(HEATER_0_USES_MAX6675)); #endif - #if PIN_EXISTS(TEMP_1_TR_ENABLE_PIN) + #if PIN_EXISTS(TEMP_1_TR_ENABLE) OUT_WRITE(TEMP_1_TR_ENABLE_PIN, ENABLED(HEATER_1_USES_MAX6675)); #endif diff --git a/config/README.md b/config/README.md index 3d73a9bbbc71..68cbe1a78607 100644 --- a/config/README.md +++ b/config/README.md @@ -1,3 +1,3 @@ # Where have all the configurations gone? -## https://github.com/MarlinFirmware/Configurations/archive/release-2.0.7.1.zip +## https://github.com/MarlinFirmware/Configurations/archive/release-2.0.7.2.zip