Explorar el Código

✨ Add option EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN (#22960)

InsanityAutomation hace 2 años
padre
commit
95662d3aed
No account linked to committer's email address
Se han modificado 2 ficheros con 2 adiciones y 1 borrados
  1. 1
    0
      Marlin/Configuration_adv.h
  2. 1
    1
      Marlin/src/module/tool_change.cpp

+ 1
- 0
Marlin/Configuration_adv.h Ver fichero

@@ -2313,6 +2313,7 @@
2313 2313
    */
2314 2314
   //#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
2315 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 2319
    * Tool Sensors detect when tools have been picked up or dropped.

+ 1
- 1
Marlin/src/module/tool_change.cpp Ver fichero

@@ -1307,7 +1307,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
1307 1307
 
1308 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 1311
       #ifdef EVENT_GCODE_TOOLCHANGE_T0
1312 1312
         if (new_tool == 0)
1313 1313
           gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T0));

Loading…
Cancelar
Guardar