Browse Source

Fix switching extruder

`DONT_SWITCH` got lost along the way. Replace it with `DO_SWITCH_EXTRUDER` and adjust the code.
GMagician 6 years ago
parent
commit
3c76bda2d8

+ 2
- 2
Marlin/src/Marlin.cpp View File

146
   #include "feature/fanmux.h"
146
   #include "feature/fanmux.h"
147
 #endif
147
 #endif
148
 
148
 
149
-#if (ENABLED(SWITCHING_EXTRUDER) && !DONT_SWITCH) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
149
+#if DO_SWITCH_EXTRUDER || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
150
   #include "module/tool_change.h"
150
   #include "module/tool_change.h"
151
 #endif
151
 #endif
152
 
152
 
864
     setup_endstop_interrupts();
864
     setup_endstop_interrupts();
865
   #endif
865
   #endif
866
 
866
 
867
-  #if ENABLED(SWITCHING_EXTRUDER) && !DONT_SWITCH
867
+  #if DO_SWITCH_EXTRUDER
868
     move_extruder_servo(0);  // Initialize extruder servo
868
     move_extruder_servo(0);  // Initialize extruder servo
869
   #endif
869
   #endif
870
 
870
 

+ 1
- 1
Marlin/src/gcode/config/M218.cpp View File

37
  *   T<tool>
37
  *   T<tool>
38
  *   X<xoffset>
38
  *   X<xoffset>
39
  *   Y<yoffset>
39
  *   Y<yoffset>
40
- *   Z<zoffset> - Available with DUAL_X_CARRIAGE and SWITCHING_NOZZLE
40
+ *   Z<zoffset> - Available with DUAL_X_CARRIAGE, SWITCHING_NOZZLE and PARKING_EXTRUDER
41
  */
41
  */
42
 void GcodeSuite::M218() {
42
 void GcodeSuite::M218() {
43
   if (get_target_extruder_from_command() || target_extruder == 0) return;
43
   if (get_target_extruder_from_command() || target_extruder == 0) return;

+ 2
- 0
Marlin/src/inc/Conditionals_LCD.h View File

445
   #define E_MANUAL        EXTRUDERS
445
   #define E_MANUAL        EXTRUDERS
446
 #endif
446
 #endif
447
 
447
 
448
+#define DO_SWITCH_EXTRUDER (ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR))
449
+
448
 /**
450
 /**
449
  * DISTINCT_E_FACTORS affects how some E factors are accessed
451
  * DISTINCT_E_FACTORS affects how some E factors are accessed
450
  */
452
  */

+ 1
- 1
Marlin/src/lcd/ultralcd.cpp View File

3270
     else
3270
     else
3271
       MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
3271
       MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
3272
 
3272
 
3273
-    #if ENABLED(SWITCHING_EXTRUDER)
3273
+    #if ENABLED(SWITCHING_EXTRUDER) || ENABLED(SWITCHING_NOZZLE)
3274
 
3274
 
3275
       #if EXTRUDERS == 4
3275
       #if EXTRUDERS == 4
3276
         switch (active_extruder) {
3276
         switch (active_extruder) {

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

2126
         SERIAL_ECHOPAIR_P(port, "  M218 T", (int)e);
2126
         SERIAL_ECHOPAIR_P(port, "  M218 T", (int)e);
2127
         SERIAL_ECHOPAIR_P(port, " X", LINEAR_UNIT(hotend_offset[X_AXIS][e]));
2127
         SERIAL_ECHOPAIR_P(port, " X", LINEAR_UNIT(hotend_offset[X_AXIS][e]));
2128
         SERIAL_ECHOPAIR_P(port, " Y", LINEAR_UNIT(hotend_offset[Y_AXIS][e]));
2128
         SERIAL_ECHOPAIR_P(port, " Y", LINEAR_UNIT(hotend_offset[Y_AXIS][e]));
2129
-        #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) ||ENABLED(PARKING_EXTRUDER)
2129
+        #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
2130
           SERIAL_ECHOPAIR_P(port, " Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e]));
2130
           SERIAL_ECHOPAIR_P(port, " Z", LINEAR_UNIT(hotend_offset[Z_AXIS][e]));
2131
         #endif
2131
         #endif
2132
         SERIAL_EOL_P(port);
2132
         SERIAL_EOL_P(port);

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

57
   #include "../feature/fanmux.h"
57
   #include "../feature/fanmux.h"
58
 #endif
58
 #endif
59
 
59
 
60
-#if ENABLED(SWITCHING_EXTRUDER)
60
+#if DO_SWITCH_EXTRUDER
61
 
61
 
62
   #if EXTRUDERS > 3
62
   #if EXTRUDERS > 3
63
     #define REQ_ANGLES 4
63
     #define REQ_ANGLES 4
347
 
347
 
348
 #endif // DUAL_X_CARRIAGE
348
 #endif // DUAL_X_CARRIAGE
349
 
349
 
350
-#define DO_SWITCH_EXTRUDER (SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR)
351
-
352
 /**
350
 /**
353
  * Perform a tool-change, which may result in moving the
351
  * Perform a tool-change, which may result in moving the
354
  * previous tool out of the way and the new tool into place.
352
  * previous tool out of the way and the new tool into place.

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

25
 
25
 
26
 #include "../inc/MarlinConfig.h"
26
 #include "../inc/MarlinConfig.h"
27
 
27
 
28
-#if ENABLED(SWITCHING_EXTRUDER)
28
+#if DO_SWITCH_EXTRUDER
29
   void move_extruder_servo(const uint8_t e);
29
   void move_extruder_servo(const uint8_t e);
30
 #endif
30
 #endif
31
 
31
 

Loading…
Cancel
Save