From e472a7569b0136918391f42138405b59da82e088 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 2 Oct 2017 23:32:05 -0500 Subject: [PATCH 1/4] Remove extra auto_current_control call --- Marlin/src/feature/tmc2130.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Marlin/src/feature/tmc2130.cpp b/Marlin/src/feature/tmc2130.cpp index a2623a45ca..60a0ba1f68 100644 --- a/Marlin/src/feature/tmc2130.cpp +++ b/Marlin/src/feature/tmc2130.cpp @@ -125,9 +125,6 @@ void tmc2130_checkOverTemp(void) { #if ENABLED(E4_IS_TMC2130) automatic_current_control(stepperE4, "E4"); #endif - #if ENABLED(E4_IS_TMC2130) - automatic_current_control(stepperE4); - #endif } } From 6ea2cc029348444168fd05e225e9c3ab3b5fefec Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 2 Oct 2017 23:32:28 -0500 Subject: [PATCH 2/4] Make prepare_move_to_destination_dualx a proper move function --- Marlin/src/module/motion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index bb8ca3106a..87cf0b9bf0 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -769,7 +769,7 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS }, break; } } - return false; + return prepare_move_to_destination_cartesian(); } #endif // DUAL_X_CARRIAGE @@ -811,7 +811,7 @@ void prepare_move_to_destination() { #elif IS_KINEMATIC prepare_kinematic_move_to(destination) #elif ENABLED(DUAL_X_CARRIAGE) - prepare_move_to_destination_dualx() || prepare_move_to_destination_cartesian() + prepare_move_to_destination_dualx() #else prepare_move_to_destination_cartesian() #endif From a8b8d4e85ea6c2b49563f9bccc16247c1c59b61e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 2 Oct 2017 23:33:57 -0500 Subject: [PATCH 3/4] =?UTF-8?q?Add=20a=20typedef=20for=20MENU=5FITEM(funct?= =?UTF-8?q?ion,=E2=80=A6)=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/ultralcd.cpp | 2 +- Marlin/src/lcd/ultralcd.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 9a19104d71..a248a1f94b 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -212,7 +212,7 @@ uint16_t max_display_update_time = 0; void _menu_action_back(); void menu_action_submenu(screenFunc_t data); void menu_action_gcode(const char* pgcode); - void menu_action_function(screenFunc_t data); + void menu_action_function(menuAction_t data); #define DECLARE_MENU_EDIT_TYPE(_type, _name) \ bool _menu_edit_ ## _name(); \ diff --git a/Marlin/src/lcd/ultralcd.h b/Marlin/src/lcd/ultralcd.h index db17e6284f..16b3998171 100644 --- a/Marlin/src/lcd/ultralcd.h +++ b/Marlin/src/lcd/ultralcd.h @@ -84,6 +84,7 @@ // Function pointer to menu functions. typedef void (*screenFunc_t)(); + typedef void (*menuAction_t)(); void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder=0); From ca3c9baf1bef13e42be9c2c5423d0922c199e2a6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 2 Oct 2017 23:35:55 -0500 Subject: [PATCH 4/4] Fix DUAL_X_CARRIAGE manual moves, add T0/T1 menu item --- Marlin/src/lcd/ultralcd.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index a248a1f94b..9fee89afb4 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -2750,9 +2750,13 @@ void kill_screen(const char* lcd_msg) { , int8_t eindex=-1 #endif ) { - #if E_MANUAL > 1 - if (axis == E_AXIS) manual_move_e_index = eindex >= 0 ? eindex : active_extruder; + #if ENABLED(DUAL_X_CARRIAGE) || E_MANUAL > 1 + #if E_MANUAL > 1 + if (axis == E_AXIS) + #endif + manual_move_e_index = eindex >= 0 ? eindex : active_extruder; #endif + manual_move_start_time = millis() + (move_menu_scale < 0.99 ? 0UL : 250UL); // delay for bigger moves manual_move_axis = (int8_t)axis; } @@ -2963,7 +2967,7 @@ void kill_screen(const char* lcd_msg) { else MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); - #if ENABLED(SWITCHING_EXTRUDER) + #if ENABLED(SWITCHING_EXTRUDER) || ENABLED(DUAL_X_CARRIAGE) if (active_extruder) MENU_ITEM(gcode, MSG_SELECT " " MSG_E1, PSTR("T0")); else