From a847ea625e7db6ab790f1b84066461b8cc65d222 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 19 May 2018 16:31:55 -0500 Subject: [PATCH] Don't define unused move_extruder_servo For parity with #10772 --- Marlin/Conditionals_LCD.h | 2 ++ Marlin/Marlin_main.cpp | 8 ++------ Marlin/ultralcd.cpp | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Marlin/Conditionals_LCD.h b/Marlin/Conditionals_LCD.h index 5bab1d51c2..3f2410b8d2 100644 --- a/Marlin/Conditionals_LCD.h +++ b/Marlin/Conditionals_LCD.h @@ -427,6 +427,8 @@ #define E_MANUAL EXTRUDERS #endif + #define DO_SWITCH_EXTRUDER (ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR)) + /** * DISTINCT_E_FACTORS affects how some E factors are accessed */ diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 14f196dbc2..cbeb7deadd 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -537,10 +537,6 @@ static millis_t stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL #define BUZZ(d,f) NOOP #endif -#if ENABLED(SWITCHING_NOZZLE) - #define DO_SWITCH_EXTRUDER (SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR) -#endif - uint8_t target_extruder; #if HAS_BED_PROBE @@ -11512,7 +11508,7 @@ inline void gcode_M999() { flush_and_request_resend(); } -#if ENABLED(SWITCHING_EXTRUDER) +#if DO_SWITCH_EXTRUDER #if EXTRUDERS > 3 #define REQ_ANGLES 4 #define _SERVO_NR (e < 2 ? SWITCHING_EXTRUDER_SERVO_NR : SWITCHING_EXTRUDER_E23_SERVO_NR) @@ -11532,7 +11528,7 @@ inline void gcode_M999() { safe_delay(500); } } -#endif // SWITCHING_EXTRUDER +#endif // DO_SWITCH_EXTRUDER #if ENABLED(SWITCHING_NOZZLE) inline void move_nozzle_servo(const uint8_t e) { diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 0865c6e13a..a72eea5bca 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -3258,7 +3258,7 @@ void lcd_quick_feedback(const bool clear_buttons) { else MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); - #if ENABLED(SWITCHING_EXTRUDER) + #if ENABLED(SWITCHING_EXTRUDER) || ENABLED(SWITCHING_NOZZLE) #if EXTRUDERS == 4 switch (active_extruder) {