Browse Source

Toolchange improvements (#16979)

InsanityAutomation 5 years ago
parent
commit
4250a98908
No account linked to committer's email address
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      Marlin/src/module/tool_change.cpp

+ 5
- 4
Marlin/src/module/tool_change.cpp View File

45
   #endif
45
   #endif
46
 #endif
46
 #endif
47
 
47
 
48
-#if ENABLED(MAGNETIC_PARKING_EXTRUDER) || (ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0)
49
-  #include "../gcode/gcode.h" // for dwell()
48
+#if ENABLED(MAGNETIC_PARKING_EXTRUDER) || defined(EVENT_GCODE_AFTER_TOOLCHANGE) || (ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0)
49
+  #include "../gcode/gcode.h"
50
 #endif
50
 #endif
51
 
51
 
52
 #if ANY(SWITCHING_EXTRUDER, SWITCHING_NOZZLE, SWITCHING_TOOLHEAD)
52
 #if ANY(SWITCHING_EXTRUDER, SWITCHING_NOZZLE, SWITCHING_TOOLHEAD)
861
       }
861
       }
862
     #endif // TOOLCHANGE_FILAMENT_SWAP
862
     #endif // TOOLCHANGE_FILAMENT_SWAP
863
 
863
 
864
-    #if HAS_LEVELING
864
+    #if HAS_LEVELING && DISABLED(SINGLENOZZLE)
865
       // Set current position to the physical position
865
       // Set current position to the physical position
866
       TEMPORARY_BED_LEVELING_STATE(false);
866
       TEMPORARY_BED_LEVELING_STATE(false);
867
     #endif
867
     #endif
1068
     #endif
1068
     #endif
1069
 
1069
 
1070
     #ifdef EVENT_GCODE_AFTER_TOOLCHANGE
1070
     #ifdef EVENT_GCODE_AFTER_TOOLCHANGE
1071
-      gcode.process_subcommands_now_P(EVENT_GCODE_AFTER_TOOLCHANGE);
1071
+      if (!no_move)
1072
+        gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_AFTER_TOOLCHANGE));
1072
     #endif
1073
     #endif
1073
 
1074
 
1074
     SERIAL_ECHO_START();
1075
     SERIAL_ECHO_START();

Loading…
Cancel
Save