Browse Source

✨ Add option EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN (#22960)

InsanityAutomation 3 years ago
parent
commit
95662d3aed
No account linked to committer's email address
2 changed files with 2 additions and 1 deletions
  1. 1
    0
      Marlin/Configuration_adv.h
  2. 1
    1
      Marlin/src/module/tool_change.cpp

+ 1
- 0
Marlin/Configuration_adv.h View File

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

+ 1
- 1
Marlin/src/module/tool_change.cpp View File

1307
 
1307
 
1308
     TERN_(HAS_FANMUX, fanmux_switch(active_extruder));
1308
     TERN_(HAS_FANMUX, fanmux_switch(active_extruder));
1309
 
1309
 
1310
-    if (!no_move) {
1310
+    if (ENABLED(EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN) || !no_move) {
1311
       #ifdef EVENT_GCODE_TOOLCHANGE_T0
1311
       #ifdef EVENT_GCODE_TOOLCHANGE_T0
1312
         if (new_tool == 0)
1312
         if (new_tool == 0)
1313
           gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T0));
1313
           gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T0));

Loading…
Cancel
Save