1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 12:04:19 +00:00

Add option EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN (#22960)

This commit is contained in:
InsanityAutomation 2021-10-15 15:56:59 -04:00 committed by GitHub
parent ee28a14e8e
commit 95662d3aed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -2313,6 +2313,7 @@
*/
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
//#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1
//#define EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN // Always execute above G-code sequences. Use with caution!
/**
* Tool Sensors detect when tools have been picked up or dropped.

View File

@ -1307,7 +1307,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
TERN_(HAS_FANMUX, fanmux_switch(active_extruder));
if (!no_move) {
if (ENABLED(EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN) || !no_move) {
#ifdef EVENT_GCODE_TOOLCHANGE_T0
if (new_tool == 0)
gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T0));