Преглед изворни кода

Always swap with PRIME_FIRST_USED disabled (#21622)

Luca Zimmermann пре 3 година
родитељ
комит
2d1d628340
No account linked to committer's email address
1 измењених фајлова са 8 додато и 8 уклоњено
  1. 8
    8
      Marlin/src/module/tool_change.cpp

+ 8
- 8
Marlin/src/module/tool_change.cpp Прегледај датотеку

@@ -928,13 +928,15 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
928 928
     #endif
929 929
 
930 930
     // First tool priming. To prime again, reboot the machine.
931
-    #if BOTH(TOOLCHANGE_FILAMENT_SWAP, TOOLCHANGE_FS_PRIME_FIRST_USED)
931
+    #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED)
932 932
       static bool first_tool_is_primed = false;
933 933
       if (new_tool == old_tool && !first_tool_is_primed && enable_first_prime) {
934 934
         tool_change_prime();
935 935
         first_tool_is_primed = true;
936
-        toolchange_extruder_ready[old_tool] = true; // Primed and initialized
936
+        TERN_(TOOLCHANGE_FS_INIT_BEFORE_SWAP, toolchange_extruder_ready[old_tool] = true); // Primed and initialized
937 937
       }
938
+    #else
939
+      constexpr bool first_tool_is_primed = true;
938 940
     #endif
939 941
 
940 942
     if (new_tool != old_tool || TERN0(PARKING_EXTRUDER, extruder_parked)) { // PARKING_EXTRUDER may need to attach old_tool when homing
@@ -970,12 +972,10 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
970 972
             if (ENABLED(SINGLENOZZLE)) { active_extruder = new_tool; return; }
971 973
           }
972 974
           else {
973
-            #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED)
974
-              // For first new tool, change without unloading the old. 'Just prime/init the new'
975
-              if (first_tool_is_primed)
976
-                unscaled_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed));
977
-              first_tool_is_primed = true; // The first new tool will be primed by toolchanging
978
-            #endif
975
+            // For first new tool, change without unloading the old. 'Just prime/init the new'
976
+            if (first_tool_is_primed)
977
+              unscaled_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed));
978
+            TERN_(TOOLCHANGE_FS_PRIME_FIRST_USED, first_tool_is_primed = true); // The first new tool will be primed by toolchanging
979 979
           }
980 980
         }
981 981
       #endif

Loading…
Откажи
Сачувај