From fae96a6a13c669681e233a7a0c2e1ca7e02498bb Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Fri, 3 Aug 2018 16:16:14 -0600 Subject: [PATCH 1/6] Fix jumping progress bar. (#11438) - When `LCD_SET_PROGRESS_MANUALLY` was disabled and an SD print was not active (i.e. the printer was idle), progress_bar_percent would read uninitialized memory from stack and cause progress bar to jump wildly. - Also updated conditions in `#ifdef` to match `ultralcd.cpp` --- Marlin/status_screen_lite_ST7920.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/status_screen_lite_ST7920.h b/Marlin/status_screen_lite_ST7920.h index 17cb44a66..e3a9822f2 100644 --- a/Marlin/status_screen_lite_ST7920.h +++ b/Marlin/status_screen_lite_ST7920.h @@ -877,11 +877,11 @@ void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) { void ST7920_Lite_Status_Screen::update_progress(const bool forceUpdate) { #if DISABLED(LCD_SET_PROGRESS_MANUALLY) - uint8_t progress_bar_percent; + uint8_t progress_bar_percent = 0; #endif // Set current percentage from SD when actively printing - #if ENABLED(SDSUPPORT) + #if ENABLED(LCD_SET_PROGRESS_MANUALLY) && ENABLED(SDSUPPORT) && (ENABLED(LCD_PROGRESS_BAR) || ENABLED(DOGLCD)) if (IS_SD_PRINTING) progress_bar_percent = card.percentDone(); #endif From 4c4fffc503af40366fbcf1124e57a9396e288f91 Mon Sep 17 00:00:00 2001 From: silentninja1 Date: Fri, 3 Aug 2018 21:47:19 -0400 Subject: [PATCH 2/6] [1.1.x] Fix Dual X Carriage tool change crash (#11425) --- Marlin/Conditionals_post.h | 12 ++++++++++ Marlin/Configuration_adv.h | 2 ++ Marlin/Marlin_main.cpp | 22 +++++++++++++++---- .../AlephObjects/TAZ4/Configuration_adv.h | 2 ++ .../Anet/A6/Configuration_adv.h | 2 ++ .../Anet/A8/Configuration_adv.h | 2 ++ .../BIBO/TouchX/Cyclops/Configuration_adv.h | 2 ++ .../BIBO/TouchX/default/Configuration_adv.h | 2 ++ .../BQ/Hephestos/Configuration_adv.h | 2 ++ .../BQ/Hephestos_2/Configuration_adv.h | 2 ++ .../BQ/WITBOX/Configuration_adv.h | 2 ++ .../Cartesio/Configuration_adv.h | 2 ++ .../Creality/CR-10/Configuration_adv.h | 2 ++ .../Creality/CR-10S/Configuration_adv.h | 2 ++ .../Creality/CR-10mini/Configuration_adv.h | 2 ++ .../Creality/CR-8/Configuration_adv.h | 2 ++ .../Creality/Ender-2/Configuration_adv.h | 2 ++ .../Creality/Ender-3/Configuration_adv.h | 2 ++ .../Creality/Ender-4/Configuration_adv.h | 2 ++ .../Felix/Configuration_adv.h | 2 ++ .../FolgerTech/i3-2020/Configuration_adv.h | 2 ++ .../Prusa i3 Pro C/Configuration_adv.h | 2 ++ .../Prusa i3 Pro W/Configuration_adv.h | 2 ++ .../Infitary/i3-M508/Configuration_adv.h | 2 ++ .../JGAurora/A5/Configuration_adv.h | 2 ++ .../Malyan/M150/Configuration_adv.h | 2 ++ .../Micromake/C1/enhanced/Configuration_adv.h | 2 ++ .../RigidBot/Configuration_adv.h | 2 ++ .../SCARA/Configuration_adv.h | 2 ++ .../Sanguinololu/Configuration_adv.h | 2 ++ .../TinyBoy2/Configuration_adv.h | 2 ++ .../Tronxy/X3A/Configuration_adv.h | 2 ++ .../Velleman/K8200/Configuration_adv.h | 2 ++ .../Velleman/K8400/Configuration_adv.h | 2 ++ .../Wanhao/Duplicator 6/Configuration_adv.h | 2 ++ .../FLSUN/auto_calibrate/Configuration_adv.h | 2 ++ .../delta/FLSUN/kossel/Configuration_adv.h | 2 ++ .../FLSUN/kossel_mini/Configuration_adv.h | 2 ++ .../delta/generic/Configuration_adv.h | 2 ++ .../delta/kossel_mini/Configuration_adv.h | 2 ++ .../delta/kossel_pro/Configuration_adv.h | 2 ++ .../delta/kossel_xl/Configuration_adv.h | 2 ++ .../gCreate/gMax1.5+/Configuration_adv.h | 2 ++ .../makibox/Configuration_adv.h | 2 ++ .../tvrrug/Round2/Configuration_adv.h | 2 ++ .../wt150/Configuration_adv.h | 2 ++ 46 files changed, 118 insertions(+), 4 deletions(-) diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index 26b243717..b66c148bb 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -68,6 +68,18 @@ #define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2) #define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2) +/** + * Dual X Carriage + */ +#if ENABLED(DUAL_X_CARRIAGE) + #ifndef X1_MIN_POS + #define X1_MIN_POS X_MIN_POS + #endif + #ifndef X1_MAX_POS + #define X1_MAX_POS X_BED_SIZE + #endif +#endif + /** * CoreXY, CoreXZ, and CoreYZ - and their reverse */ diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index de649c2a3..dd71d23d8 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 613743e74..219a0209c 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1329,7 +1329,7 @@ bool get_target_extruder_from_command(const uint16_t code) { if (axis == X_AXIS) { // In Dual X mode hotend_offset[X] is T1's home position - float dual_max_x = MAX(hotend_offset[X_AXIS][1], X2_MAX_POS); + const float dual_max_x = MAX(hotend_offset[X_AXIS][1], X2_MAX_POS); if (active_extruder != 0) { // T1 can move from X2_MIN_POS to X2_MAX_POS or X2 home position (whichever is larger) @@ -12017,9 +12017,6 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n #endif } - // Save current position to destination, for use later - set_destination_from_current(); - #if HAS_LEVELING // Set current position to the physical position const bool leveling_was_active = planner.leveling_active; @@ -12028,10 +12025,23 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n #if ENABLED(DUAL_X_CARRIAGE) + #if HAS_SOFTWARE_ENDSTOPS + // Update the X software endstops early + active_extruder = tmp_extruder; + update_software_endstops(X_AXIS); + active_extruder = !tmp_extruder; + #endif + + // Don't move the new extruder out of bounds + if (!WITHIN(current_position[X_AXIS], soft_endstop_min[X_AXIS], soft_endstop_max[X_AXIS])) + no_move = true; + + if (!no_move) set_destination_from_current(); dualx_tool_change(tmp_extruder, no_move); // Can modify no_move #else // !DUAL_X_CARRIAGE + set_destination_from_current(); #if ENABLED(PARKING_EXTRUDER) // Dual Parking extruder parking_extruder_tool_change(tmp_extruder, no_move); #endif @@ -12117,6 +12127,10 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n feedrate_mm_s = old_feedrate_mm_s; + #if HAS_SOFTWARE_ENDSTOPS && ENABLED(DUAL_X_CARRIAGE) + update_software_endstops(X_AXIS); + #endif + #else // HOTENDS <= 1 UNUSED(fr_mm_s); diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h index 855cddf12..441218331 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Anet/A6/Configuration_adv.h b/Marlin/example_configurations/Anet/A6/Configuration_adv.h index 01898336c..b6a17ee70 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A6/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Anet/A8/Configuration_adv.h b/Marlin/example_configurations/Anet/A8/Configuration_adv.h index 68b678b4d..509affa7e 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A8/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h index d73082017..b54fce02d 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h index 56d738ab1..15b99f196 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h index bac8bd411..389c86ebc 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h index b86ac82e8..a13866237 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h index bac8bd411..389c86ebc 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index f5bb3ac69..bd66b46ef 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h index 28ec3a647..b2ed0164a 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h index 81624d759..3da707157 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h index 012d962e1..4a7c8593f 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h index 907d2c64a..8ba6e1132 100644 --- a/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h index 87d6f5077..f46616ec1 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h index e510fb5a1..d8f3bf2f3 100644 --- a/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h index 907d2c64a..8ba6e1132 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index d9df62df8..a3980b449 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h index 288414377..9cb8a419d 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h index d3988eed0..471c423a2 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h index d3988eed0..471c423a2 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h index 8380309a1..d8219ed29 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h index 51708c822..0a1fe1fd4 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h index 2eb9cce38..de158745b 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h index e5d18201e..a9bd630f0 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index db7a0e604..177fd85cc 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 342182a8c..1b7b16edd 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h index 12f0769fe..0724fdb40 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index dbe361bbe..9716dc5d1 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Tronxy/X3A/Configuration_adv.h b/Marlin/example_configurations/Tronxy/X3A/Configuration_adv.h index 1405715e7..01d17fdd9 100644 --- a/Marlin/example_configurations/Tronxy/X3A/Configuration_adv.h +++ b/Marlin/example_configurations/Tronxy/X3A/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h index c4b067f10..eebd76732 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h @@ -343,6 +343,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h index a18a64400..7b68e7916 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h index 1ddec9f73..2580cb1fc 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index cab535cbe..74f665c16 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h index e55a98446..b5b179204 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index 017d8bea6..dea37279f 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 017d8bea6..dea37279f 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 017d8bea6..dea37279f 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 9c38fb0c4..1dc3fd137 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -345,6 +345,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 29e706171..c49d3cefc 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h index 207f1dbdb..2ca1d7b6c 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 64f47ec4a..a637f0306 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 302c54256..3b3131f25 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index ccf1c96b1..5c03889f2 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -340,6 +340,8 @@ // Configuration for second X-carriage // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop; // the second x-carriage always homes to the maximum endstop. + #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage + #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position From 86d9af1108f9747eeca6462926e69a0a4a741ec6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 3 Aug 2018 21:48:57 -0500 Subject: [PATCH 3/6] Fix drivers.h dependency, defer macro evaluation (#11449) --- Marlin/MarlinConfig.h | 2 +- Marlin/drivers.h | 49 +++++++------------------------------------ 2 files changed, 9 insertions(+), 42 deletions(-) diff --git a/Marlin/MarlinConfig.h b/Marlin/MarlinConfig.h index 5b049a387..e1988fe63 100644 --- a/Marlin/MarlinConfig.h +++ b/Marlin/MarlinConfig.h @@ -25,10 +25,10 @@ #include "boards.h" #include "macros.h" -#include "drivers.h" #include "Version.h" #include "Configuration.h" #include "Conditionals_LCD.h" +#include "drivers.h" #include "Configuration_adv.h" #if USE_MARLINSERIAL diff --git a/Marlin/drivers.h b/Marlin/drivers.h index 0aa424c67..0d92f55dc 100644 --- a/Marlin/drivers.h +++ b/Marlin/drivers.h @@ -45,47 +45,14 @@ #define AXIS_DRIVER_TYPE_X(T) AXIS_DRIVER_TYPE(X,T) #define AXIS_DRIVER_TYPE_Y(T) AXIS_DRIVER_TYPE(Y,T) #define AXIS_DRIVER_TYPE_Z(T) AXIS_DRIVER_TYPE(Z,T) - -#if ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE) - #define AXIS_DRIVER_TYPE_X2(T) AXIS_DRIVER_TYPE(X2,T) -#else - #define AXIS_DRIVER_TYPE_X2(T) false -#endif -#if ENABLED(Y_DUAL_STEPPER_DRIVERS) - #define AXIS_DRIVER_TYPE_Y2(T) AXIS_DRIVER_TYPE(Y2,T) -#else - #define AXIS_DRIVER_TYPE_Y2(T) false -#endif -#if ENABLED(Z_DUAL_STEPPER_DRIVERS) - #define AXIS_DRIVER_TYPE_Z2(T) AXIS_DRIVER_TYPE(Z2,T) -#else - #define AXIS_DRIVER_TYPE_Z2(T) false -#endif -#if E_STEPPERS > 0 - #define AXIS_DRIVER_TYPE_E0(T) AXIS_DRIVER_TYPE(E0,T) -#else - #define AXIS_DRIVER_TYPE_E0(T) false -#endif -#if E_STEPPERS > 1 - #define AXIS_DRIVER_TYPE_E1(T) AXIS_DRIVER_TYPE(E1,T) -#else - #define AXIS_DRIVER_TYPE_E1(T) false -#endif -#if E_STEPPERS > 2 - #define AXIS_DRIVER_TYPE_E2(T) AXIS_DRIVER_TYPE(E2,T) -#else - #define AXIS_DRIVER_TYPE_E2(T) false -#endif -#if E_STEPPERS > 3 - #define AXIS_DRIVER_TYPE_E3(T) AXIS_DRIVER_TYPE(E3,T) -#else - #define AXIS_DRIVER_TYPE_E3(T) false -#endif -#if E_STEPPERS > 4 - #define AXIS_DRIVER_TYPE_E4(T) AXIS_DRIVER_TYPE(E4,T) -#else - #define AXIS_DRIVER_TYPE_E4(T) false -#endif +#define AXIS_DRIVER_TYPE_X2(T) (ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE)) && AXIS_DRIVER_TYPE(X2,T) +#define AXIS_DRIVER_TYPE_Y2(T) (ENABLED(Y_DUAL_STEPPER_DRIVERS) && AXIS_DRIVER_TYPE(Y2,T)) +#define AXIS_DRIVER_TYPE_Z2(T) (ENABLED(Z_DUAL_STEPPER_DRIVERS) && AXIS_DRIVER_TYPE(Z2,T)) +#define AXIS_DRIVER_TYPE_E0(T) (E_STEPPERS > 0 && AXIS_DRIVER_TYPE(E0,T)) +#define AXIS_DRIVER_TYPE_E1(T) (E_STEPPERS > 1 && AXIS_DRIVER_TYPE(E1,T)) +#define AXIS_DRIVER_TYPE_E2(T) (E_STEPPERS > 2 && AXIS_DRIVER_TYPE(E2,T)) +#define AXIS_DRIVER_TYPE_E3(T) (E_STEPPERS > 3 && AXIS_DRIVER_TYPE(E3,T)) +#define AXIS_DRIVER_TYPE_E4(T) (E_STEPPERS > 4 && AXIS_DRIVER_TYPE(E4,T)) #define HAS_DRIVER(T) (AXIS_DRIVER_TYPE_X(T) || AXIS_DRIVER_TYPE_X2(T) || \ AXIS_DRIVER_TYPE_Y(T) || AXIS_DRIVER_TYPE_Y2(T) || \ From b8d4c4216f11b3cfa0269f5f1a9b4f74499ae9e5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 Aug 2018 23:11:28 -0500 Subject: [PATCH 4/6] Easier to disable homing validation (#11457) --- Marlin/endstops.cpp | 12 +++++++----- Marlin/endstops.h | 10 ++++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Marlin/endstops.cpp b/Marlin/endstops.cpp index f345e8f45..29417057c 100644 --- a/Marlin/endstops.cpp +++ b/Marlin/endstops.cpp @@ -229,11 +229,13 @@ void Endstops::not_homing() { #endif } -// If the last move failed to trigger an endstop, call kill -void Endstops::validate_homing_move() { - if (trigger_state()) hit_on_purpose(); - else kill(PSTR(MSG_ERR_HOMING_FAILED)); -} +#if ENABLED(VALIDATE_HOMING_ENDSTOPS) + // If the last move failed to trigger an endstop, call kill + void Endstops::validate_homing_move() { + if (trigger_state()) hit_on_purpose(); + else kill(PSTR(MSG_ERR_HOMING_FAILED)); + } +#endif // Enable / disable endstop z-probe checking #if HAS_BED_PROBE diff --git a/Marlin/endstops.h b/Marlin/endstops.h index 97dd62443..2114e23e3 100644 --- a/Marlin/endstops.h +++ b/Marlin/endstops.h @@ -29,6 +29,8 @@ #include "MarlinConfig.h" +#define VALIDATE_HOMING_ENDSTOPS + enum EndstopEnum : char { X_MIN, Y_MIN, @@ -143,8 +145,12 @@ class Endstops { // Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable static void not_homing(); - // If the last move failed to trigger an endstop, call kill - static void validate_homing_move(); + #if ENABLED(VALIDATE_HOMING_ENDSTOPS) + // If the last move failed to trigger an endstop, call kill + static void validate_homing_move(); + #else + FORCE_INLINE static void validate_homing_move() { hit_on_purpose(); } + #endif // Clear endstops (i.e., they were hit intentionally) to suppress the report FORCE_INLINE static void hit_on_purpose() { hit_state = 0; } From 33364c17b9d3799d37577d91bb1a0a3b05cae566 Mon Sep 17 00:00:00 2001 From: Giuliano <3684609+GMagician@users.noreply.github.com> Date: Tue, 7 Aug 2018 06:14:11 +0200 Subject: [PATCH 5/6] [1.1.x] Better timing handling (#11462) --- Marlin/stepper.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 8c965c45d..825c02d07 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -2171,7 +2171,7 @@ void Stepper::report_positions() { const uint8_t old_dir = _READ_DIR(AXIS); \ _ENABLE(AXIS); \ _APPLY_DIR(AXIS, _INVERT_DIR(AXIS)^DIR^INVERT); \ - DELAY_NS(400); /* DRV8825 */ \ + DELAY_NS(MINIMUM_STEPPER_DIR_DELAY); \ _SAVE_START; \ _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS), true); \ _PULSE_WAIT; \ @@ -2243,7 +2243,9 @@ void Stepper::report_positions() { Y_DIR_WRITE(INVERT_Y_DIR ^ z_direction); Z_DIR_WRITE(INVERT_Z_DIR ^ z_direction); - DELAY_NS(400); // DRV8825 + #if MINIMUM_STEPPER_DIR_DELAY > 0 + DELAY_NS(MINIMUM_STEPPER_DIR_DELAY); + #endif _SAVE_START; From 614a9445043c78007abda2a10eb7b0d0880f583c Mon Sep 17 00:00:00 2001 From: lsellens Date: Mon, 6 Aug 2018 23:18:13 -0500 Subject: [PATCH 6/6] auto power control without heated bed (#11467) `AUTO_POWER_CONTROL` will not work if printer has no heated bed due to `degTargetBed()` not being defined --- .github/contributing.md | 2 +- .github/issue_template.md | 4 +- Marlin/Version.h | 4 +- Marlin/power.cpp | 4 +- README.md | 87 +++++++++++++++++++-------------------- 5 files changed, 51 insertions(+), 50 deletions(-) diff --git a/.github/contributing.md b/.github/contributing.md index 808c87bb0..544c7abc7 100644 --- a/.github/contributing.md +++ b/.github/contributing.md @@ -132,7 +132,7 @@ Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x * Use the present tense ("Add feature" not "Added feature"). * Use the imperative mood ("Move cursor to..." not "Moves cursor to..."). -* Limit the first line to 72 characters or fewer. +* Limit the first line to 72 characters or less. * Reference issues and Pull Requests liberally after the first line. ### C++ Coding Standards diff --git a/.github/issue_template.md b/.github/issue_template.md index 58b4894f6..df010f8cd 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -1,6 +1,6 @@