Ver código fonte

Add multi-extruder condition

Scott Lahteine 3 anos atrás
pai
commit
76d8d1742c
50 arquivos alterados com 127 adições e 144 exclusões
  1. 2
    2
      Marlin/Configuration_adv.h
  2. 1
    1
      Marlin/src/HAL/DUE/HAL_SPI.cpp
  3. 5
    5
      Marlin/src/HAL/LPC1768/inc/SanityCheck.h
  4. 3
    3
      Marlin/src/feature/dac/dac_dac084s085.cpp
  5. 7
    9
      Marlin/src/feature/fwretract.cpp
  6. 2
    2
      Marlin/src/feature/fwretract.h
  7. 5
    5
      Marlin/src/feature/powerloss.cpp
  8. 1
    1
      Marlin/src/feature/powerloss.h
  9. 2
    2
      Marlin/src/gcode/config/M217.cpp
  10. 1
    1
      Marlin/src/gcode/control/T.cpp
  11. 2
    2
      Marlin/src/gcode/feature/fwretract/G10_G11.cpp
  12. 3
    3
      Marlin/src/gcode/feature/pause/M600.cpp
  13. 1
    1
      Marlin/src/gcode/feature/pause/M603.cpp
  14. 6
    6
      Marlin/src/gcode/feature/pause/M701_M702.cpp
  15. 1
    1
      Marlin/src/gcode/gcode.cpp
  16. 1
    3
      Marlin/src/gcode/gcode.h
  17. 2
    0
      Marlin/src/inc/Conditionals_LCD.h
  18. 1
    1
      Marlin/src/inc/Conditionals_post.h
  19. 2
    2
      Marlin/src/inc/SanityCheck.h
  20. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp
  21. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/linear_advance_screen.cpp
  22. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/max_velocity_screen.cpp
  23. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/move_axis_screen.cpp
  24. 6
    6
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/nudge_nozzle_screen.cpp
  25. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screen_data.h
  26. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp
  27. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/steps_screen.cpp
  28. 1
    3
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp
  29. 1
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp
  30. 1
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp
  31. 1
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp
  32. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp
  33. 7
    5
      Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp
  34. 6
    11
      Marlin/src/lcd/extui/ui_api.cpp
  35. 6
    6
      Marlin/src/lcd/menu/menu_advanced.cpp
  36. 5
    5
      Marlin/src/lcd/menu/menu_configuration.cpp
  37. 2
    2
      Marlin/src/lcd/menu/menu_tune.cpp
  38. 2
    4
      Marlin/src/lcd/ultralcd.cpp
  39. 1
    1
      Marlin/src/module/endstops.cpp
  40. 1
    1
      Marlin/src/module/motion.cpp
  41. 1
    1
      Marlin/src/module/motion.h
  42. 2
    2
      Marlin/src/module/planner.cpp
  43. 1
    1
      Marlin/src/module/planner.h
  44. 6
    6
      Marlin/src/module/settings.cpp
  45. 6
    6
      Marlin/src/module/stepper.cpp
  46. 4
    9
      Marlin/src/module/stepper.h
  47. 3
    3
      Marlin/src/module/tool_change.cpp
  48. 1
    1
      Marlin/src/module/tool_change.h
  49. 2
    2
      Marlin/src/pins/sensitive_pins.h
  50. 0
    3
      buildroot/share/PlatformIO/scripts/common-dependencies.h

+ 2
- 2
Marlin/Configuration_adv.h Ver arquivo

1979
  * Universal tool change settings.
1979
  * Universal tool change settings.
1980
  * Applies to all types of extruders except where explicitly noted.
1980
  * Applies to all types of extruders except where explicitly noted.
1981
  */
1981
  */
1982
-#if EXTRUDERS > 1
1982
+#if HAS_MULTI_EXTRUDER
1983
   // Z raise distance for tool-change, as needed for some extruders
1983
   // Z raise distance for tool-change, as needed for some extruders
1984
   #define TOOLCHANGE_ZRAISE                 2 // (mm)
1984
   #define TOOLCHANGE_ZRAISE                 2 // (mm)
1985
   //#define TOOLCHANGE_ZRAISE_BEFORE_RETRACT  // Apply raise before swap retraction (if enabled)
1985
   //#define TOOLCHANGE_ZRAISE_BEFORE_RETRACT  // Apply raise before swap retraction (if enabled)
2043
     //#define TOOLCHANGE_PARK_X_ONLY          // X axis only move
2043
     //#define TOOLCHANGE_PARK_X_ONLY          // X axis only move
2044
     //#define TOOLCHANGE_PARK_Y_ONLY          // Y axis only move
2044
     //#define TOOLCHANGE_PARK_Y_ONLY          // Y axis only move
2045
   #endif
2045
   #endif
2046
-#endif // EXTRUDERS > 1
2046
+#endif // HAS_MULTI_EXTRUDER
2047
 
2047
 
2048
 /**
2048
 /**
2049
  * Advanced Pause
2049
  * Advanced Pause

+ 1
- 1
Marlin/src/HAL/DUE/HAL_SPI.cpp Ver arquivo

595
       SPI_Enable(SPI0);
595
       SPI_Enable(SPI0);
596
 
596
 
597
       SET_OUTPUT(DAC0_SYNC);
597
       SET_OUTPUT(DAC0_SYNC);
598
-      #if EXTRUDERS > 1
598
+      #if HAS_MULTI_EXTRUDER
599
         SET_OUTPUT(DAC1_SYNC);
599
         SET_OUTPUT(DAC1_SYNC);
600
         WRITE(DAC1_SYNC, HIGH);
600
         WRITE(DAC1_SYNC, HIGH);
601
       #endif
601
       #endif

+ 5
- 5
Marlin/src/HAL/LPC1768/inc/SanityCheck.h Ver arquivo

141
     #error "Serial port pins (2) conflict with probe pin!"
141
     #error "Serial port pins (2) conflict with probe pin!"
142
   #elif IS_TX2(X_ENABLE_PIN) || IS_RX2(X_DIR_PIN) || IS_TX2(Y_ENABLE_PIN) || IS_RX2(Y_DIR_PIN)
142
   #elif IS_TX2(X_ENABLE_PIN) || IS_RX2(X_DIR_PIN) || IS_TX2(Y_ENABLE_PIN) || IS_RX2(Y_DIR_PIN)
143
     #error "Serial port pins (2) conflict with X/Y stepper pins!"
143
     #error "Serial port pins (2) conflict with X/Y stepper pins!"
144
-  #elif EXTRUDERS > 1 && (IS_TX2(E1_ENABLE_PIN) || (AXIS_HAS_SPI(E1) && IS_TX2(E1_CS_PIN)))
144
+  #elif HAS_MULTI_EXTRUDER && (IS_TX2(E1_ENABLE_PIN) || (AXIS_HAS_SPI(E1) && IS_TX2(E1_CS_PIN)))
145
     #error "Serial port pins (2) conflict with E1 stepper pins!"
145
     #error "Serial port pins (2) conflict with E1 stepper pins!"
146
   #elif EXTRUDERS && (IS_RX2(E0_DIR_PIN) || IS_RX2(E0_STEP_PIN))
146
   #elif EXTRUDERS && (IS_RX2(E0_DIR_PIN) || IS_RX2(E0_STEP_PIN))
147
     #error "Serial port pins (2) conflict with E stepper pins!"
147
     #error "Serial port pins (2) conflict with E stepper pins!"
168
     #error "Serial port pins (3) conflict with Z3 pins!"
168
     #error "Serial port pins (3) conflict with Z3 pins!"
169
   #elif PIN_IS_TX3(Z4_DIR) || PIN_IS_RX3(Z4_STEP)
169
   #elif PIN_IS_TX3(Z4_DIR) || PIN_IS_RX3(Z4_STEP)
170
     #error "Serial port pins (3) conflict with Z4 pins!"
170
     #error "Serial port pins (3) conflict with Z4 pins!"
171
-  #elif EXTRUDERS > 1 && (PIN_IS_TX3(E1_DIR) || PIN_IS_RX3(E1_STEP))
171
+  #elif HAS_MULTI_EXTRUDER && (PIN_IS_TX3(E1_DIR) || PIN_IS_RX3(E1_STEP))
172
     #error "Serial port pins (3) conflict with E1 pins!"
172
     #error "Serial port pins (3) conflict with E1 pins!"
173
   #endif
173
   #endif
174
   #undef PIN_IS_TX3
174
   #undef PIN_IS_TX3
214
       #error "One or more i2c (1) pins overlaps with Z3 pins! Disable i2c peripherals."
214
       #error "One or more i2c (1) pins overlaps with Z3 pins! Disable i2c peripherals."
215
     #elif PIN_IS_SDA1(Z4_DIR) || PIN_IS_SCL1(Z4_STEP)
215
     #elif PIN_IS_SDA1(Z4_DIR) || PIN_IS_SCL1(Z4_STEP)
216
       #error "One or more i2c (1) pins overlaps with Z4 pins! Disable i2c peripherals."
216
       #error "One or more i2c (1) pins overlaps with Z4 pins! Disable i2c peripherals."
217
-    #elif EXTRUDERS > 1 && (PIN_IS_SDA1(E1_DIR) || PIN_IS_SCL1(E1_STEP))
217
+    #elif HAS_MULTI_EXTRUDER && (PIN_IS_SDA1(E1_DIR) || PIN_IS_SCL1(E1_STEP))
218
       #error "One or more i2c (1) pins overlaps with E1 pins! Disable i2c peripherals."
218
       #error "One or more i2c (1) pins overlaps with E1 pins! Disable i2c peripherals."
219
     #endif
219
     #endif
220
     #undef PIN_IS_SDA1
220
     #undef PIN_IS_SDA1
240
       #error "i2c SDA2 overlaps with Z3 enable pin! Disable i2c peripherals."
240
       #error "i2c SDA2 overlaps with Z3 enable pin! Disable i2c peripherals."
241
     #elif PIN_IS_SDA2(Z4_ENABLE)
241
     #elif PIN_IS_SDA2(Z4_ENABLE)
242
       #error "i2c SDA2 overlaps with Z4 enable pin! Disable i2c peripherals."
242
       #error "i2c SDA2 overlaps with Z4 enable pin! Disable i2c peripherals."
243
-    #elif EXTRUDERS > 1 && PIN_IS_SDA2(E1_ENABLE)
243
+    #elif HAS_MULTI_EXTRUDER && PIN_IS_SDA2(E1_ENABLE)
244
       #error "i2c SDA2 overlaps with E1 enable pin! Disable i2c peripherals."
244
       #error "i2c SDA2 overlaps with E1 enable pin! Disable i2c peripherals."
245
-    #elif EXTRUDERS > 1 && AXIS_HAS_SPI(E1) && PIN_IS_SDA2(E1_CS)
245
+    #elif HAS_MULTI_EXTRUDER && AXIS_HAS_SPI(E1) && PIN_IS_SDA2(E1_CS)
246
       #error "i2c SDA2 overlaps with E1 CS pin! Disable i2c peripherals."
246
       #error "i2c SDA2 overlaps with E1 CS pin! Disable i2c peripherals."
247
     #elif EXTRUDERS && (PIN_IS_SDA2(E0_STEP) || PIN_IS_SDA2(E0_DIR))
247
     #elif EXTRUDERS && (PIN_IS_SDA2(E0_STEP) || PIN_IS_SDA2(E0_DIR))
248
       #error "i2c SCL2 overlaps with E0 STEP/DIR pin! Disable i2c peripherals."
248
       #error "i2c SCL2 overlaps with E0 STEP/DIR pin! Disable i2c peripherals."

+ 3
- 3
Marlin/src/feature/dac/dac_dac084s085.cpp Ver arquivo

21
 
21
 
22
   // All SPI chip-select HIGH
22
   // All SPI chip-select HIGH
23
   SET_OUTPUT(DAC0_SYNC);
23
   SET_OUTPUT(DAC0_SYNC);
24
-  #if EXTRUDERS > 1
24
+  #if HAS_MULTI_EXTRUDER
25
     SET_OUTPUT(DAC1_SYNC);
25
     SET_OUTPUT(DAC1_SYNC);
26
   #endif
26
   #endif
27
   cshigh();
27
   cshigh();
38
   spiSend(SPI_CHAN_DAC, externalDac_buf, COUNT(externalDac_buf));
38
   spiSend(SPI_CHAN_DAC, externalDac_buf, COUNT(externalDac_buf));
39
   WRITE(DAC0_SYNC, HIGH);
39
   WRITE(DAC0_SYNC, HIGH);
40
 
40
 
41
-  #if EXTRUDERS > 1
41
+  #if HAS_MULTI_EXTRUDER
42
     //init Piggy DAC
42
     //init Piggy DAC
43
     DELAY_US(2);
43
     DELAY_US(2);
44
     WRITE(DAC1_SYNC, LOW);
44
     WRITE(DAC1_SYNC, LOW);
86
 
86
 
87
 void dac084s085::cshigh() {
87
 void dac084s085::cshigh() {
88
   WRITE(DAC0_SYNC, HIGH);
88
   WRITE(DAC0_SYNC, HIGH);
89
-  #if EXTRUDERS > 1
89
+  #if HAS_MULTI_EXTRUDER
90
     WRITE(DAC1_SYNC, HIGH);
90
     WRITE(DAC1_SYNC, HIGH);
91
   #endif
91
   #endif
92
   WRITE(SPI_EEPROM1_CS, HIGH);
92
   WRITE(SPI_EEPROM1_CS, HIGH);

+ 7
- 9
Marlin/src/feature/fwretract.cpp Ver arquivo

42
 
42
 
43
 // private:
43
 // private:
44
 
44
 
45
-#if EXTRUDERS > 1
45
+#if HAS_MULTI_EXTRUDER
46
   bool FWRetract::retracted_swap[EXTRUDERS];          // Which extruders are swap-retracted
46
   bool FWRetract::retracted_swap[EXTRUDERS];          // Which extruders are swap-retracted
47
 #endif
47
 #endif
48
 
48
 
73
 
73
 
74
   LOOP_L_N(i, EXTRUDERS) {
74
   LOOP_L_N(i, EXTRUDERS) {
75
     retracted[i] = false;
75
     retracted[i] = false;
76
-    #if EXTRUDERS > 1
77
-      retracted_swap[i] = false;
78
-    #endif
76
+    TERN_(HAS_MULTI_EXTRUDER, retracted_swap[i] = false);
79
     current_retract[i] = 0.0;
77
     current_retract[i] = 0.0;
80
   }
78
   }
81
 }
79
 }
92
  *       included in the G-code. Use M207 Z0 to to prevent double hop.
90
  *       included in the G-code. Use M207 Z0 to to prevent double hop.
93
  */
91
  */
94
 void FWRetract::retract(const bool retracting
92
 void FWRetract::retract(const bool retracting
95
-  #if EXTRUDERS > 1
93
+  #if HAS_MULTI_EXTRUDER
96
     , bool swapping/*=false*/
94
     , bool swapping/*=false*/
97
   #endif
95
   #endif
98
 ) {
96
 ) {
100
   if (retracted[active_extruder] == retracting) return;
98
   if (retracted[active_extruder] == retracting) return;
101
 
99
 
102
   // Prevent two swap-retract or recovers in a row
100
   // Prevent two swap-retract or recovers in a row
103
-  #if EXTRUDERS > 1
101
+  #if HAS_MULTI_EXTRUDER
104
     // Allow G10 S1 only after G11
102
     // Allow G10 S1 only after G11
105
     if (swapping && retracted_swap[active_extruder] == retracting) return;
103
     if (swapping && retracted_swap[active_extruder] == retracting) return;
106
     // G11 priority to recover the long retract if activated
104
     // G11 priority to recover the long retract if activated
117
     );
115
     );
118
     LOOP_L_N(i, EXTRUDERS) {
116
     LOOP_L_N(i, EXTRUDERS) {
119
       SERIAL_ECHOLNPAIR("retracted[", i, "] ", retracted[i]);
117
       SERIAL_ECHOLNPAIR("retracted[", i, "] ", retracted[i]);
120
-      #if EXTRUDERS > 1
118
+      #if HAS_MULTI_EXTRUDER
121
         SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", retracted_swap[i]);
119
         SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", retracted_swap[i]);
122
       #endif
120
       #endif
123
     }
121
     }
180
   retracted[active_extruder] = retracting;                // Active extruder now retracted / recovered
178
   retracted[active_extruder] = retracting;                // Active extruder now retracted / recovered
181
 
179
 
182
   // If swap retract/recover update the retracted_swap flag too
180
   // If swap retract/recover update the retracted_swap flag too
183
-  #if EXTRUDERS > 1
181
+  #if HAS_MULTI_EXTRUDER
184
     if (swapping) retracted_swap[active_extruder] = retracting;
182
     if (swapping) retracted_swap[active_extruder] = retracting;
185
   #endif
183
   #endif
186
 
184
 
190
     SERIAL_ECHOLNPAIR("active_extruder ", active_extruder);
188
     SERIAL_ECHOLNPAIR("active_extruder ", active_extruder);
191
     LOOP_L_N(i, EXTRUDERS) {
189
     LOOP_L_N(i, EXTRUDERS) {
192
       SERIAL_ECHOLNPAIR("retracted[", i, "] ", retracted[i]);
190
       SERIAL_ECHOLNPAIR("retracted[", i, "] ", retracted[i]);
193
-      #if EXTRUDERS > 1
191
+      #if HAS_MULTI_EXTRUDER
194
         SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", retracted_swap[i]);
192
         SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", retracted_swap[i]);
195
       #endif
193
       #endif
196
     }
194
     }

+ 2
- 2
Marlin/src/feature/fwretract.h Ver arquivo

42
 
42
 
43
 class FWRetract {
43
 class FWRetract {
44
 private:
44
 private:
45
-  #if EXTRUDERS > 1
45
+  #if HAS_MULTI_EXTRUDER
46
     static bool retracted_swap[EXTRUDERS];         // Which extruders are swap-retracted
46
     static bool retracted_swap[EXTRUDERS];         // Which extruders are swap-retracted
47
   #endif
47
   #endif
48
 
48
 
75
   }
75
   }
76
 
76
 
77
   static void retract(const bool retracting
77
   static void retract(const bool retracting
78
-    #if EXTRUDERS > 1
78
+    #if HAS_MULTI_EXTRUDER
79
       , bool swapping = false
79
       , bool swapping = false
80
     #endif
80
     #endif
81
   );
81
   );

+ 5
- 5
Marlin/src/feature/powerloss.cpp Ver arquivo

186
     TERN_(HAS_POSITION_SHIFT, info.position_shift = position_shift);
186
     TERN_(HAS_POSITION_SHIFT, info.position_shift = position_shift);
187
     info.feedrate = uint16_t(feedrate_mm_s * 60.0f);
187
     info.feedrate = uint16_t(feedrate_mm_s * 60.0f);
188
 
188
 
189
-    #if EXTRUDERS > 1
189
+    #if HAS_MULTI_EXTRUDER
190
       info.active_extruder = active_extruder;
190
       info.active_extruder = active_extruder;
191
     #endif
191
     #endif
192
 
192
 
193
     #if DISABLED(NO_VOLUMETRICS)
193
     #if DISABLED(NO_VOLUMETRICS)
194
       info.volumetric_enabled = parser.volumetric_enabled;
194
       info.volumetric_enabled = parser.volumetric_enabled;
195
-      #if EXTRUDERS > 1
195
+      #if HAS_MULTI_EXTRUDER
196
         for (int8_t e = 0; e < EXTRUDERS; e++) info.filament_size[e] = planner.filament_size[e];
196
         for (int8_t e = 0; e < EXTRUDERS; e++) info.filament_size[e] = planner.filament_size[e];
197
       #else
197
       #else
198
         if (parser.volumetric_enabled) info.filament_size[0] = planner.filament_size[active_extruder];
198
         if (parser.volumetric_enabled) info.filament_size[0] = planner.filament_size[active_extruder];
369
 
369
 
370
   // Recover volumetric extrusion state
370
   // Recover volumetric extrusion state
371
   #if DISABLED(NO_VOLUMETRICS)
371
   #if DISABLED(NO_VOLUMETRICS)
372
-    #if EXTRUDERS > 1
372
+    #if HAS_MULTI_EXTRUDER
373
       for (int8_t e = 0; e < EXTRUDERS; e++) {
373
       for (int8_t e = 0; e < EXTRUDERS; e++) {
374
         sprintf_P(cmd, PSTR("M200 T%i D%s"), e, dtostrf(info.filament_size[e], 1, 3, str_1));
374
         sprintf_P(cmd, PSTR("M200 T%i D%s"), e, dtostrf(info.filament_size[e], 1, 3, str_1));
375
         gcode.process_subcommands_now(cmd);
375
         gcode.process_subcommands_now(cmd);
411
   #endif
411
   #endif
412
 
412
 
413
   // Select the previously active tool (with no_move)
413
   // Select the previously active tool (with no_move)
414
-  #if EXTRUDERS > 1
414
+  #if HAS_MULTI_EXTRUDER
415
     sprintf_P(cmd, PSTR("T%i S"), info.active_extruder);
415
     sprintf_P(cmd, PSTR("T%i S"), info.active_extruder);
416
     gcode.process_subcommands_now(cmd);
416
     gcode.process_subcommands_now(cmd);
417
   #endif
417
   #endif
543
 
543
 
544
         DEBUG_ECHOLNPAIR("feedrate: ", info.feedrate);
544
         DEBUG_ECHOLNPAIR("feedrate: ", info.feedrate);
545
 
545
 
546
-        #if EXTRUDERS > 1
546
+        #if HAS_MULTI_EXTRUDER
547
           DEBUG_ECHOLNPAIR("active_extruder: ", int(info.active_extruder));
547
           DEBUG_ECHOLNPAIR("active_extruder: ", int(info.active_extruder));
548
         #endif
548
         #endif
549
 
549
 

+ 1
- 1
Marlin/src/feature/powerloss.h Ver arquivo

58
 
58
 
59
   uint16_t feedrate;
59
   uint16_t feedrate;
60
 
60
 
61
-  #if EXTRUDERS > 1
61
+  #if HAS_MULTI_EXTRUDER
62
     uint8_t active_extruder;
62
     uint8_t active_extruder;
63
   #endif
63
   #endif
64
 
64
 

+ 2
- 2
Marlin/src/gcode/config/M217.cpp Ver arquivo

22
 
22
 
23
 #include "../../inc/MarlinConfigPre.h"
23
 #include "../../inc/MarlinConfigPre.h"
24
 
24
 
25
-#if EXTRUDERS > 1
25
+#if HAS_MULTI_EXTRUDER
26
 
26
 
27
 #include "../gcode.h"
27
 #include "../gcode.h"
28
 #include "../../module/tool_change.h"
28
 #include "../../module/tool_change.h"
170
   M217_report();
170
   M217_report();
171
 }
171
 }
172
 
172
 
173
-#endif // EXTRUDERS > 1
173
+#endif // HAS_MULTI_EXTRUDER

+ 1
- 1
Marlin/src/gcode/control/T.cpp Ver arquivo

23
 #include "../gcode.h"
23
 #include "../gcode.h"
24
 #include "../../module/tool_change.h"
24
 #include "../../module/tool_change.h"
25
 
25
 
26
-#if ENABLED(DEBUG_LEVELING_FEATURE) || EXTRUDERS > 1
26
+#if EITHER(HAS_MULTI_EXTRUDER, DEBUG_LEVELING_FEATURE)
27
   #include "../../module/motion.h"
27
   #include "../../module/motion.h"
28
 #endif
28
 #endif
29
 
29
 

+ 2
- 2
Marlin/src/gcode/feature/fwretract/G10_G11.cpp Ver arquivo

33
  *       TODO: Handle 'G10 P' for tool settings and 'G10 L' for workspace settings
33
  *       TODO: Handle 'G10 P' for tool settings and 'G10 L' for workspace settings
34
  */
34
  */
35
 void GcodeSuite::G10() {
35
 void GcodeSuite::G10() {
36
-  #if EXTRUDERS > 1
36
+  #if HAS_MULTI_EXTRUDER
37
     const bool rs = parser.boolval('S');
37
     const bool rs = parser.boolval('S');
38
   #endif
38
   #endif
39
   fwretract.retract(true
39
   fwretract.retract(true
40
-    #if EXTRUDERS > 1
40
+    #if HAS_MULTI_EXTRUDER
41
       , rs
41
       , rs
42
     #endif
42
     #endif
43
   );
43
   );

+ 3
- 3
Marlin/src/gcode/feature/pause/M600.cpp Ver arquivo

29
 #include "../../../module/motion.h"
29
 #include "../../../module/motion.h"
30
 #include "../../../module/printcounter.h"
30
 #include "../../../module/printcounter.h"
31
 
31
 
32
-#if EXTRUDERS > 1
32
+#if HAS_MULTI_EXTRUDER
33
   #include "../../../module/tool_change.h"
33
   #include "../../../module/tool_change.h"
34
 #endif
34
 #endif
35
 
35
 
105
     if (!all_axes_known()) home_all_axes();
105
     if (!all_axes_known()) home_all_axes();
106
   #endif
106
   #endif
107
 
107
 
108
-  #if EXTRUDERS > 1
108
+  #if HAS_MULTI_EXTRUDER
109
     // Change toolhead if specified
109
     // Change toolhead if specified
110
     const uint8_t active_extruder_before_filament_change = active_extruder;
110
     const uint8_t active_extruder_before_filament_change = active_extruder;
111
     if (active_extruder != target_extruder && TERN1(DUAL_X_CARRIAGE, !dxc_is_duplicating()))
111
     if (active_extruder != target_extruder && TERN1(DUAL_X_CARRIAGE, !dxc_is_duplicating()))
163
     #endif
163
     #endif
164
   }
164
   }
165
 
165
 
166
-  #if EXTRUDERS > 1
166
+  #if HAS_MULTI_EXTRUDER
167
     // Restore toolhead if it was changed
167
     // Restore toolhead if it was changed
168
     if (active_extruder_before_filament_change != active_extruder)
168
     if (active_extruder_before_filament_change != active_extruder)
169
       tool_change(active_extruder_before_filament_change, false);
169
       tool_change(active_extruder_before_filament_change, false);

+ 1
- 1
Marlin/src/gcode/feature/pause/M603.cpp Ver arquivo

29
 #include "../../../module/motion.h"
29
 #include "../../../module/motion.h"
30
 #include "../../../module/printcounter.h"
30
 #include "../../../module/printcounter.h"
31
 
31
 
32
-#if EXTRUDERS > 1
32
+#if HAS_MULTI_EXTRUDER
33
   #include "../../../module/tool_change.h"
33
   #include "../../../module/tool_change.h"
34
 #endif
34
 #endif
35
 
35
 

+ 6
- 6
Marlin/src/gcode/feature/pause/M701_M702.cpp Ver arquivo

30
 #include "../../../module/temperature.h"
30
 #include "../../../module/temperature.h"
31
 #include "../../../feature/pause.h"
31
 #include "../../../feature/pause.h"
32
 
32
 
33
-#if EXTRUDERS > 1
33
+#if HAS_MULTI_EXTRUDER
34
   #include "../../../module/tool_change.h"
34
   #include "../../../module/tool_change.h"
35
 #endif
35
 #endif
36
 
36
 
86
   // Show initial "wait for load" message
86
   // Show initial "wait for load" message
87
   TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_LOAD, PAUSE_MODE_LOAD_FILAMENT, target_extruder));
87
   TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_LOAD, PAUSE_MODE_LOAD_FILAMENT, target_extruder));
88
 
88
 
89
-  #if EXTRUDERS > 1 && DISABLED(PRUSA_MMU2)
89
+  #if HAS_MULTI_EXTRUDER && DISABLED(PRUSA_MMU2)
90
     // Change toolhead if specified
90
     // Change toolhead if specified
91
     uint8_t active_extruder_before_filament_change = active_extruder;
91
     uint8_t active_extruder_before_filament_change = active_extruder;
92
     if (active_extruder != target_extruder)
92
     if (active_extruder != target_extruder)
121
   if (park_point.z > 0)
121
   if (park_point.z > 0)
122
     do_blocking_move_to_z(_MAX(current_position.z - park_point.z, 0), feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
122
     do_blocking_move_to_z(_MAX(current_position.z - park_point.z, 0), feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
123
 
123
 
124
-  #if EXTRUDERS > 1 && DISABLED(PRUSA_MMU2)
124
+  #if HAS_MULTI_EXTRUDER && DISABLED(PRUSA_MMU2)
125
     // Restore toolhead if it was changed
125
     // Restore toolhead if it was changed
126
     if (active_extruder_before_filament_change != active_extruder)
126
     if (active_extruder_before_filament_change != active_extruder)
127
       tool_change(active_extruder_before_filament_change, false);
127
       tool_change(active_extruder_before_filament_change, false);
186
   // Show initial "wait for unload" message
186
   // Show initial "wait for unload" message
187
   TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_UNLOAD, PAUSE_MODE_UNLOAD_FILAMENT, target_extruder));
187
   TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_UNLOAD, PAUSE_MODE_UNLOAD_FILAMENT, target_extruder));
188
 
188
 
189
-  #if EXTRUDERS > 1 && DISABLED(PRUSA_MMU2)
189
+  #if HAS_MULTI_EXTRUDER && DISABLED(PRUSA_MMU2)
190
     // Change toolhead if specified
190
     // Change toolhead if specified
191
     uint8_t active_extruder_before_filament_change = active_extruder;
191
     uint8_t active_extruder_before_filament_change = active_extruder;
192
     if (active_extruder != target_extruder)
192
     if (active_extruder != target_extruder)
201
   #if ENABLED(PRUSA_MMU2)
201
   #if ENABLED(PRUSA_MMU2)
202
     mmu2.unload();
202
     mmu2.unload();
203
   #else
203
   #else
204
-    #if EXTRUDERS > 1 && ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
204
+    #if BOTH(HAS_MULTI_EXTRUDER, FILAMENT_UNLOAD_ALL_EXTRUDERS)
205
       if (!parser.seenval('T')) {
205
       if (!parser.seenval('T')) {
206
         HOTEND_LOOP() {
206
         HOTEND_LOOP() {
207
           if (e != active_extruder) tool_change(e, false);
207
           if (e != active_extruder) tool_change(e, false);
227
   if (park_point.z > 0)
227
   if (park_point.z > 0)
228
     do_blocking_move_to_z(_MAX(current_position.z - park_point.z, 0), feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
228
     do_blocking_move_to_z(_MAX(current_position.z - park_point.z, 0), feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
229
 
229
 
230
-  #if EXTRUDERS > 1 && DISABLED(PRUSA_MMU2)
230
+  #if HAS_MULTI_EXTRUDER && DISABLED(PRUSA_MMU2)
231
     // Restore toolhead if it was changed
231
     // Restore toolhead if it was changed
232
     if (active_extruder_before_filament_change != active_extruder)
232
     if (active_extruder_before_filament_change != active_extruder)
233
       tool_change(active_extruder_before_filament_change, false);
233
       tool_change(active_extruder_before_filament_change, false);

+ 1
- 1
Marlin/src/gcode/gcode.cpp Ver arquivo

614
         case 211: M211(); break;                                  // M211: Enable, Disable, and/or Report software endstops
614
         case 211: M211(); break;                                  // M211: Enable, Disable, and/or Report software endstops
615
       #endif
615
       #endif
616
 
616
 
617
-      #if EXTRUDERS > 1
617
+      #if HAS_MULTI_EXTRUDER
618
         case 217: M217(); break;                                  // M217: Set filament swap parameters
618
         case 217: M217(); break;                                  // M217: Set filament swap parameters
619
       #endif
619
       #endif
620
 
620
 

+ 1
- 3
Marlin/src/gcode/gcode.h Ver arquivo

661
 
661
 
662
   static void M211();
662
   static void M211();
663
 
663
 
664
-  #if EXTRUDERS > 1
665
-    static void M217();
666
-  #endif
664
+  TERN_(HAS_MULTI_EXTRUDER, static void M217());
667
 
665
 
668
   TERN_(HAS_HOTEND_OFFSET, static void M218());
666
   TERN_(HAS_HOTEND_OFFSET, static void M218());
669
 
667
 

+ 2
- 0
Marlin/src/inc/Conditionals_LCD.h Ver arquivo

501
   #undef MK2_MULTIPLEXER
501
   #undef MK2_MULTIPLEXER
502
   #undef PRUSA_MMU2
502
   #undef PRUSA_MMU2
503
   #undef HOTEND_IDLE_TIMEOUT
503
   #undef HOTEND_IDLE_TIMEOUT
504
+#elif EXTRUDERS > 1
505
+  #define HAS_MULTI_EXTRUDER 1
504
 #endif
506
 #endif
505
 
507
 
506
 #if ENABLED(SWITCHING_EXTRUDER)   // One stepper for every two EXTRUDERS
508
 #if ENABLED(SWITCHING_EXTRUDER)   // One stepper for every two EXTRUDERS

+ 1
- 1
Marlin/src/inc/Conditionals_post.h Ver arquivo

2334
   #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0
2334
   #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0
2335
 #endif
2335
 #endif
2336
 
2336
 
2337
-#if EXTRUDERS > 1 && !defined(TOOLCHANGE_FS_EXTRA_PRIME)
2337
+#if HAS_MULTI_EXTRUDER && !defined(TOOLCHANGE_FS_EXTRA_PRIME)
2338
   #define TOOLCHANGE_FS_EXTRA_PRIME 0
2338
   #define TOOLCHANGE_FS_EXTRA_PRIME 0
2339
 #endif
2339
 #endif
2340
 
2340
 

+ 2
- 2
Marlin/src/inc/SanityCheck.h Ver arquivo

865
 /**
865
 /**
866
  * Options only for EXTRUDERS > 1
866
  * Options only for EXTRUDERS > 1
867
  */
867
  */
868
-#if EXTRUDERS > 1
868
+#if HAS_MULTI_EXTRUDER
869
 
869
 
870
   #if EXTRUDERS > 8
870
   #if EXTRUDERS > 8
871
     #error "Marlin supports a maximum of 8 EXTRUDERS."
871
     #error "Marlin supports a maximum of 8 EXTRUDERS."
987
  * Mixing Extruder requirements
987
  * Mixing Extruder requirements
988
  */
988
  */
989
 #if ENABLED(MIXING_EXTRUDER)
989
 #if ENABLED(MIXING_EXTRUDER)
990
-  #if EXTRUDERS > 1
990
+  #if HAS_MULTI_EXTRUDER
991
     #error "For MIXING_EXTRUDER set MIXING_STEPPERS > 1 instead of EXTRUDERS > 1."
991
     #error "For MIXING_EXTRUDER set MIXING_STEPPERS > 1 instead of EXTRUDERS > 1."
992
   #elif MIXING_STEPPERS < 2
992
   #elif MIXING_STEPPERS < 2
993
     #error "You must set MIXING_STEPPERS >= 2 for a mixing extruder."
993
     #error "You must set MIXING_STEPPERS >= 2 for a mixing extruder."

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp Ver arquivo

96
   #else
96
   #else
97
     PIN_DISABLED(1, 4, GET_TEXT_F(MSG_RUNOUT_1), FIL_RUNOUT)
97
     PIN_DISABLED(1, 4, GET_TEXT_F(MSG_RUNOUT_1), FIL_RUNOUT)
98
   #endif
98
   #endif
99
-  #if ENABLED(FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT2) && EXTRUDERS > 1
99
+  #if BOTH(HAS_MULTI_EXTRUDER, FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT2)
100
     PIN_ENABLED (3, 4, GET_TEXT_F(MSG_RUNOUT_2), FIL_RUNOUT2, FIL_RUNOUT_STATE)
100
     PIN_ENABLED (3, 4, GET_TEXT_F(MSG_RUNOUT_2), FIL_RUNOUT2, FIL_RUNOUT_STATE)
101
   #else
101
   #else
102
     PIN_DISABLED(3, 4, GET_TEXT_F(MSG_RUNOUT_2), FIL_RUNOUT2)
102
     PIN_DISABLED(3, 4, GET_TEXT_F(MSG_RUNOUT_2), FIL_RUNOUT2)

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/linear_advance_screen.cpp Ver arquivo

34
   widgets_t w(what);
34
   widgets_t w(what);
35
   w.precision(2, DEFAULT_LOWEST).color(e_axis);
35
   w.precision(2, DEFAULT_LOWEST).color(e_axis);
36
   w.heading(           GET_TEXT_F(MSG_LINEAR_ADVANCE));
36
   w.heading(           GET_TEXT_F(MSG_LINEAR_ADVANCE));
37
-  #if EXTRUDERS == 1
37
+  #if !HAS_MULTI_EXTRUDER
38
     w.adjuster(     2, GET_TEXT_F(MSG_LINEAR_ADVANCE_K),    getLinearAdvance_mm_mm_s(E0) );
38
     w.adjuster(     2, GET_TEXT_F(MSG_LINEAR_ADVANCE_K),    getLinearAdvance_mm_mm_s(E0) );
39
   #else
39
   #else
40
     w.adjuster(     2, GET_TEXT_F(MSG_LINEAR_ADVANCE_K1), getLinearAdvance_mm_mm_s(E0) );
40
     w.adjuster(     2, GET_TEXT_F(MSG_LINEAR_ADVANCE_K1), getLinearAdvance_mm_mm_s(E0) );
55
   switch (tag) {
55
   switch (tag) {
56
     case  2: UI_DECREMENT(LinearAdvance_mm_mm_s, E0); break;
56
     case  2: UI_DECREMENT(LinearAdvance_mm_mm_s, E0); break;
57
     case  3: UI_INCREMENT(LinearAdvance_mm_mm_s, E0); break;
57
     case  3: UI_INCREMENT(LinearAdvance_mm_mm_s, E0); break;
58
-    #if EXTRUDERS > 1
58
+    #if HAS_MULTI_EXTRUDER
59
       case  4: UI_DECREMENT(LinearAdvance_mm_mm_s, E1);  break;
59
       case  4: UI_DECREMENT(LinearAdvance_mm_mm_s, E1);  break;
60
       case  5: UI_INCREMENT(LinearAdvance_mm_mm_s, E1); break;
60
       case  5: UI_INCREMENT(LinearAdvance_mm_mm_s, E1); break;
61
       #if EXTRUDERS > 2
61
       #if EXTRUDERS > 2

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/max_velocity_screen.cpp Ver arquivo

41
   w.color(z_axis)    .adjuster(  6, GET_TEXT_F(MSG_VMAX_Z), getAxisMaxFeedrate_mm_s(Z) );
41
   w.color(z_axis)    .adjuster(  6, GET_TEXT_F(MSG_VMAX_Z), getAxisMaxFeedrate_mm_s(Z) );
42
   #if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS)
42
   #if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS)
43
     w.color(e_axis)  .adjuster(  8, GET_TEXT_F(MSG_VMAX_E), getAxisMaxFeedrate_mm_s(E0) );
43
     w.color(e_axis)  .adjuster(  8, GET_TEXT_F(MSG_VMAX_E), getAxisMaxFeedrate_mm_s(E0) );
44
-  #elif EXTRUDERS > 1
44
+  #elif HAS_MULTI_EXTRUDER
45
     w.heading(GET_TEXT_F(MSG_VMAX_E));
45
     w.heading(GET_TEXT_F(MSG_VMAX_E));
46
     w.color(e_axis)  .adjuster(  8, F(LCD_STR_E0), getAxisMaxFeedrate_mm_s(E0) );
46
     w.color(e_axis)  .adjuster(  8, F(LCD_STR_E0), getAxisMaxFeedrate_mm_s(E0) );
47
     w.color(e_axis)  .adjuster( 10, F(LCD_STR_E1), getAxisMaxFeedrate_mm_s(E1) );
47
     w.color(e_axis)  .adjuster( 10, F(LCD_STR_E1), getAxisMaxFeedrate_mm_s(E1) );

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/move_axis_screen.cpp Ver arquivo

55
   w.color(Theme::e_axis);
55
   w.color(Theme::e_axis);
56
   #if EXTRUDERS == 1
56
   #if EXTRUDERS == 1
57
     w.adjuster(  8, GET_TEXT_F(MSG_AXIS_E),  screen_data.MoveAxisScreen.e_rel[0], canMove(E0));
57
     w.adjuster(  8, GET_TEXT_F(MSG_AXIS_E),  screen_data.MoveAxisScreen.e_rel[0], canMove(E0));
58
-  #elif EXTRUDERS > 1
58
+  #elif HAS_MULTI_EXTRUDER
59
     w.adjuster(  8, GET_TEXT_F(MSG_AXIS_E1), screen_data.MoveAxisScreen.e_rel[0], canMove(E0));
59
     w.adjuster(  8, GET_TEXT_F(MSG_AXIS_E1), screen_data.MoveAxisScreen.e_rel[0], canMove(E0));
60
     w.adjuster( 10, GET_TEXT_F(MSG_AXIS_E2), screen_data.MoveAxisScreen.e_rel[1], canMove(E1));
60
     w.adjuster( 10, GET_TEXT_F(MSG_AXIS_E2), screen_data.MoveAxisScreen.e_rel[1], canMove(E1));
61
     #if EXTRUDERS > 2
61
     #if EXTRUDERS > 2
82
     // For extruders, also update relative distances.
82
     // For extruders, also update relative distances.
83
     case  8: UI_DECREMENT_AXIS(E0); screen_data.MoveAxisScreen.e_rel[0] -= increment; break;
83
     case  8: UI_DECREMENT_AXIS(E0); screen_data.MoveAxisScreen.e_rel[0] -= increment; break;
84
     case  9: UI_INCREMENT_AXIS(E0); screen_data.MoveAxisScreen.e_rel[0] += increment; break;
84
     case  9: UI_INCREMENT_AXIS(E0); screen_data.MoveAxisScreen.e_rel[0] += increment; break;
85
-    #if EXTRUDERS > 1
85
+    #if HAS_MULTI_EXTRUDER
86
     case 10: UI_DECREMENT_AXIS(E1); screen_data.MoveAxisScreen.e_rel[1] -= increment; break;
86
     case 10: UI_DECREMENT_AXIS(E1); screen_data.MoveAxisScreen.e_rel[1] -= increment; break;
87
     case 11: UI_INCREMENT_AXIS(E1); screen_data.MoveAxisScreen.e_rel[1] += increment; break;
87
     case 11: UI_INCREMENT_AXIS(E1); screen_data.MoveAxisScreen.e_rel[1] += increment; break;
88
     #endif
88
     #endif

+ 6
- 6
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/nudge_nozzle_screen.cpp Ver arquivo

33
 
33
 
34
 void NudgeNozzleScreen::onEntry() {
34
 void NudgeNozzleScreen::onEntry() {
35
   screen_data.NudgeNozzleScreen.show_offsets = false;
35
   screen_data.NudgeNozzleScreen.show_offsets = false;
36
-  #if EXTRUDERS > 1
36
+  #if HAS_MULTI_EXTRUDER
37
     screen_data.NudgeNozzleScreen.link_nozzles = true;
37
     screen_data.NudgeNozzleScreen.link_nozzles = true;
38
   #endif
38
   #endif
39
   screen_data.NudgeNozzleScreen.rel.reset();
39
   screen_data.NudgeNozzleScreen.rel.reset();
52
   #endif
52
   #endif
53
   w.color(z_axis).adjuster(6, GET_TEXT_F(MSG_AXIS_Z), screen_data.NudgeNozzleScreen.rel.z / getAxisSteps_per_mm(Z));
53
   w.color(z_axis).adjuster(6, GET_TEXT_F(MSG_AXIS_Z), screen_data.NudgeNozzleScreen.rel.z / getAxisSteps_per_mm(Z));
54
   w.increments();
54
   w.increments();
55
-  #if EXTRUDERS > 1
55
+  #if HAS_MULTI_EXTRUDER
56
     w.toggle(8, GET_TEXT_F(MSG_ADJUST_BOTH_NOZZLES), screen_data.NudgeNozzleScreen.link_nozzles);
56
     w.toggle(8, GET_TEXT_F(MSG_ADJUST_BOTH_NOZZLES), screen_data.NudgeNozzleScreen.link_nozzles);
57
   #endif
57
   #endif
58
 
58
 
59
-  #if EXTRUDERS > 1 || HAS_BED_PROBE
59
+  #if HAS_MULTI_EXTRUDER || HAS_BED_PROBE
60
     w.toggle(9, GET_TEXT_F(MSG_SHOW_OFFSETS), screen_data.NudgeNozzleScreen.show_offsets);
60
     w.toggle(9, GET_TEXT_F(MSG_SHOW_OFFSETS), screen_data.NudgeNozzleScreen.show_offsets);
61
 
61
 
62
     if (screen_data.NudgeNozzleScreen.show_offsets) {
62
     if (screen_data.NudgeNozzleScreen.show_offsets) {
82
 
82
 
83
 bool NudgeNozzleScreen::onTouchHeld(uint8_t tag) {
83
 bool NudgeNozzleScreen::onTouchHeld(uint8_t tag) {
84
   const float inc = getIncrement();
84
   const float inc = getIncrement();
85
-  #if EXTRUDERS > 1
85
+  #if HAS_MULTI_EXTRUDER
86
     const bool link = screen_data.NudgeNozzleScreen.link_nozzles;
86
     const bool link = screen_data.NudgeNozzleScreen.link_nozzles;
87
   #else
87
   #else
88
     constexpr bool link = true;
88
     constexpr bool link = true;
95
     case 5: steps = mmToWholeSteps(inc, Y); smartAdjustAxis_steps( steps, Y, link); screen_data.NudgeNozzleScreen.rel.y += steps; break;
95
     case 5: steps = mmToWholeSteps(inc, Y); smartAdjustAxis_steps( steps, Y, link); screen_data.NudgeNozzleScreen.rel.y += steps; break;
96
     case 6: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps(-steps, Z, link); screen_data.NudgeNozzleScreen.rel.z -= steps; break;
96
     case 6: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps(-steps, Z, link); screen_data.NudgeNozzleScreen.rel.z -= steps; break;
97
     case 7: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps( steps, Z, link); screen_data.NudgeNozzleScreen.rel.z += steps; break;
97
     case 7: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps( steps, Z, link); screen_data.NudgeNozzleScreen.rel.z += steps; break;
98
-    #if EXTRUDERS > 1
98
+    #if HAS_MULTI_EXTRUDER
99
       case 8: screen_data.NudgeNozzleScreen.link_nozzles = !link; break;
99
       case 8: screen_data.NudgeNozzleScreen.link_nozzles = !link; break;
100
     #endif
100
     #endif
101
     case 9: screen_data.NudgeNozzleScreen.show_offsets = !screen_data.NudgeNozzleScreen.show_offsets; break;
101
     case 9: screen_data.NudgeNozzleScreen.show_offsets = !screen_data.NudgeNozzleScreen.show_offsets; break;
102
     default: return false;
102
     default: return false;
103
   }
103
   }
104
-  #if EXTRUDERS > 1 || HAS_BED_PROBE
104
+  #if HAS_MULTI_EXTRUDER || HAS_BED_PROBE
105
     SaveSettingsDialogBox::settingsChanged();
105
     SaveSettingsDialogBox::settingsChanged();
106
   #endif
106
   #endif
107
   return true;
107
   return true;

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screen_data.h Ver arquivo

86
     struct {
86
     struct {
87
       struct base_numeric_adjustment_t placeholder;
87
       struct base_numeric_adjustment_t placeholder;
88
       xyz_int_t rel;
88
       xyz_int_t rel;
89
-      #if EXTRUDERS > 1
89
+      #if HAS_MULTI_EXTRUDER
90
         bool link_nozzles;
90
         bool link_nozzles;
91
       #endif
91
       #endif
92
       bool show_offsets;
92
       bool show_offsets;

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp Ver arquivo

40
   w.color(z_axis)  .adjuster( 6, GET_TEXT_F(MSG_AXIS_Z),  getAxisCurrent_mA(Z) );
40
   w.color(z_axis)  .adjuster( 6, GET_TEXT_F(MSG_AXIS_Z),  getAxisCurrent_mA(Z) );
41
   #if EXTRUDERS == 1
41
   #if EXTRUDERS == 1
42
     w.color(e_axis).adjuster( 8, GET_TEXT_F(MSG_AXIS_E),  getAxisCurrent_mA(E0) );
42
     w.color(e_axis).adjuster( 8, GET_TEXT_F(MSG_AXIS_E),  getAxisCurrent_mA(E0) );
43
-  #elif EXTRUDERS > 1
43
+  #elif HAS_MULTI_EXTRUDER
44
     w.color(e_axis).adjuster( 8, GET_TEXT_F(MSG_AXIS_E1), getAxisCurrent_mA(E0) );
44
     w.color(e_axis).adjuster( 8, GET_TEXT_F(MSG_AXIS_E1), getAxisCurrent_mA(E0) );
45
     w.color(e_axis).adjuster(10, GET_TEXT_F(MSG_AXIS_E2), getAxisCurrent_mA(E1) );
45
     w.color(e_axis).adjuster(10, GET_TEXT_F(MSG_AXIS_E2), getAxisCurrent_mA(E1) );
46
     #if EXTRUDERS > 2
46
     #if EXTRUDERS > 2
64
     case  7: UI_INCREMENT(AxisCurrent_mA, Z ); break;
64
     case  7: UI_INCREMENT(AxisCurrent_mA, Z ); break;
65
     case  8: UI_DECREMENT(AxisCurrent_mA, E0); break;
65
     case  8: UI_DECREMENT(AxisCurrent_mA, E0); break;
66
     case  9: UI_INCREMENT(AxisCurrent_mA, E0); break;
66
     case  9: UI_INCREMENT(AxisCurrent_mA, E0); break;
67
-    #if EXTRUDERS > 1
67
+    #if HAS_MULTI_EXTRUDER
68
     case 10: UI_DECREMENT(AxisCurrent_mA, E1); break;
68
     case 10: UI_DECREMENT(AxisCurrent_mA, E1); break;
69
     case 11: UI_INCREMENT(AxisCurrent_mA, E1); break;
69
     case 11: UI_INCREMENT(AxisCurrent_mA, E1); break;
70
     #endif
70
     #endif

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/steps_screen.cpp Ver arquivo

40
   w.color(z_axis)     .adjuster( 6, GET_TEXT_F(MSG_AXIS_Z),  getAxisSteps_per_mm(Z) );
40
   w.color(z_axis)     .adjuster( 6, GET_TEXT_F(MSG_AXIS_Z),  getAxisSteps_per_mm(Z) );
41
   #if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS)
41
   #if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS)
42
     w.color(e_axis)   .adjuster( 8, GET_TEXT_F(MSG_AXIS_E),  getAxisSteps_per_mm(E0) );
42
     w.color(e_axis)   .adjuster( 8, GET_TEXT_F(MSG_AXIS_E),  getAxisSteps_per_mm(E0) );
43
-  #elif EXTRUDERS > 1
43
+  #elif HAS_MULTI_EXTRUDER
44
     w.color(e_axis)   .adjuster( 8, GET_TEXT_F(MSG_AXIS_E1), getAxisSteps_per_mm(E0) );
44
     w.color(e_axis)   .adjuster( 8, GET_TEXT_F(MSG_AXIS_E1), getAxisSteps_per_mm(E0) );
45
     w.color(e_axis)   .adjuster(10, GET_TEXT_F(MSG_AXIS_E2), getAxisSteps_per_mm(E1) );
45
     w.color(e_axis)   .adjuster(10, GET_TEXT_F(MSG_AXIS_E2), getAxisSteps_per_mm(E1) );
46
     #if EXTRUDERS > 2
46
     #if EXTRUDERS > 2
64
     case  7: UI_INCREMENT(AxisSteps_per_mm, Z);  break;
64
     case  7: UI_INCREMENT(AxisSteps_per_mm, Z);  break;
65
     case  8: UI_DECREMENT(AxisSteps_per_mm, E0); break;
65
     case  8: UI_DECREMENT(AxisSteps_per_mm, E0); break;
66
     case  9: UI_INCREMENT(AxisSteps_per_mm, E0); break;
66
     case  9: UI_INCREMENT(AxisSteps_per_mm, E0); break;
67
-    #if EXTRUDERS > 1
67
+    #if HAS_MULTI_EXTRUDER
68
     case 10: UI_DECREMENT(AxisSteps_per_mm, E1); break;
68
     case 10: UI_DECREMENT(AxisSteps_per_mm, E1); break;
69
     case 11: UI_INCREMENT(AxisSteps_per_mm, E1); break;
69
     case 11: UI_INCREMENT(AxisSteps_per_mm, E1); break;
70
     #endif
70
     #endif

+ 1
- 3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp Ver arquivo

127
       injectCommands_P(PSTR(
127
       injectCommands_P(PSTR(
128
         "G0 X100 Y100 Z100 F6000\n"
128
         "G0 X100 Y100 Z100 F6000\n"
129
         "T0\nG4 S1"
129
         "T0\nG4 S1"
130
-        #if EXTRUDERS > 1
131
-          "\nT1\nG4 S1"
132
-        #endif
130
+        TERN_(HAS_MULTI_EXTRUDER, "\nT1\nG4 S1")
133
         "\nG0 X150 Y150 Z150"
131
         "\nG0 X150 Y150 Z150"
134
       ));
132
       ));
135
     }
133
     }

+ 1
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp Ver arquivo

70
           //planner.flow_percentage[1] = planner.flow_percentage[0];
70
           //planner.flow_percentage[1] = planner.flow_percentage[0];
71
           //planner.e_factor[1]= planner.flow_percentage[1]*0.01;
71
           //planner.e_factor[1]= planner.flow_percentage[1]*0.01;
72
           planner.refresh_e_factor(0);
72
           planner.refresh_e_factor(0);
73
-          if (EXTRUDERS == 2) {
73
+          #if HAS_MULTI_EXTRUDER
74
             planner.flow_percentage[1] = planner.flow_percentage[0];
74
             planner.flow_percentage[1] = planner.flow_percentage[0];
75
             planner.refresh_e_factor(1);
75
             planner.refresh_e_factor(1);
76
           }
76
           }

+ 1
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp Ver arquivo

95
             //saved_feedrate_percentage = feedrate_percentage;
95
             //saved_feedrate_percentage = feedrate_percentage;
96
             planner.flow_percentage[0] = 100;
96
             planner.flow_percentage[0] = 100;
97
             planner.e_factor[0]        = planner.flow_percentage[0] * 0.01f;
97
             planner.e_factor[0]        = planner.flow_percentage[0] * 0.01f;
98
-            #if EXTRUDERS == 2
98
+            #if HAS_MULTI_EXTRUDER
99
               planner.flow_percentage[1] = 100;
99
               planner.flow_percentage[1] = 100;
100
               planner.e_factor[1]        = planner.flow_percentage[1] * 0.01f;
100
               planner.e_factor[1]        = planner.flow_percentage[1] * 0.01f;
101
             #endif
101
             #endif

+ 1
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp Ver arquivo

90
         // nothing to do
90
         // nothing to do
91
       }
91
       }
92
       else if (event == LV_EVENT_RELEASED) {
92
       else if (event == LV_EVENT_RELEASED) {
93
-        if (EXTRUDERS == 2) {
93
+        if (ENABLED(HAS_MULTI_EXTRUDER)) {
94
           if (uiCfg.curSprayerChoose == 0) {
94
           if (uiCfg.curSprayerChoose == 0) {
95
             uiCfg.curSprayerChoose = 1;
95
             uiCfg.curSprayerChoose = 1;
96
             queue.inject_P(PSTR("T1"));
96
             queue.inject_P(PSTR("T1"));

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp Ver arquivo

61
               thermalManager.start_watching_hotend(uiCfg.curSprayerChoose);
61
               thermalManager.start_watching_hotend(uiCfg.curSprayerChoose);
62
             }
62
             }
63
           }
63
           }
64
-          #if !defined(SINGLENOZZLE) && EXTRUDERS >= 2
64
+          #if !defined(SINGLENOZZLE) && HAS_MULTI_EXTRUDER
65
             else if ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target > (HEATER_1_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1))) {
65
             else if ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target > (HEATER_1_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1))) {
66
               thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = (float)HEATER_1_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1);
66
               thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = (float)HEATER_1_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1);
67
               thermalManager.start_watching_hotend(uiCfg.curSprayerChoose);
67
               thermalManager.start_watching_hotend(uiCfg.curSprayerChoose);
117
       }
117
       }
118
       else if (event == LV_EVENT_RELEASED) {
118
       else if (event == LV_EVENT_RELEASED) {
119
         if (uiCfg.curTempType == 0) {
119
         if (uiCfg.curTempType == 0) {
120
-          if (EXTRUDERS == 2) {
120
+          if (ENABLED(HAS_MULTI_EXTRUDER)) {
121
             if (uiCfg.curSprayerChoose == 0) {
121
             if (uiCfg.curSprayerChoose == 0) {
122
               uiCfg.curSprayerChoose = 1;
122
               uiCfg.curSprayerChoose = 1;
123
             }
123
             }

+ 7
- 5
Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp Ver arquivo

242
   #endif // if 1
242
   #endif // if 1
243
 
243
 
244
   lv_obj_set_pos(buttonExt1, 205, 136);
244
   lv_obj_set_pos(buttonExt1, 205, 136);
245
-  if (EXTRUDERS == 2)
245
+
246
+  #if HAS_MULTI_EXTRUDER
246
     lv_obj_set_pos(buttonExt2, 350, 136);
247
     lv_obj_set_pos(buttonExt2, 350, 136);
248
+  #endif
247
 
249
 
248
   #if HAS_HEATED_BED
250
   #if HAS_HEATED_BED
249
     lv_obj_set_pos(buttonBedstate, 205, 186);
251
     lv_obj_set_pos(buttonBedstate, 205, 186);
275
   lv_obj_set_style(labelExt1, &tft_style_label_rel);
277
   lv_obj_set_style(labelExt1, &tft_style_label_rel);
276
   lv_obj_set_pos(labelExt1, 250, 146);
278
   lv_obj_set_pos(labelExt1, 250, 146);
277
 
279
 
278
-  if (EXTRUDERS == 2) {
280
+  #if HAS_MULTI_EXTRUDER
279
     labelExt2 = lv_label_create(scr, NULL);
281
     labelExt2 = lv_label_create(scr, NULL);
280
     lv_obj_set_style(labelExt2, &tft_style_label_rel);
282
     lv_obj_set_style(labelExt2, &tft_style_label_rel);
281
     lv_obj_set_pos(labelExt2, 395, 146);
283
     lv_obj_set_pos(labelExt2, 395, 146);
282
-  }
284
+  #endif
283
 
285
 
284
   #if HAS_HEATED_BED
286
   #if HAS_HEATED_BED
285
     labelBed = lv_label_create(scr, NULL);
287
     labelBed = lv_label_create(scr, NULL);
344
   sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.temp_hotend[0].celsius, (int)thermalManager.temp_hotend[0].target);
346
   sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.temp_hotend[0].celsius, (int)thermalManager.temp_hotend[0].target);
345
   lv_label_set_text(labelExt1, public_buf_l);
347
   lv_label_set_text(labelExt1, public_buf_l);
346
 
348
 
347
-  if (EXTRUDERS == 2) {
349
+  #if HAS_MULTI_EXTRUDER
348
     ZERO(public_buf_l);
350
     ZERO(public_buf_l);
349
     sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.temp_hotend[1].celsius, (int)thermalManager.temp_hotend[1].target);
351
     sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.temp_hotend[1].celsius, (int)thermalManager.temp_hotend[1].target);
350
     lv_label_set_text(labelExt2, public_buf_l);
352
     lv_label_set_text(labelExt2, public_buf_l);
351
-  }
353
+  #endif
352
 }
354
 }
353
 
355
 
354
 void disp_bed_temp() {
356
 void disp_bed_temp() {

+ 6
- 11
Marlin/src/lcd/extui/ui_api.cpp Ver arquivo

61
   #include "../../libs/numtostr.h"
61
   #include "../../libs/numtostr.h"
62
 #endif
62
 #endif
63
 
63
 
64
-#if EXTRUDERS > 1
64
+#if HAS_MULTI_EXTRUDER
65
   #include "../../module/tool_change.h"
65
   #include "../../module/tool_change.h"
66
 #endif
66
 #endif
67
 
67
 
348
   }
348
   }
349
 
349
 
350
   void setActiveTool(const extruder_t extruder, bool no_move) {
350
   void setActiveTool(const extruder_t extruder, bool no_move) {
351
-    #if EXTRUDERS > 1
351
+    #if HAS_MULTI_EXTRUDER
352
       const uint8_t e = extruder - E0;
352
       const uint8_t e = extruder - E0;
353
       if (e != active_extruder) tool_change(e, no_move);
353
       if (e != active_extruder) tool_change(e, no_move);
354
       active_extruder = e;
354
       active_extruder = e;
699
      */
699
      */
700
     void smartAdjustAxis_steps(const int16_t steps, const axis_t axis, bool linked_nozzles) {
700
     void smartAdjustAxis_steps(const int16_t steps, const axis_t axis, bool linked_nozzles) {
701
       const float mm = steps * planner.steps_to_mm[axis];
701
       const float mm = steps * planner.steps_to_mm[axis];
702
+      UNUSED(mm);
702
 
703
 
703
       if (!babystepAxis_steps(steps, axis)) return;
704
       if (!babystepAxis_steps(steps, axis)) return;
704
 
705
 
705
       #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
706
       #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
706
         // Make it so babystepping in Z adjusts the Z probe offset.
707
         // Make it so babystepping in Z adjusts the Z probe offset.
707
-        if (axis == Z
708
-          #if EXTRUDERS > 1
709
-            && (linked_nozzles || active_extruder == 0)
710
-          #endif
711
-        ) probe.offset.z += mm;
712
-      #else
713
-        UNUSED(mm);
708
+        if (axis == Z && TERN1(HAS_MULTI_EXTRUDER, linked_nozzles || active_extruder == 0))
709
+          probe.offset.z += mm;
714
       #endif
710
       #endif
715
 
711
 
716
-      #if EXTRUDERS > 1 && HAS_HOTEND_OFFSET
712
+      #if HAS_MULTI_EXTRUDER && HAS_HOTEND_OFFSET
717
         /**
713
         /**
718
          * When linked_nozzles is false, as an axis is babystepped
714
          * When linked_nozzles is false, as an axis is babystepped
719
          * adjust the hotend offsets so that the other nozzles are
715
          * adjust the hotend offsets so that the other nozzles are
730
         }
726
         }
731
       #else
727
       #else
732
         UNUSED(linked_nozzles);
728
         UNUSED(linked_nozzles);
733
-        UNUSED(mm);
734
       #endif
729
       #endif
735
     }
730
     }
736
 
731
 

+ 6
- 6
Marlin/src/lcd/menu/menu_advanced.cpp Ver arquivo

111
     #if ENABLED(LIN_ADVANCE)
111
     #if ENABLED(LIN_ADVANCE)
112
       #if EXTRUDERS == 1
112
       #if EXTRUDERS == 1
113
         EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
113
         EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
114
-      #elif EXTRUDERS > 1
114
+      #elif HAS_MULTI_EXTRUDER
115
         LOOP_L_N(n, EXTRUDERS)
115
         LOOP_L_N(n, EXTRUDERS)
116
           EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
116
           EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
117
       #endif
117
       #endif
122
 
122
 
123
       #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
123
       #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
124
         EDIT_ITEM_FAST(float42_52, MSG_VOLUMETRIC_LIMIT, &planner.volumetric_extruder_limit[active_extruder], 0.0f, 20.0f, planner.calculate_volumetric_extruder_limits);
124
         EDIT_ITEM_FAST(float42_52, MSG_VOLUMETRIC_LIMIT, &planner.volumetric_extruder_limit[active_extruder], 0.0f, 20.0f, planner.calculate_volumetric_extruder_limits);
125
-        #if EXTRUDERS > 1
125
+        #if HAS_MULTI_EXTRUDER
126
           LOOP_L_N(n, EXTRUDERS)
126
           LOOP_L_N(n, EXTRUDERS)
127
             EDIT_ITEM_FAST_N(float42_52, n, MSG_VOLUMETRIC_LIMIT_E, &planner.volumetric_extruder_limit[n], 0.0f, 20.00f, planner.calculate_volumetric_extruder_limits);
127
             EDIT_ITEM_FAST_N(float42_52, n, MSG_VOLUMETRIC_LIMIT_E, &planner.volumetric_extruder_limit[n], 0.0f, 20.00f, planner.calculate_volumetric_extruder_limits);
128
         #endif
128
         #endif
130
 
130
 
131
       if (parser.volumetric_enabled) {
131
       if (parser.volumetric_enabled) {
132
         EDIT_ITEM_FAST(float43, MSG_FILAMENT_DIAM, &planner.filament_size[active_extruder], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
132
         EDIT_ITEM_FAST(float43, MSG_FILAMENT_DIAM, &planner.filament_size[active_extruder], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
133
-        #if EXTRUDERS > 1
133
+        #if HAS_MULTI_EXTRUDER
134
           LOOP_L_N(n, EXTRUDERS)
134
           LOOP_L_N(n, EXTRUDERS)
135
             EDIT_ITEM_FAST_N(float43, n, MSG_FILAMENT_DIAM_E, &planner.filament_size[n], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
135
             EDIT_ITEM_FAST_N(float43, n, MSG_FILAMENT_DIAM_E, &planner.filament_size[n], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);
136
         #endif
136
         #endif
141
       constexpr float extrude_maxlength = TERN(PREVENT_LENGTHY_EXTRUDE, EXTRUDE_MAXLENGTH, 999);
141
       constexpr float extrude_maxlength = TERN(PREVENT_LENGTHY_EXTRUDE, EXTRUDE_MAXLENGTH, 999);
142
 
142
 
143
       EDIT_ITEM_FAST(float3, MSG_FILAMENT_UNLOAD, &fc_settings[active_extruder].unload_length, 0, extrude_maxlength);
143
       EDIT_ITEM_FAST(float3, MSG_FILAMENT_UNLOAD, &fc_settings[active_extruder].unload_length, 0, extrude_maxlength);
144
-      #if EXTRUDERS > 1
144
+      #if HAS_MULTI_EXTRUDER
145
         LOOP_L_N(n, EXTRUDERS)
145
         LOOP_L_N(n, EXTRUDERS)
146
           EDIT_ITEM_FAST_N(float3, n, MSG_FILAMENTUNLOAD_E, &fc_settings[n].unload_length, 0, extrude_maxlength);
146
           EDIT_ITEM_FAST_N(float3, n, MSG_FILAMENTUNLOAD_E, &fc_settings[n].unload_length, 0, extrude_maxlength);
147
       #endif
147
       #endif
148
 
148
 
149
       EDIT_ITEM_FAST(float3, MSG_FILAMENT_LOAD, &fc_settings[active_extruder].load_length, 0, extrude_maxlength);
149
       EDIT_ITEM_FAST(float3, MSG_FILAMENT_LOAD, &fc_settings[active_extruder].load_length, 0, extrude_maxlength);
150
-      #if EXTRUDERS > 1
150
+      #if HAS_MULTI_EXTRUDER
151
         LOOP_L_N(n, EXTRUDERS)
151
         LOOP_L_N(n, EXTRUDERS)
152
           EDIT_ITEM_FAST_N(float3, n, MSG_FILAMENTLOAD_E, &fc_settings[n].load_length, 0, extrude_maxlength);
152
           EDIT_ITEM_FAST_N(float3, n, MSG_FILAMENTLOAD_E, &fc_settings[n].load_length, 0, extrude_maxlength);
153
       #endif
153
       #endif
583
   #elif ENABLED(LIN_ADVANCE)
583
   #elif ENABLED(LIN_ADVANCE)
584
     #if EXTRUDERS == 1
584
     #if EXTRUDERS == 1
585
       EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
585
       EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
586
-    #elif EXTRUDERS > 1
586
+    #elif HAS_MULTI_EXTRUDER
587
       LOOP_L_N(n, E_STEPPERS)
587
       LOOP_L_N(n, E_STEPPERS)
588
         EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
588
         EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
589
     #endif
589
     #endif

+ 5
- 5
Marlin/src/lcd/menu/menu_configuration.cpp Ver arquivo

94
 
94
 
95
 #endif
95
 #endif
96
 
96
 
97
-#if EXTRUDERS > 1
97
+#if HAS_MULTI_EXTRUDER
98
 
98
 
99
   #include "../../module/tool_change.h"
99
   #include "../../module/tool_change.h"
100
 
100
 
280
       EDIT_ITEM(bool, MSG_AUTORETRACT, &fwretract.autoretract_enabled, fwretract.refresh_autoretract);
280
       EDIT_ITEM(bool, MSG_AUTORETRACT, &fwretract.autoretract_enabled, fwretract.refresh_autoretract);
281
     #endif
281
     #endif
282
     EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT, &fwretract.settings.retract_length, 0, 100);
282
     EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT, &fwretract.settings.retract_length, 0, 100);
283
-    #if EXTRUDERS > 1
283
+    #if HAS_MULTI_EXTRUDER
284
       EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_SWAP, &fwretract.settings.swap_retract_length, 0, 100);
284
       EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_SWAP, &fwretract.settings.swap_retract_length, 0, 100);
285
     #endif
285
     #endif
286
     EDIT_ITEM(float3, MSG_CONTROL_RETRACTF, &fwretract.settings.retract_feedrate_mm_s, 1, 999);
286
     EDIT_ITEM(float3, MSG_CONTROL_RETRACTF, &fwretract.settings.retract_feedrate_mm_s, 1, 999);
287
     EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_ZHOP, &fwretract.settings.retract_zraise, 0, 999);
287
     EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_ZHOP, &fwretract.settings.retract_zraise, 0, 999);
288
     EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_RECOVER, &fwretract.settings.retract_recover_extra, -100, 100);
288
     EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_RECOVER, &fwretract.settings.retract_recover_extra, -100, 100);
289
-    #if EXTRUDERS > 1
289
+    #if HAS_MULTI_EXTRUDER
290
       EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_RECOVER_SWAP, &fwretract.settings.swap_retract_recover_extra, -100, 100);
290
       EDIT_ITEM(float52sign, MSG_CONTROL_RETRACT_RECOVER_SWAP, &fwretract.settings.swap_retract_recover_extra, -100, 100);
291
     #endif
291
     #endif
292
     EDIT_ITEM(float3, MSG_CONTROL_RETRACT_RECOVERF, &fwretract.settings.retract_recover_feedrate_mm_s, 1, 999);
292
     EDIT_ITEM(float3, MSG_CONTROL_RETRACT_RECOVERF, &fwretract.settings.retract_recover_feedrate_mm_s, 1, 999);
293
-    #if EXTRUDERS > 1
293
+    #if HAS_MULTI_EXTRUDER
294
       EDIT_ITEM(float3, MSG_CONTROL_RETRACT_RECOVER_SWAPF, &fwretract.settings.swap_retract_recover_feedrate_mm_s, 1, 999);
294
       EDIT_ITEM(float3, MSG_CONTROL_RETRACT_RECOVER_SWAPF, &fwretract.settings.swap_retract_recover_feedrate_mm_s, 1, 999);
295
     #endif
295
     #endif
296
     END_MENU();
296
     END_MENU();
380
   //
380
   //
381
   // Set single nozzle filament retract and prime length
381
   // Set single nozzle filament retract and prime length
382
   //
382
   //
383
-  #if EXTRUDERS > 1
383
+  #if HAS_MULTI_EXTRUDER
384
     SUBMENU(MSG_TOOL_CHANGE, menu_tool_change);
384
     SUBMENU(MSG_TOOL_CHANGE, menu_tool_change);
385
     #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
385
     #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
386
       SUBMENU(MSG_TOOL_MIGRATION, menu_toolchange_migration);
386
       SUBMENU(MSG_TOOL_MIGRATION, menu_toolchange_migration);

+ 2
- 2
Marlin/src/lcd/menu/menu_tune.cpp Ver arquivo

215
   #if EXTRUDERS
215
   #if EXTRUDERS
216
     EDIT_ITEM(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], 10, 999, []{ planner.refresh_e_factor(active_extruder); });
216
     EDIT_ITEM(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], 10, 999, []{ planner.refresh_e_factor(active_extruder); });
217
     // Flow En:
217
     // Flow En:
218
-    #if EXTRUDERS > 1
218
+    #if HAS_MULTI_EXTRUDER
219
       LOOP_L_N(n, EXTRUDERS)
219
       LOOP_L_N(n, EXTRUDERS)
220
         EDIT_ITEM_N(int3, n, MSG_FLOW_N, &planner.flow_percentage[n], 10, 999, []{ planner.refresh_e_factor(MenuItemBase::itemIndex); });
220
         EDIT_ITEM_N(int3, n, MSG_FLOW_N, &planner.flow_percentage[n], 10, 999, []{ planner.refresh_e_factor(MenuItemBase::itemIndex); });
221
     #endif
221
     #endif
227
   #if ENABLED(LIN_ADVANCE) && DISABLED(SLIM_LCD_MENUS)
227
   #if ENABLED(LIN_ADVANCE) && DISABLED(SLIM_LCD_MENUS)
228
     #if EXTRUDERS == 1
228
     #if EXTRUDERS == 1
229
       EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
229
       EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
230
-    #elif EXTRUDERS > 1
230
+    #elif HAS_MULTI_EXTRUDER
231
       LOOP_L_N(n, EXTRUDERS)
231
       LOOP_L_N(n, EXTRUDERS)
232
         EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
232
         EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
233
     #endif
233
     #endif

+ 2
- 4
Marlin/src/lcd/ultralcd.cpp Ver arquivo

695
 
695
 
696
       #if IS_KINEMATIC
696
       #if IS_KINEMATIC
697
 
697
 
698
-        #if EXTRUDERS > 1
698
+        #if HAS_MULTI_EXTRUDER
699
           const int8_t old_extruder = active_extruder;
699
           const int8_t old_extruder = active_extruder;
700
           if (axis == E_AXIS) active_extruder = e_index;
700
           if (axis == E_AXIS) active_extruder = e_index;
701
         #endif
701
         #endif
716
         prepare_internal_move_to_destination(fr_mm_s);  // will set current_position from destination
716
         prepare_internal_move_to_destination(fr_mm_s);  // will set current_position from destination
717
         processing = false;
717
         processing = false;
718
 
718
 
719
-        #if EXTRUDERS > 1
720
-          active_extruder = old_extruder;
721
-        #endif
719
+        TERN_(HAS_MULTI_EXTRUDER, active_extruder = old_extruder);
722
 
720
 
723
       #else
721
       #else
724
 
722
 

+ 1
- 1
Marlin/src/module/endstops.cpp Ver arquivo

505
 
505
 
506
   // With Dual X, endstops are only checked in the homing direction for the active extruder
506
   // With Dual X, endstops are only checked in the homing direction for the active extruder
507
   #if ENABLED(DUAL_X_CARRIAGE)
507
   #if ENABLED(DUAL_X_CARRIAGE)
508
-    #define E0_ACTIVE stepper.movement_extruder() == 0
508
+    #define E0_ACTIVE stepper.last_moved_extruder == 0
509
     #define X_MIN_TEST() ((X_HOME_DIR < 0 && E0_ACTIVE) || (X2_HOME_DIR < 0 && !E0_ACTIVE))
509
     #define X_MIN_TEST() ((X_HOME_DIR < 0 && E0_ACTIVE) || (X2_HOME_DIR < 0 && !E0_ACTIVE))
510
     #define X_MAX_TEST() ((X_HOME_DIR > 0 && E0_ACTIVE) || (X2_HOME_DIR > 0 && !E0_ACTIVE))
510
     #define X_MAX_TEST() ((X_HOME_DIR > 0 && E0_ACTIVE) || (X2_HOME_DIR > 0 && !E0_ACTIVE))
511
   #else
511
   #else

+ 1
- 1
Marlin/src/module/motion.cpp Ver arquivo

111
 #endif
111
 #endif
112
 
112
 
113
 // The active extruder (tool). Set with T<extruder> command.
113
 // The active extruder (tool). Set with T<extruder> command.
114
-#if EXTRUDERS > 1
114
+#if HAS_MULTI_EXTRUDER
115
   uint8_t active_extruder = 0; // = 0
115
   uint8_t active_extruder = 0; // = 0
116
 #endif
116
 #endif
117
 
117
 

+ 1
- 1
Marlin/src/module/motion.h Ver arquivo

98
 extern int16_t feedrate_percentage;
98
 extern int16_t feedrate_percentage;
99
 
99
 
100
 // The active extruder (tool). Set with T<extruder> command.
100
 // The active extruder (tool). Set with T<extruder> command.
101
-#if EXTRUDERS > 1
101
+#if HAS_MULTI_EXTRUDER
102
   extern uint8_t active_extruder;
102
   extern uint8_t active_extruder;
103
 #else
103
 #else
104
   constexpr uint8_t active_extruder = 0;
104
   constexpr uint8_t active_extruder = 0;

+ 2
- 2
Marlin/src/module/planner.cpp Ver arquivo

1992
     block->e_to_p_pressure = baricuda_e_to_p_pressure;
1992
     block->e_to_p_pressure = baricuda_e_to_p_pressure;
1993
   #endif
1993
   #endif
1994
 
1994
 
1995
-  #if EXTRUDERS > 1
1995
+  #if HAS_MULTI_EXTRUDER
1996
     block->extruder = extruder;
1996
     block->extruder = extruder;
1997
   #endif
1997
   #endif
1998
 
1998
 
2843
       FANS_LOOP(i) block->fan_speed[i] = thermalManager.fan_speed[i];
2843
       FANS_LOOP(i) block->fan_speed[i] = thermalManager.fan_speed[i];
2844
     #endif
2844
     #endif
2845
 
2845
 
2846
-    #if EXTRUDERS > 1
2846
+    #if HAS_MULTI_EXTRUDER
2847
       block->extruder = extruder;
2847
       block->extruder = extruder;
2848
     #endif
2848
     #endif
2849
 
2849
 

+ 1
- 1
Marlin/src/module/planner.h Ver arquivo

164
   };
164
   };
165
   uint32_t step_event_count;                // The number of step events required to complete this block
165
   uint32_t step_event_count;                // The number of step events required to complete this block
166
 
166
 
167
-  #if EXTRUDERS > 1
167
+  #if HAS_MULTI_EXTRUDER
168
     uint8_t extruder;                       // The extruder to move (if E move)
168
     uint8_t extruder;                       // The extruder to move (if E move)
169
   #else
169
   #else
170
     static constexpr uint8_t extruder = 0;
170
     static constexpr uint8_t extruder = 0;

+ 6
- 6
Marlin/src/module/settings.cpp Ver arquivo

115
   extern float other_extruder_advance_K[EXTRUDERS];
115
   extern float other_extruder_advance_K[EXTRUDERS];
116
 #endif
116
 #endif
117
 
117
 
118
-#if EXTRUDERS > 1
118
+#if HAS_MULTI_EXTRUDER
119
   #include "tool_change.h"
119
   #include "tool_change.h"
120
   void M217_report(const bool eeprom);
120
   void M217_report(const bool eeprom);
121
 #endif
121
 #endif
388
   //
388
   //
389
   // Tool-change settings
389
   // Tool-change settings
390
   //
390
   //
391
-  #if EXTRUDERS > 1
391
+  #if HAS_MULTI_EXTRUDER
392
     toolchange_settings_t toolchange_settings;          // M217 S P R
392
     toolchange_settings_t toolchange_settings;          // M217 S P R
393
   #endif
393
   #endif
394
 
394
 
1320
     // Multiple Extruders
1320
     // Multiple Extruders
1321
     //
1321
     //
1322
 
1322
 
1323
-    #if EXTRUDERS > 1
1323
+    #if HAS_MULTI_EXTRUDER
1324
       _FIELD_TEST(toolchange_settings);
1324
       _FIELD_TEST(toolchange_settings);
1325
       EEPROM_WRITE(toolchange_settings);
1325
       EEPROM_WRITE(toolchange_settings);
1326
     #endif
1326
     #endif
2167
       //
2167
       //
2168
       // Tool-change settings
2168
       // Tool-change settings
2169
       //
2169
       //
2170
-      #if EXTRUDERS > 1
2170
+      #if HAS_MULTI_EXTRUDER
2171
         _FIELD_TEST(toolchange_settings);
2171
         _FIELD_TEST(toolchange_settings);
2172
         EEPROM_READ(toolchange_settings);
2172
         EEPROM_READ(toolchange_settings);
2173
       #endif
2173
       #endif
2488
   // Tool-change Settings
2488
   // Tool-change Settings
2489
   //
2489
   //
2490
 
2490
 
2491
-  #if EXTRUDERS > 1
2491
+  #if HAS_MULTI_EXTRUDER
2492
     #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
2492
     #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
2493
       toolchange_settings.swap_length     = TOOLCHANGE_FS_LENGTH;
2493
       toolchange_settings.swap_length     = TOOLCHANGE_FS_LENGTH;
2494
       toolchange_settings.extra_resume    = TOOLCHANGE_FS_EXTRA_RESUME_LENGTH;
2494
       toolchange_settings.extra_resume    = TOOLCHANGE_FS_EXTRA_RESUME_LENGTH;
3719
       #endif
3719
       #endif
3720
     #endif
3720
     #endif
3721
 
3721
 
3722
-    #if EXTRUDERS > 1
3722
+    #if HAS_MULTI_EXTRUDER
3723
       CONFIG_ECHO_HEADING("Tool-changing:");
3723
       CONFIG_ECHO_HEADING("Tool-changing:");
3724
       CONFIG_ECHO_START();
3724
       CONFIG_ECHO_START();
3725
       M217_report(true);
3725
       M217_report(true);

+ 6
- 6
Marlin/src/module/stepper.cpp Ver arquivo

155
 
155
 
156
 bool Stepper::abort_current_block;
156
 bool Stepper::abort_current_block;
157
 
157
 
158
-#if DISABLED(MIXING_EXTRUDER) && EXTRUDERS > 1
158
+#if DISABLED(MIXING_EXTRUDER) && HAS_MULTI_EXTRUDER
159
   uint8_t Stepper::last_moved_extruder = 0xFF;
159
   uint8_t Stepper::last_moved_extruder = 0xFF;
160
 #endif
160
 #endif
161
 
161
 
191
          Stepper::decelerate_after,          // The count at which to start decelerating
191
          Stepper::decelerate_after,          // The count at which to start decelerating
192
          Stepper::step_event_count;          // The total event count for the current block
192
          Stepper::step_event_count;          // The total event count for the current block
193
 
193
 
194
-#if EXTRUDERS > 1 || ENABLED(MIXING_EXTRUDER)
194
+#if EITHER(HAS_MULTI_EXTRUDER, MIXING_EXTRUDER)
195
   uint8_t Stepper::stepper_extruder;
195
   uint8_t Stepper::stepper_extruder;
196
 #else
196
 #else
197
   constexpr uint8_t Stepper::stepper_extruder;
197
   constexpr uint8_t Stepper::stepper_extruder;
357
 #elif ENABLED(DUAL_X_CARRIAGE)
357
 #elif ENABLED(DUAL_X_CARRIAGE)
358
   #define X_APPLY_DIR(v,ALWAYS) do{ \
358
   #define X_APPLY_DIR(v,ALWAYS) do{ \
359
     if (extruder_duplication_enabled || ALWAYS) { X_DIR_WRITE(v); X2_DIR_WRITE(mirrored_duplication_mode ? !(v) : v); } \
359
     if (extruder_duplication_enabled || ALWAYS) { X_DIR_WRITE(v); X2_DIR_WRITE(mirrored_duplication_mode ? !(v) : v); } \
360
-    else if (movement_extruder()) X2_DIR_WRITE(v); else X_DIR_WRITE(v); \
360
+    else if (last_moved_extruder) X2_DIR_WRITE(v); else X_DIR_WRITE(v); \
361
   }while(0)
361
   }while(0)
362
   #define X_APPLY_STEP(v,ALWAYS) do{ \
362
   #define X_APPLY_STEP(v,ALWAYS) do{ \
363
     if (extruder_duplication_enabled || ALWAYS) { X_STEP_WRITE(v); X2_STEP_WRITE(v); } \
363
     if (extruder_duplication_enabled || ALWAYS) { X_STEP_WRITE(v); X2_STEP_WRITE(v); } \
364
-    else if (movement_extruder()) X2_STEP_WRITE(v); else X_STEP_WRITE(v); \
364
+    else if (last_moved_extruder) X2_STEP_WRITE(v); else X_STEP_WRITE(v); \
365
   }while(0)
365
   }while(0)
366
 #else
366
 #else
367
   #define X_APPLY_DIR(v,Q) X_DIR_WRITE(v)
367
   #define X_APPLY_DIR(v,Q) X_DIR_WRITE(v)
2131
         MIXER_STEPPER_SETUP();
2131
         MIXER_STEPPER_SETUP();
2132
       #endif
2132
       #endif
2133
 
2133
 
2134
-      #if EXTRUDERS > 1
2134
+      #if HAS_MULTI_EXTRUDER
2135
         stepper_extruder = current_block->extruder;
2135
         stepper_extruder = current_block->extruder;
2136
       #endif
2136
       #endif
2137
 
2137
 
2156
         || TERN(MIXING_EXTRUDER, false, stepper_extruder != last_moved_extruder)
2156
         || TERN(MIXING_EXTRUDER, false, stepper_extruder != last_moved_extruder)
2157
       ) {
2157
       ) {
2158
         last_direction_bits = current_block->direction_bits;
2158
         last_direction_bits = current_block->direction_bits;
2159
-        #if EXTRUDERS > 1
2159
+        #if HAS_MULTI_EXTRUDER
2160
           last_moved_extruder = stepper_extruder;
2160
           last_moved_extruder = stepper_extruder;
2161
         #endif
2161
         #endif
2162
 
2162
 

+ 4
- 9
Marlin/src/module/stepper.h Ver arquivo

263
     static bool abort_current_block;        // Signals to the stepper that current block should be aborted
263
     static bool abort_current_block;        // Signals to the stepper that current block should be aborted
264
 
264
 
265
     // Last-moved extruder, as set when the last movement was fetched from planner
265
     // Last-moved extruder, as set when the last movement was fetched from planner
266
-    #if EXTRUDERS < 2
267
-      static constexpr uint8_t last_moved_extruder = 0;
268
-    #elif DISABLED(MIXING_EXTRUDER)
266
+    #if HAS_MULTI_EXTRUDER
269
       static uint8_t last_moved_extruder;
267
       static uint8_t last_moved_extruder;
268
+    #else
269
+      static constexpr uint8_t last_moved_extruder = 0;
270
     #endif
270
     #endif
271
 
271
 
272
     #if ENABLED(X_DUAL_ENDSTOPS)
272
     #if ENABLED(X_DUAL_ENDSTOPS)
304
                     decelerate_after,       // The point from where we need to start decelerating
304
                     decelerate_after,       // The point from where we need to start decelerating
305
                     step_event_count;       // The total event count for the current block
305
                     step_event_count;       // The total event count for the current block
306
 
306
 
307
-    #if EXTRUDERS > 1 || ENABLED(MIXING_EXTRUDER)
307
+    #if EITHER(HAS_MULTI_EXTRUDER, MIXING_EXTRUDER)
308
       static uint8_t stepper_extruder;
308
       static uint8_t stepper_extruder;
309
     #else
309
     #else
310
       static constexpr uint8_t stepper_extruder = 0;
310
       static constexpr uint8_t stepper_extruder = 0;
451
     // The last movement direction was not null on the specified axis. Note that motor direction is not necessarily the same.
451
     // The last movement direction was not null on the specified axis. Note that motor direction is not necessarily the same.
452
     FORCE_INLINE static bool axis_is_moving(const AxisEnum axis) { return TEST(axis_did_move, axis); }
452
     FORCE_INLINE static bool axis_is_moving(const AxisEnum axis) { return TEST(axis_did_move, axis); }
453
 
453
 
454
-    // The extruder associated to the last movement
455
-    FORCE_INLINE static uint8_t movement_extruder() {
456
-      return (EXTRUDERS > 1 && DISABLED(MIXING_EXTRUDER)) ? last_moved_extruder : 0;
457
-    }
458
-
459
     // Handle a triggered endstop
454
     // Handle a triggered endstop
460
     static void endstop_triggered(const AxisEnum axis);
455
     static void endstop_triggered(const AxisEnum axis);
461
 
456
 

+ 3
- 3
Marlin/src/module/tool_change.cpp Ver arquivo

36
 #define DEBUG_OUT ENABLED(DEBUG_TOOL_CHANGE)
36
 #define DEBUG_OUT ENABLED(DEBUG_TOOL_CHANGE)
37
 #include "../core/debug_out.h"
37
 #include "../core/debug_out.h"
38
 
38
 
39
-#if EXTRUDERS > 1
39
+#if HAS_MULTI_EXTRUDER
40
   toolchange_settings_t toolchange_settings;  // Initialized by settings.load()
40
   toolchange_settings_t toolchange_settings;  // Initialized by settings.load()
41
 #endif
41
 #endif
42
 
42
 
870
     if (new_tool) invalid_extruder_error(new_tool);
870
     if (new_tool) invalid_extruder_error(new_tool);
871
     return;
871
     return;
872
 
872
 
873
-  #else // EXTRUDERS > 1
873
+  #elif HAS_MULTI_EXTRUDER
874
 
874
 
875
     planner.synchronize();
875
     planner.synchronize();
876
 
876
 
1197
     SERIAL_ECHO_START();
1197
     SERIAL_ECHO_START();
1198
     SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(active_extruder));
1198
     SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(active_extruder));
1199
 
1199
 
1200
-  #endif // EXTRUDERS > 1
1200
+  #endif // HAS_MULTI_EXTRUDER
1201
 }
1201
 }
1202
 
1202
 
1203
 #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
1203
 #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)

+ 1
- 1
Marlin/src/module/tool_change.h Ver arquivo

24
 #include "../inc/MarlinConfigPre.h"
24
 #include "../inc/MarlinConfigPre.h"
25
 #include "../core/types.h"
25
 #include "../core/types.h"
26
 
26
 
27
-#if EXTRUDERS > 1
27
+#if HAS_MULTI_EXTRUDER
28
 
28
 
29
   typedef struct {
29
   typedef struct {
30
     #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
30
     #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)

+ 2
- 2
Marlin/src/pins/sensitive_pins.h Ver arquivo

354
     #endif
354
     #endif
355
   #endif
355
   #endif
356
 
356
 
357
-#elif EXTRUDERS > 1 || ENABLED(MIXING_EXTRUDER)
357
+#elif EITHER(HAS_MULTI_EXTRUDER, MIXING_EXTRUDER)
358
 
358
 
359
   #undef _E1_PINS
359
   #undef _E1_PINS
360
   #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, _E1_CS _E1_MS1 _E1_MS2 _E1_MS3
360
   #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, _E1_CS _E1_MS1 _E1_MS2 _E1_MS3
383
     #endif // EXTRUDERS > 3 || MIXING_EXTRUDER > 3
383
     #endif // EXTRUDERS > 3 || MIXING_EXTRUDER > 3
384
   #endif // EXTRUDERS > 2 || MIXING_EXTRUDER > 2
384
   #endif // EXTRUDERS > 2 || MIXING_EXTRUDER > 2
385
 
385
 
386
-#endif // EXTRUDERS > 1 || MIXING_EXTRUDER
386
+#endif // HAS_MULTI_EXTRUDER || MIXING_EXTRUDER
387
 
387
 
388
 //
388
 //
389
 // Heaters, Fans, Temp Sensors
389
 // Heaters, Fans, Temp Sensors

+ 0
- 3
buildroot/share/PlatformIO/scripts/common-dependencies.h Ver arquivo

91
 
91
 
92
 #if EXTRUDERS
92
 #if EXTRUDERS
93
   #define HAS_EXTRUDERS
93
   #define HAS_EXTRUDERS
94
-  #if EXTRUDERS > 1
95
-    #define HAS_MULTI_EXTRUDER
96
-  #endif
97
 #endif
94
 #endif
98
 
95
 
99
 #if HAS_LCD_MENU
96
 #if HAS_LCD_MENU

Carregando…
Cancelar
Salvar