Toolchange improvements (#16979)

This commit is contained in:
InsanityAutomation 2020-02-26 01:12:14 -05:00 committed by GitHub
parent ba4f49f4a2
commit 4250a98908
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,8 +45,8 @@
#endif
#endif
#if ENABLED(MAGNETIC_PARKING_EXTRUDER) || (ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0)
#include "../gcode/gcode.h" // for dwell()
#if ENABLED(MAGNETIC_PARKING_EXTRUDER) || defined(EVENT_GCODE_AFTER_TOOLCHANGE) || (ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0)
#include "../gcode/gcode.h"
#endif
#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
#if HAS_LEVELING
#if HAS_LEVELING && DISABLED(SINGLENOZZLE)
// Set current position to the physical position
TEMPORARY_BED_LEVELING_STATE(false);
#endif
@ -1068,7 +1068,8 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
#endif
#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
SERIAL_ECHO_START();