Toolchange improvements (#16979)

This commit is contained in:
InsanityAutomation 2020-02-26 01:12:14 -05:00 committed by GitHub
parent ba4f49f4a2
commit 4250a98908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,8 +45,8 @@
#endif #endif
#endif #endif
#if ENABLED(MAGNETIC_PARKING_EXTRUDER) || (ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0) #if ENABLED(MAGNETIC_PARKING_EXTRUDER) || defined(EVENT_GCODE_AFTER_TOOLCHANGE) || (ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0)
#include "../gcode/gcode.h" // for dwell() #include "../gcode/gcode.h"
#endif #endif
#if ANY(SWITCHING_EXTRUDER, SWITCHING_NOZZLE, SWITCHING_TOOLHEAD) #if ANY(SWITCHING_EXTRUDER, SWITCHING_NOZZLE, SWITCHING_TOOLHEAD)
@ -861,7 +861,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
} }
#endif // TOOLCHANGE_FILAMENT_SWAP #endif // TOOLCHANGE_FILAMENT_SWAP
#if HAS_LEVELING #if HAS_LEVELING && DISABLED(SINGLENOZZLE)
// Set current position to the physical position // Set current position to the physical position
TEMPORARY_BED_LEVELING_STATE(false); TEMPORARY_BED_LEVELING_STATE(false);
#endif #endif
@ -1068,7 +1068,8 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
#endif #endif
#ifdef EVENT_GCODE_AFTER_TOOLCHANGE #ifdef EVENT_GCODE_AFTER_TOOLCHANGE
gcode.process_subcommands_now_P(EVENT_GCODE_AFTER_TOOLCHANGE); if (!no_move)
gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_AFTER_TOOLCHANGE));
#endif #endif
SERIAL_ECHO_START(); SERIAL_ECHO_START();