Browse Source

Merge pull request #6264 from thinkyhead/rc_five_extruders

Support up to 5 extruders in Marlin
Scott Lahteine 7 years ago
parent
commit
f8408036f2
68 changed files with 642 additions and 314 deletions
  1. 25
    3
      Marlin/Conditionals_post.h
  2. 4
    0
      Marlin/Configuration.h
  3. 1
    0
      Marlin/Configuration_adv.h
  4. 10
    0
      Marlin/Marlin.h
  5. 25
    9
      Marlin/Marlin_main.cpp
  6. 25
    4
      Marlin/SanityCheck.h
  7. 80
    74
      Marlin/configuration_store.cpp
  8. 2
    0
      Marlin/enum.h
  9. 3
    0
      Marlin/example_configurations/Cartesio/Configuration.h
  10. 1
    0
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  11. 4
    0
      Marlin/example_configurations/Felix/Configuration.h
  12. 1
    0
      Marlin/example_configurations/Felix/Configuration_adv.h
  13. 4
    0
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  14. 3
    0
      Marlin/example_configurations/Hephestos/Configuration.h
  15. 1
    0
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  16. 16
    12
      Marlin/example_configurations/Hephestos_2/Configuration.h
  17. 1
    0
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  18. 4
    0
      Marlin/example_configurations/K8200/Configuration.h
  19. 1
    0
      Marlin/example_configurations/K8200/Configuration_adv.h
  20. 4
    0
      Marlin/example_configurations/K8400/Configuration.h
  21. 1
    0
      Marlin/example_configurations/K8400/Configuration_adv.h
  22. 4
    0
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  23. 4
    0
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  24. 4
    0
      Marlin/example_configurations/RigidBot/Configuration.h
  25. 1
    0
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  26. 4
    0
      Marlin/example_configurations/SCARA/Configuration.h
  27. 1
    0
      Marlin/example_configurations/SCARA/Configuration_adv.h
  28. 3
    0
      Marlin/example_configurations/TAZ4/Configuration.h
  29. 1
    0
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  30. 4
    0
      Marlin/example_configurations/TinyBoy2/Configuration.h
  31. 1
    0
      Marlin/example_configurations/TinyBoy2/Configuration_adv.h
  32. 3
    0
      Marlin/example_configurations/WITBOX/Configuration.h
  33. 1
    0
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  34. 4
    0
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  35. 4
    0
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h
  36. 1
    0
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration_adv.h
  37. 4
    0
      Marlin/example_configurations/delta/generic/Configuration.h
  38. 1
    0
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  39. 4
    0
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  40. 1
    0
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  41. 4
    0
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  42. 1
    0
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  43. 4
    0
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  44. 1
    0
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  45. 4
    0
      Marlin/example_configurations/makibox/Configuration.h
  46. 1
    0
      Marlin/example_configurations/makibox/Configuration_adv.h
  47. 4
    0
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  48. 1
    0
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  49. 5
    0
      Marlin/language.h
  50. 6
    4
      Marlin/macros.h
  51. 15
    12
      Marlin/pins.h
  52. 2
    2
      Marlin/pins_AZTEEG_X3.h
  53. 4
    0
      Marlin/pins_AZTEEG_X3_PRO.h
  54. 2
    2
      Marlin/pins_BAM_DICE_DUE.h
  55. 2
    2
      Marlin/pins_FELIX2.h
  56. 2
    2
      Marlin/pins_MEGACONTROLLER.h
  57. 2
    2
      Marlin/pins_MINITRONICS.h
  58. 2
    2
      Marlin/pins_MKS_13.h
  59. 2
    2
      Marlin/pins_MKS_BASE.h
  60. 2
    2
      Marlin/pins_RUMBA.h
  61. 2
    2
      Marlin/pins_SAINSMART_2IN1.h
  62. 28
    5
      Marlin/planner.cpp
  63. 9
    1
      Marlin/stepper_indirection.h
  64. 129
    78
      Marlin/temperature.cpp
  65. 1
    1
      Marlin/temperature.h
  66. 4
    0
      Marlin/thermistortable_20.h
  67. 11
    1
      Marlin/thermistortables.h
  68. 126
    92
      Marlin/ultralcd.cpp

+ 25
- 3
Marlin/Conditionals_post.h View File

@@ -279,6 +279,18 @@
279 279
     #define HEATER_3_USES_THERMISTOR
280 280
   #endif
281 281
 
282
+  #if TEMP_SENSOR_4 <= -2
283
+    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_4"
284
+  #elif TEMP_SENSOR_4 == -1
285
+    #define HEATER_4_USES_AD595
286
+  #elif TEMP_SENSOR_4 == 0
287
+    #undef HEATER_4_MINTEMP
288
+    #undef HEATER_4_MAXTEMP
289
+  #elif TEMP_SENSOR_4 > 0
290
+    #define THERMISTORHEATER_4 TEMP_SENSOR_4
291
+    #define HEATER_4_USES_THERMISTOR
292
+  #endif
293
+
282 294
   #if TEMP_SENSOR_BED <= -2
283 295
     #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED"
284 296
   #elif TEMP_SENSOR_BED == -1
@@ -427,16 +439,19 @@
427 439
   #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2)
428 440
   #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2)
429 441
   #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0 && TEMP_SENSOR_3 > -2)
442
+  #define HAS_TEMP_4 (PIN_EXISTS(TEMP_4) && TEMP_SENSOR_4 != 0 && TEMP_SENSOR_4 > -2)
430 443
   #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
431 444
   #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
432 445
   #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
433 446
   #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
434 447
   #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
448
+  #define HAS_HEATER_4 (PIN_EXISTS(HEATER_4))
435 449
   #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
436 450
   #define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN))
437 451
   #define HAS_AUTO_FAN_1 (HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN))
438 452
   #define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN))
439 453
   #define HAS_AUTO_FAN_3 (HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN))
454
+  #define HAS_AUTO_FAN_4 (HOTENDS > 4 && PIN_EXISTS(E4_AUTO_FAN))
440 455
   #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
441 456
   #define AUTO_1_IS_0 (E1_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
442 457
   #define AUTO_2_IS_0 (E2_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
@@ -444,6 +459,10 @@
444 459
   #define AUTO_3_IS_0 (E3_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
445 460
   #define AUTO_3_IS_1 (E3_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
446 461
   #define AUTO_3_IS_2 (E3_AUTO_FAN_PIN == E2_AUTO_FAN_PIN)
462
+  #define AUTO_4_IS_0 (E4_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
463
+  #define AUTO_4_IS_1 (E4_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
464
+  #define AUTO_4_IS_2 (E4_AUTO_FAN_PIN == E2_AUTO_FAN_PIN)
465
+  #define AUTO_4_IS_3 (E4_AUTO_FAN_PIN == E3_AUTO_FAN_PIN)
447 466
   #define HAS_FAN0 (PIN_EXISTS(FAN))
448 467
   #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLERFAN_PIN != FAN1_PIN && E0_AUTO_FAN_PIN != FAN1_PIN && E1_AUTO_FAN_PIN != FAN1_PIN && E2_AUTO_FAN_PIN != FAN1_PIN && E3_AUTO_FAN_PIN != FAN1_PIN)
449 468
   #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLERFAN_PIN != FAN2_PIN && E0_AUTO_FAN_PIN != FAN2_PIN && E1_AUTO_FAN_PIN != FAN2_PIN && E2_AUTO_FAN_PIN != FAN2_PIN && E3_AUTO_FAN_PIN != FAN2_PIN)
@@ -543,9 +562,12 @@
543 562
       #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v)
544 563
       #if HOTENDS > 3
545 564
         #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, v)
546
-      #endif
547
-    #endif
548
-  #endif
565
+        #if HOTENDS > 4
566
+          #define WRITE_HEATER_4(v) WRITE(HEATER_4_PIN, v)
567
+        #endif // HOTENDS > 4
568
+      #endif // HOTENDS > 3
569
+    #endif // HOTENDS > 2
570
+  #endif // HOTENDS > 1
549 571
   #if ENABLED(HEATERS_PARALLEL)
550 572
     #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); }
551 573
   #else

+ 4
- 0
Marlin/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 0
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 0
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -752,6 +755,7 @@
752 755
 #define INVERT_E1_DIR false
753 756
 #define INVERT_E2_DIR false
754 757
 #define INVERT_E3_DIR false
758
+#define INVERT_E4_DIR false
755 759
 
756 760
 // @section homing
757 761
 

+ 1
- 0
Marlin/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 10
- 0
Marlin/Marlin.h View File

@@ -113,6 +113,8 @@ void manage_inactivity(bool ignore_stepper_queue = false);
113 113
   #define disable_e2() NOOP
114 114
   #define  enable_e3() NOOP
115 115
   #define disable_e3() NOOP
116
+  #define  enable_e4() NOOP
117
+  #define disable_e4() NOOP
116 118
 
117 119
 #else // !MIXING_EXTRUDER
118 120
 
@@ -148,6 +150,14 @@ void manage_inactivity(bool ignore_stepper_queue = false);
148 150
     #define disable_e3() NOOP
149 151
   #endif
150 152
 
153
+  #if E_STEPPERS > 4 && HAS_E4_ENABLE
154
+    #define  enable_e4() E4_ENABLE_WRITE( E_ENABLE_ON)
155
+    #define disable_e4() E4_ENABLE_WRITE(!E_ENABLE_ON)
156
+  #else
157
+    #define  enable_e4() NOOP
158
+    #define disable_e4() NOOP
159
+  #endif
160
+
151 161
 #endif // !MIXING_EXTRUDER
152 162
 
153 163
 #if ENABLED(G38_PROBE_TARGET)

+ 25
- 9
Marlin/Marlin_main.cpp View File

@@ -10704,9 +10704,12 @@ void prepare_move_to_destination() {
10704 10704
               || E2_ENABLE_READ == E_ENABLE_ON
10705 10705
               #if E_STEPPERS > 3
10706 10706
                 || E3_ENABLE_READ == E_ENABLE_ON
10707
-              #endif
10708
-            #endif
10709
-          #endif
10707
+                #if E_STEPPERS > 4
10708
+                  || E4_ENABLE_READ == E_ENABLE_ON
10709
+                #endif // E_STEPPERS > 4
10710
+              #endif // E_STEPPERS > 3
10711
+            #endif // E_STEPPERS > 2
10712
+          #endif // E_STEPPERS > 1
10710 10713
       ) {
10711 10714
         lastMotorOn = ms; //... set time to NOW so the fan will turn on
10712 10715
       }
@@ -10927,6 +10930,7 @@ void enable_all_steppers() {
10927 10930
   enable_e1();
10928 10931
   enable_e2();
10929 10932
   enable_e3();
10933
+  enable_e4();
10930 10934
 }
10931 10935
 
10932 10936
 void disable_e_steppers() {
@@ -10934,6 +10938,7 @@ void disable_e_steppers() {
10934 10938
   disable_e1();
10935 10939
   disable_e2();
10936 10940
   disable_e3();
10941
+  disable_e4();
10937 10942
 }
10938 10943
 
10939 10944
 void disable_all_steppers() {
@@ -11132,9 +11137,15 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
11132 11137
                   oldstatus = E3_ENABLE_READ;
11133 11138
                   enable_e3();
11134 11139
                   break;
11135
-              #endif
11136
-            #endif
11137
-          #endif
11140
+                #if E_STEPPERS > 4
11141
+                  case 4:
11142
+                    oldstatus = E4_ENABLE_READ;
11143
+                    enable_e4();
11144
+                    break;
11145
+                #endif // E_STEPPERS > 4
11146
+              #endif // E_STEPPERS > 3
11147
+            #endif // E_STEPPERS > 2
11148
+          #endif // E_STEPPERS > 1
11138 11149
         }
11139 11150
       #endif // !SWITCHING_EXTRUDER
11140 11151
 
@@ -11165,9 +11176,14 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
11165 11176
                 case 3:
11166 11177
                   E3_ENABLE_WRITE(oldstatus);
11167 11178
                   break;
11168
-              #endif
11169
-            #endif
11170
-          #endif
11179
+                #if E_STEPPERS > 4
11180
+                  case 4:
11181
+                    E4_ENABLE_WRITE(oldstatus);
11182
+                    break;
11183
+                #endif // E_STEPPERS > 4
11184
+              #endif // E_STEPPERS > 3
11185
+            #endif // E_STEPPERS > 2
11186
+          #endif // E_STEPPERS > 1
11171 11187
         }
11172 11188
       #endif // !SWITCHING_EXTRUDER
11173 11189
     }

+ 25
- 4
Marlin/SanityCheck.h View File

@@ -309,8 +309,8 @@
309 309
  */
310 310
 #if EXTRUDERS > 1
311 311
 
312
-  #if EXTRUDERS > 4
313
-    #error "The maximum number of EXTRUDERS in Marlin is 4."
312
+  #if EXTRUDERS > 5
313
+    #error "Marlin supports a maximum of 5 EXTRUDERS."
314 314
   #endif
315 315
 
316 316
   #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
@@ -800,19 +800,34 @@ static_assert(1 >= 0
800 800
     #endif
801 801
     #if HOTENDS > 3
802 802
       #if TEMP_SENSOR_3 == 0
803
-        #error "TEMP_SENSOR_3 is required with 4 HOTENDS."
803
+        #error "TEMP_SENSOR_3 is required with 4 or more HOTENDS."
804 804
       #elif !HAS_HEATER_3
805 805
         #error "HEATER_3_PIN not defined for this board."
806 806
       #elif !PIN_EXISTS(TEMP_3)
807 807
         #error "TEMP_3_PIN not defined for this board."
808 808
       #endif
809
+      #if HOTENDS > 4
810
+        #if TEMP_SENSOR_4 == 0
811
+          #error "TEMP_SENSOR_4 is required with 5 HOTENDS."
812
+        #elif !HAS_HEATER_4
813
+          #error "HEATER_4_PIN not defined for this board."
814
+        #elif !PIN_EXISTS(TEMP_4)
815
+          #error "TEMP_4_PIN not defined for this board."
816
+        #endif
817
+      #elif TEMP_SENSOR_4 != 0
818
+        #error "TEMP_SENSOR_4 shouldn't be set with only 4 extruders."
819
+      #endif
809 820
     #elif TEMP_SENSOR_3 != 0
810 821
       #error "TEMP_SENSOR_3 shouldn't be set with only 3 extruders."
822
+    #elif TEMP_SENSOR_4 != 0
823
+      #error "TEMP_SENSOR_4 shouldn't be set with only 3 extruders."
811 824
     #endif
812 825
   #elif TEMP_SENSOR_2 != 0
813 826
     #error "TEMP_SENSOR_2 shouldn't be set with only 2 extruders."
814 827
   #elif TEMP_SENSOR_3 != 0
815 828
     #error "TEMP_SENSOR_3 shouldn't be set with only 2 extruders."
829
+  #elif TEMP_SENSOR_4 != 0
830
+    #error "TEMP_SENSOR_4 shouldn't be set with only 2 extruders."
816 831
   #endif
817 832
 #elif TEMP_SENSOR_1 != 0 && DISABLED(TEMP_SENSOR_1_AS_REDUNDANT)
818 833
   #error "TEMP_SENSOR_1 shouldn't be set with only 1 extruder."
@@ -820,6 +835,8 @@ static_assert(1 >= 0
820 835
   #error "TEMP_SENSOR_2 shouldn't be set with only 1 extruder."
821 836
 #elif TEMP_SENSOR_3 != 0
822 837
   #error "TEMP_SENSOR_3 shouldn't be set with only 1 extruder."
838
+#elif TEMP_SENSOR_4 != 0
839
+  #error "TEMP_SENSOR_4 shouldn't be set with only 1 extruder."
823 840
 #endif
824 841
 
825 842
 #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0
@@ -853,7 +870,11 @@ static_assert(1 >= 0
853 870
 /**
854 871
  * Test Extruder Pins
855 872
  */
856
-#if EXTRUDERS > 3
873
+#if EXTRUDERS > 4
874
+  #if !PIN_EXISTS(E4_STEP) || !PIN_EXISTS(E4_DIR) || !PIN_EXISTS(E4_ENABLE)
875
+    #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
876
+  #endif
877
+#elif EXTRUDERS > 3
857 878
   #if !PIN_EXISTS(E3_STEP) || !PIN_EXISTS(E3_DIR) || !PIN_EXISTS(E3_ENABLE)
858 879
     #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
859 880
   #endif

+ 80
- 74
Marlin/configuration_store.cpp View File

@@ -36,7 +36,7 @@
36 36
  *
37 37
  */
38 38
 
39
-#define EEPROM_VERSION "V31"
39
+#define EEPROM_VERSION "V32"
40 40
 
41 41
 // Change EEPROM version if these are changed:
42 42
 #define EEPROM_OFFSET 100
@@ -44,45 +44,45 @@
44 44
 /**
45 45
  * V31 EEPROM Layout:
46 46
  *
47
- *  100  Version                                   (char x4)
48
- *  104  EEPROM Checksum                           (uint16_t)
47
+ *  100  Version                                    (char x4)
48
+ *  104  EEPROM Checksum                            (uint16_t)
49 49
  *
50 50
  *  106            E_STEPPERS (uint8_t)
51
- *  107  M92 XYZE  planner.axis_steps_per_mm (float x4 ... x7)
52
- *  123  M203 XYZE planner.max_feedrate_mm_s (float x4 ... x7)
53
- *  139  M201 XYZE planner.max_acceleration_mm_per_s2 (uint32_t x4 ... x7)
54
- *  155  M204 P    planner.acceleration (float)
55
- *  159  M204 R    planner.retract_acceleration (float)
56
- *  163  M204 T    planner.travel_acceleration (float)
57
- *  167  M205 S    planner.min_feedrate_mm_s (float)
51
+ *  107  M92 XYZE  planner.axis_steps_per_mm        (float x4 ... x8)
52
+ *  123  M203 XYZE planner.max_feedrate_mm_s        (float x4 ... x8)
53
+ *  139  M201 XYZE planner.max_acceleration_mm_per_s2 (uint32_t x4 ... x8)
54
+ *  155  M204 P    planner.acceleration             (float)
55
+ *  159  M204 R    planner.retract_acceleration     (float)
56
+ *  163  M204 T    planner.travel_acceleration      (float)
57
+ *  167  M205 S    planner.min_feedrate_mm_s        (float)
58 58
  *  171  M205 T    planner.min_travel_feedrate_mm_s (float)
59
- *  175  M205 B    planner.min_segment_time (ulong)
60
- *  179  M205 X    planner.max_jerk[X_AXIS] (float)
61
- *  183  M205 Y    planner.max_jerk[Y_AXIS] (float)
62
- *  187  M205 Z    planner.max_jerk[Z_AXIS] (float)
63
- *  191  M205 E    planner.max_jerk[E_AXIS] (float)
64
- *  195  M206 XYZ  home_offset (float x3)
65
- *  207  M218 XYZ  hotend_offset (float x3 per additional hotend)
59
+ *  175  M205 B    planner.min_segment_time         (ulong)
60
+ *  179  M205 X    planner.max_jerk[X_AXIS]         (float)
61
+ *  183  M205 Y    planner.max_jerk[Y_AXIS]         (float)
62
+ *  187  M205 Z    planner.max_jerk[Z_AXIS]         (float)
63
+ *  191  M205 E    planner.max_jerk[E_AXIS]         (float)
64
+ *  195  M206 XYZ  home_offset                      (float x3)
65
+ *  207  M218 XYZ  hotend_offset                    (float x3 per additional hotend)
66 66
  *
67
- * Mesh bed leveling:
68
- *  219  M420 S    from mbl.status (bool)
69
- *  220            mbl.z_offset (float)
70
- *  224            GRID_MAX_POINTS_X (uint8 as set in firmware)
71
- *  225            GRID_MAX_POINTS_Y (uint8 as set in firmware)
72
- *  226 G29 S3 XYZ z_values[][] (float x9, by default, up to float x 81) +288
67
+ * Mesh bed leveling:                               43 bytes
68
+ *  219  M420 S    from mbl.status                  (bool)
69
+ *  220            mbl.z_offset                     (float)
70
+ *  224            GRID_MAX_POINTS_X                (uint8_t)
71
+ *  225            GRID_MAX_POINTS_Y                (uint8_t)
72
+ *  226 G29 S3 XYZ z_values[][]                     (float x9, up to float x 81) +288
73 73
  *
74
- * AUTO BED LEVELING
75
- *  262  M851      zprobe_zoffset (float)
74
+ * AUTO BED LEVELING                                4 bytes
75
+ *  262  M851      zprobe_zoffset                   (float)
76 76
  *
77
- * ABL_PLANAR (or placeholder):                    36 bytes
78
- *  266            planner.bed_level_matrix        (matrix_3x3 = float x9)
77
+ * ABL_PLANAR (or placeholder):                     36 bytes
78
+ *  266            planner.bed_level_matrix         (matrix_3x3 = float x9)
79 79
  *
80
- * AUTO_BED_LEVELING_BILINEAR (or placeholder):    47 bytes
81
- *  302            GRID_MAX_POINTS_X               (uint8_t)
82
- *  303            GRID_MAX_POINTS_Y               (uint8_t)
83
- *  304            bilinear_grid_spacing           (int x2)   from G29: (B-F)/X, (R-L)/Y
84
- *  308  G29 L F   bilinear_start                  (int x2)
85
- *  312            bed_level_grid[][]              (float x9, up to float x256) +988
80
+ * AUTO_BED_LEVELING_BILINEAR (or placeholder):     47 bytes
81
+ *  302            GRID_MAX_POINTS_X                (uint8_t)
82
+ *  303            GRID_MAX_POINTS_Y                (uint8_t)
83
+ *  304            bilinear_grid_spacing            (int x2)
84
+ *  308  G29 L F   bilinear_start                   (int x2)
85
+ *  312            bed_level_grid[][]               (float x9, up to float x256) +988
86 86
  *
87 87
  * DELTA (if deltabot):                             48 bytes
88 88
  *  348  M666 XYZ  endstop_adj                      (float x3)
@@ -96,56 +96,57 @@
96 96
  *  388  M665 J    delta_tower_angle_trim[B]        (float)
97 97
  *  392  M665 K    delta_tower_angle_trim[C]        (float)
98 98
  *
99
- * Z_DUAL_ENDSTOPS (if not deltabot):              48 bytes
100
- *  348  M666 Z    z_endstop_adj                   (float)
101
- *  ---            dummy data                      (float x11)
99
+ * Z_DUAL_ENDSTOPS (if not deltabot):               48 bytes
100
+ *  348  M666 Z    z_endstop_adj                    (float)
101
+ *  ---            dummy data                       (float x11)
102 102
  *
103
- * ULTIPANEL:                                      6 bytes
104
- *  396  M145 S0 H lcd_preheat_hotend_temp         (int x2)
105
- *  400  M145 S0 B lcd_preheat_bed_temp            (int x2)
106
- *  404  M145 S0 F lcd_preheat_fan_speed           (int x2)
103
+ * ULTIPANEL:                                       6 bytes
104
+ *  396  M145 S0 H lcd_preheat_hotend_temp          (int x2)
105
+ *  400  M145 S0 B lcd_preheat_bed_temp             (int x2)
106
+ *  404  M145 S0 F lcd_preheat_fan_speed            (int x2)
107 107
  *
108
- * PIDTEMP:                                        66 bytes
109
- *  408  M301 E0 PIDC  Kp[0], Ki[0], Kd[0], Kc[0]  (float x4)
110
- *  424  M301 E1 PIDC  Kp[1], Ki[1], Kd[1], Kc[1]  (float x4)
111
- *  440  M301 E2 PIDC  Kp[2], Ki[2], Kd[2], Kc[2]  (float x4)
112
- *  456  M301 E3 PIDC  Kp[3], Ki[3], Kd[3], Kc[3]  (float x4)
113
- *  472  M301 L        lpq_len                     (int)
108
+ * PIDTEMP:                                         66 bytes
109
+ *  408  M301 E0 PIDC  Kp[0], Ki[0], Kd[0], Kc[0]   (float x4)
110
+ *  424  M301 E1 PIDC  Kp[1], Ki[1], Kd[1], Kc[1]   (float x4)
111
+ *  440  M301 E2 PIDC  Kp[2], Ki[2], Kd[2], Kc[2]   (float x4)
112
+ *  456  M301 E3 PIDC  Kp[3], Ki[3], Kd[3], Kc[3]   (float x4)
113
+ *  472  M301 E4 PIDC  Kp[3], Ki[3], Kd[3], Kc[3]   (float x4)
114
+ *  488  M301 L        lpq_len                      (int)
114 115
  *
115 116
  * PIDTEMPBED:                                      12 bytes
116
- *  474  M304 PID  thermalManager.bedKp, .bedKi, .bedKd (float x3)
117
+ *  490  M304 PID  thermalManager.bedKp, .bedKi, .bedKd (float x3)
117 118
  *
118 119
  * DOGLCD:                                          2 bytes
119
- *  486  M250 C    lcd_contrast                     (int)
120
+ *  502  M250 C    lcd_contrast                     (int)
120 121
  *
121 122
  * FWRETRACT:                                       29 bytes
122
- *  488  M209 S    autoretract_enabled              (bool)
123
- *  489  M207 S    retract_length                   (float)
124
- *  493  M207 W    retract_length_swap              (float)
125
- *  497  M207 F    retract_feedrate_mm_s            (float)
126
- *  501  M207 Z    retract_zlift                    (float)
127
- *  505  M208 S    retract_recover_length           (float)
128
- *  509  M208 W    retract_recover_length_swap      (float)
129
- *  513  M208 F    retract_recover_feedrate_mm_s    (float)
123
+ *  504  M209 S    autoretract_enabled              (bool)
124
+ *  505  M207 S    retract_length                   (float)
125
+ *  509  M207 W    retract_length_swap              (float)
126
+ *  513  M207 F    retract_feedrate_mm_s            (float)
127
+ *  517  M207 Z    retract_zlift                    (float)
128
+ *  521  M208 S    retract_recover_length           (float)
129
+ *  525  M208 W    retract_recover_length_swap      (float)
130
+ *  529  M208 F    retract_recover_feedrate_mm_s    (float)
130 131
  *
131
- * Volumetric Extrusion:                            17 bytes
132
- *  517  M200 D    volumetric_enabled               (bool)
133
- *  518  M200 T D  filament_size                    (float x4) (T0..3)
132
+ * Volumetric Extrusion:                            21 bytes
133
+ *  533  M200 D    volumetric_enabled               (bool)
134
+ *  534  M200 T D  filament_size                    (float x5) (T0..3)
134 135
  *
135 136
  * TMC2130 Stepper Current:                         20 bytes
136
- *  534  M906 X    stepperX current                 (uint16_t)
137
- *  536  M906 Y    stepperY current                 (uint16_t)
138
- *  538  M906 Z    stepperZ current                 (uint16_t)
139
- *  540  M906 X2   stepperX2 current                (uint16_t)
140
- *  542  M906 Y2   stepperY2 current                (uint16_t)
141
- *  544  M906 Z2   stepperZ2 current                (uint16_t)
142
- *  546  M906 E0   stepperE0 current                (uint16_t)
143
- *  548  M906 E1   stepperE1 current                (uint16_t)
144
- *  550  M906 E2   stepperE2 current                (uint16_t)
145
- *  552  M906 E3   stepperE3 current                (uint16_t)
137
+ *  554  M906 X    stepperX current                 (uint16_t)
138
+ *  556  M906 Y    stepperY current                 (uint16_t)
139
+ *  558  M906 Z    stepperZ current                 (uint16_t)
140
+ *  560  M906 X2   stepperX2 current                (uint16_t)
141
+ *  562  M906 Y2   stepperY2 current                (uint16_t)
142
+ *  564  M906 Z2   stepperZ2 current                (uint16_t)
143
+ *  566  M906 E0   stepperE0 current                (uint16_t)
144
+ *  568  M906 E1   stepperE1 current                (uint16_t)
145
+ *  570  M906 E2   stepperE2 current                (uint16_t)
146
+ *  572  M906 E3   stepperE3 current                (uint16_t)
146 147
  *
147
- *  554                                Minimum end-point
148
- * 1875 (554 + 36 + 9 + 288 + 988)     Maximum end-point
148
+ *  574                                Minimum end-point
149
+ * 1895 (574 + 36 + 9 + 288 + 988)     Maximum end-point
149 150
  *
150 151
  */
151 152
 #include "Marlin.h"
@@ -1433,9 +1434,14 @@ void Config_ResetDefault() {
1433 1434
           CONFIG_ECHO_START;
1434 1435
           SERIAL_ECHOPAIR("  M200 T3 D", filament_size[3]);
1435 1436
           SERIAL_EOL;
1436
-        #endif
1437
-      #endif
1438
-    #endif
1437
+          #if EXTRUDERS > 4
1438
+            CONFIG_ECHO_START;
1439
+            SERIAL_ECHOPAIR("  M200 T4 D", filament_size[4]);
1440
+            SERIAL_EOL;
1441
+          #endif // EXTRUDERS > 4
1442
+        #endif // EXTRUDERS > 3
1443
+      #endif // EXTRUDERS > 2
1444
+    #endif // EXTRUDERS > 1
1439 1445
 
1440 1446
     if (!volumetric_enabled) {
1441 1447
       CONFIG_ECHO_START;

+ 2
- 0
Marlin/enum.h View File

@@ -106,6 +106,8 @@ enum TempState {
106 106
   MeasureTemp_2,
107 107
   PrepareTemp_3,
108 108
   MeasureTemp_3,
109
+  PrepareTemp_4,
110
+  MeasureTemp_4,
109 111
   Prepare_FILWIDTH,
110 112
   Measure_FILWIDTH,
111 113
   StartupDelay // Startup, delay initial temp reading a tiny bit so the hardware can settle

+ 3
- 0
Marlin/example_configurations/Cartesio/Configuration.h View File

@@ -255,6 +255,7 @@
255 255
 #define TEMP_SENSOR_1 -1
256 256
 #define TEMP_SENSOR_2 1
257 257
 #define TEMP_SENSOR_3 0
258
+#define TEMP_SENSOR_4 0
258 259
 #define TEMP_SENSOR_BED 1
259 260
 
260 261
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -283,6 +284,7 @@
283 284
 #define HEATER_1_MINTEMP 5
284 285
 #define HEATER_2_MINTEMP 5
285 286
 #define HEATER_3_MINTEMP 5
287
+#define HEATER_4_MINTEMP 5
286 288
 #define BED_MINTEMP 5
287 289
 
288 290
 // When temperature exceeds max temp, your heater will be switched off.
@@ -752,6 +754,7 @@
752 754
 #define INVERT_E1_DIR false
753 755
 #define INVERT_E2_DIR false
754 756
 #define INVERT_E3_DIR false
757
+#define INVERT_E4_DIR false
755 758
 
756 759
 // @section homing
757 760
 

+ 1
- 0
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 //#define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 35
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 4
- 0
Marlin/example_configurations/Felix/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 0
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 1
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -735,6 +738,7 @@
735 738
 #define INVERT_E1_DIR false
736 739
 #define INVERT_E2_DIR false
737 740
 #define INVERT_E3_DIR false
741
+#define INVERT_E4_DIR false
738 742
 
739 743
 // @section homing
740 744
 

+ 1
- 0
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 4
- 0
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 1
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 1
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -735,6 +738,7 @@
735 738
 #define INVERT_E1_DIR true
736 739
 #define INVERT_E2_DIR false
737 740
 #define INVERT_E3_DIR false
741
+#define INVERT_E4_DIR false
738 742
 
739 743
 // @section homing
740 744
 

+ 3
- 0
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -257,6 +257,7 @@
257 257
 #define TEMP_SENSOR_1 0
258 258
 #define TEMP_SENSOR_2 0
259 259
 #define TEMP_SENSOR_3 0
260
+#define TEMP_SENSOR_4 0
260 261
 #define TEMP_SENSOR_BED 0
261 262
 
262 263
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -285,6 +286,7 @@
285 286
 #define HEATER_1_MINTEMP 5
286 287
 #define HEATER_2_MINTEMP 5
287 288
 #define HEATER_3_MINTEMP 5
289
+#define HEATER_4_MINTEMP 5
288 290
 #define BED_MINTEMP 5
289 291
 
290 292
 // When temperature exceeds max temp, your heater will be switched off.
@@ -744,6 +746,7 @@
744 746
 #define INVERT_E1_DIR false
745 747
 #define INVERT_E2_DIR false
746 748
 #define INVERT_E3_DIR false
749
+#define INVERT_E4_DIR false
747 750
 
748 751
 // @section homing
749 752
 

+ 1
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 16
- 12
Marlin/example_configurations/Hephestos_2/Configuration.h View File

@@ -250,10 +250,11 @@
250 250
  *
251 251
  * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950  1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
252 252
  */
253
-#define TEMP_SENSOR_0   70
254
-#define TEMP_SENSOR_1   0
255
-#define TEMP_SENSOR_2   0
256
-#define TEMP_SENSOR_3   0
253
+#define TEMP_SENSOR_0 70
254
+#define TEMP_SENSOR_1 0
255
+#define TEMP_SENSOR_2 0
256
+#define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 0
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -279,19 +280,21 @@
279 280
 // to check that the wiring to the thermistor is not broken.
280 281
 // Otherwise this would lead to the heater being powered on all the time.
281 282
 #define HEATER_0_MINTEMP 15
282
-//#define HEATER_1_MINTEMP 5
283
-//#define HEATER_2_MINTEMP 5
284
-//#define HEATER_3_MINTEMP 5
285
-//#define BED_MINTEMP 5
283
+#define HEATER_1_MINTEMP 5
284
+#define HEATER_2_MINTEMP 5
285
+#define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
287
+#define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
288 290
 // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
289 291
 // You should use MINTEMP for thermistor short/failure protection.
290 292
 #define HEATER_0_MAXTEMP 250
291
-//#define HEATER_1_MAXTEMP 275
292
-//#define HEATER_2_MAXTEMP 275
293
-//#define HEATER_3_MAXTEMP 275
294
-//#define BED_MAXTEMP 150
293
+#define HEATER_1_MAXTEMP 275
294
+#define HEATER_2_MAXTEMP 275
295
+#define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
297
+#define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
297 300
 //============================= PID Settings ================================
@@ -746,6 +749,7 @@
746 749
 #define INVERT_E1_DIR false
747 750
 #define INVERT_E2_DIR false
748 751
 #define INVERT_E3_DIR false
752
+#define INVERT_E4_DIR false
749 753
 
750 754
 // @section homing
751 755
 

+ 1
- 0
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 //#define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 4
- 0
Marlin/example_configurations/K8200/Configuration.h View File

@@ -274,6 +274,7 @@
274 274
 #define TEMP_SENSOR_1 0
275 275
 #define TEMP_SENSOR_2 0
276 276
 #define TEMP_SENSOR_3 0
277
+#define TEMP_SENSOR_4 0
277 278
 #define TEMP_SENSOR_BED 5
278 279
 
279 280
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -302,6 +303,7 @@
302 303
 #define HEATER_1_MINTEMP 5
303 304
 #define HEATER_2_MINTEMP 5
304 305
 #define HEATER_3_MINTEMP 5
306
+#define HEATER_4_MINTEMP 5
305 307
 #define BED_MINTEMP 5
306 308
 
307 309
 // When temperature exceeds max temp, your heater will be switched off.
@@ -311,6 +313,7 @@
311 313
 #define HEATER_1_MAXTEMP 275
312 314
 #define HEATER_2_MAXTEMP 275
313 315
 #define HEATER_3_MAXTEMP 275
316
+#define HEATER_4_MAXTEMP 275
314 317
 #define BED_MAXTEMP 150
315 318
 
316 319
 //===========================================================================
@@ -780,6 +783,7 @@
780 783
 #define INVERT_E1_DIR true
781 784
 #define INVERT_E2_DIR true
782 785
 #define INVERT_E3_DIR true
786
+#define INVERT_E4_DIR true
783 787
 
784 788
 // @section homing
785 789
 // K8200: it is usual to have clamps for the glass plate on the heatbed

+ 1
- 0
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -234,6 +234,7 @@
234 234
 #define E1_AUTO_FAN_PIN -1
235 235
 #define E2_AUTO_FAN_PIN -1
236 236
 #define E3_AUTO_FAN_PIN -1
237
+#define E4_AUTO_FAN_PIN -1
237 238
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
238 239
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
239 240
 

+ 4
- 0
Marlin/example_configurations/K8400/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 0
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 0
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -752,6 +755,7 @@
752 755
 #define INVERT_E1_DIR true
753 756
 #define INVERT_E2_DIR false
754 757
 #define INVERT_E3_DIR false
758
+#define INVERT_E4_DIR false
755 759
 
756 760
 // @section homing
757 761
 

+ 1
- 0
Marlin/example_configurations/K8400/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 4
- 0
Marlin/example_configurations/K8400/Dual-head/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 5
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 0
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -752,6 +755,7 @@
752 755
 #define INVERT_E1_DIR true
753 756
 #define INVERT_E2_DIR false
754 757
 #define INVERT_E3_DIR false
758
+#define INVERT_E4_DIR false
755 759
 
756 760
 // @section homing
757 761
 

+ 4
- 0
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 0
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 1
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -752,6 +755,7 @@
752 755
 #define INVERT_E1_DIR false
753 756
 #define INVERT_E2_DIR false
754 757
 #define INVERT_E3_DIR false
758
+#define INVERT_E4_DIR false
755 759
 
756 760
 // @section homing
757 761
 

+ 4
- 0
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -257,6 +257,7 @@
257 257
 #define TEMP_SENSOR_1 0
258 258
 #define TEMP_SENSOR_2 0
259 259
 #define TEMP_SENSOR_3 0
260
+#define TEMP_SENSOR_4 0
260 261
 #define TEMP_SENSOR_BED 1
261 262
 
262 263
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -285,6 +286,7 @@
285 286
 #define HEATER_1_MINTEMP 5
286 287
 #define HEATER_2_MINTEMP 5
287 288
 #define HEATER_3_MINTEMP 5
289
+#define HEATER_4_MINTEMP 5
288 290
 #define BED_MINTEMP 5
289 291
 
290 292
 // When temperature exceeds max temp, your heater will be switched off.
@@ -294,6 +296,7 @@
294 296
 #define HEATER_1_MAXTEMP 275
295 297
 #define HEATER_2_MAXTEMP 275
296 298
 #define HEATER_3_MAXTEMP 275
299
+#define HEATER_4_MAXTEMP 275
297 300
 #define BED_MAXTEMP 150
298 301
 
299 302
 //===========================================================================
@@ -751,6 +754,7 @@
751 754
 #define INVERT_E1_DIR true
752 755
 #define INVERT_E2_DIR false
753 756
 #define INVERT_E3_DIR false
757
+#define INVERT_E4_DIR false
754 758
 
755 759
 // @section homing
756 760
 

+ 1
- 0
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 4
- 0
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -286,6 +286,7 @@
286 286
 #define TEMP_SENSOR_1 0
287 287
 #define TEMP_SENSOR_2 0
288 288
 #define TEMP_SENSOR_3 0
289
+#define TEMP_SENSOR_4 0
289 290
 #define TEMP_SENSOR_BED 1
290 291
 
291 292
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -314,6 +315,7 @@
314 315
 #define HEATER_1_MINTEMP 5
315 316
 #define HEATER_2_MINTEMP 5
316 317
 #define HEATER_3_MINTEMP 5
318
+#define HEATER_4_MINTEMP 5
317 319
 #define BED_MINTEMP 5
318 320
 
319 321
 // When temperature exceeds max temp, your heater will be switched off.
@@ -323,6 +325,7 @@
323 325
 #define HEATER_1_MAXTEMP 275
324 326
 #define HEATER_2_MAXTEMP 275
325 327
 #define HEATER_3_MAXTEMP 275
328
+#define HEATER_4_MAXTEMP 275
326 329
 #define BED_MAXTEMP 150
327 330
 
328 331
 //===========================================================================
@@ -767,6 +770,7 @@
767 770
 #define INVERT_E1_DIR false
768 771
 #define INVERT_E2_DIR false
769 772
 #define INVERT_E3_DIR false
773
+#define INVERT_E4_DIR false
770 774
 
771 775
 // @section homing
772 776
 

+ 1
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 3
- 0
Marlin/example_configurations/TAZ4/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 7
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 7
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -773,6 +775,7 @@
773 775
 #define INVERT_E1_DIR true
774 776
 #define INVERT_E2_DIR true
775 777
 #define INVERT_E3_DIR true
778
+#define INVERT_E4_DIR true
776 779
 
777 780
 // @section homing
778 781
 

+ 1
- 0
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

@@ -229,6 +229,7 @@
229 229
 #define E1_AUTO_FAN_PIN -1
230 230
 #define E2_AUTO_FAN_PIN -1
231 231
 #define E3_AUTO_FAN_PIN -1
232
+#define E4_AUTO_FAN_PIN -1
232 233
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
233 234
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
234 235
 

+ 4
- 0
Marlin/example_configurations/TinyBoy2/Configuration.h View File

@@ -276,6 +276,7 @@
276 276
 #define TEMP_SENSOR_1 0
277 277
 #define TEMP_SENSOR_2 0
278 278
 #define TEMP_SENSOR_3 0
279
+#define TEMP_SENSOR_4 0
279 280
 #if ENABLED(TB2_HEATBED_MOD)
280 281
   // K8200 Heatbed 1206/100k/3950K spare part
281 282
   #define TEMP_SENSOR_BED 7
@@ -309,6 +310,7 @@
309 310
 #define HEATER_1_MINTEMP 5
310 311
 #define HEATER_2_MINTEMP 5
311 312
 #define HEATER_3_MINTEMP 5
313
+#define HEATER_4_MINTEMP 5
312 314
 #define BED_MINTEMP 5
313 315
 
314 316
 // When temperature exceeds max temp, your heater will be switched off.
@@ -318,6 +320,7 @@
318 320
 #define HEATER_1_MAXTEMP 275
319 321
 #define HEATER_2_MAXTEMP 275
320 322
 #define HEATER_3_MAXTEMP 275
323
+#define HEATER_4_MAXTEMP 275
321 324
 #define BED_MAXTEMP 100
322 325
 
323 326
 //===========================================================================
@@ -802,6 +805,7 @@
802 805
 #define INVERT_E1_DIR false
803 806
 #define INVERT_E2_DIR false
804 807
 #define INVERT_E3_DIR false
808
+#define INVERT_E4_DIR false
805 809
 
806 810
 // @section homing
807 811
 

+ 1
- 0
Marlin/example_configurations/TinyBoy2/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 3
- 0
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -257,6 +257,7 @@
257 257
 #define TEMP_SENSOR_1 0
258 258
 #define TEMP_SENSOR_2 0
259 259
 #define TEMP_SENSOR_3 0
260
+#define TEMP_SENSOR_4 0
260 261
 #define TEMP_SENSOR_BED 0
261 262
 
262 263
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -285,6 +286,7 @@
285 286
 #define HEATER_1_MINTEMP 5
286 287
 #define HEATER_2_MINTEMP 5
287 288
 #define HEATER_3_MINTEMP 5
289
+#define HEATER_4_MINTEMP 5
288 290
 #define BED_MINTEMP 5
289 291
 
290 292
 // When temperature exceeds max temp, your heater will be switched off.
@@ -744,6 +746,7 @@
744 746
 #define INVERT_E1_DIR false
745 747
 #define INVERT_E2_DIR false
746 748
 #define INVERT_E3_DIR false
749
+#define INVERT_E4_DIR false
747 750
 
748 751
 // @section homing
749 752
 

+ 1
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 4
- 0
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 0
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 0
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -752,6 +755,7 @@
752 755
 #define INVERT_E1_DIR false
753 756
 #define INVERT_E2_DIR false
754 757
 #define INVERT_E3_DIR false
758
+#define INVERT_E4_DIR false
755 759
 
756 760
 // @section homing
757 761
 

+ 4
- 0
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 0
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 1
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -859,6 +862,7 @@
859 862
 #define INVERT_E1_DIR false
860 863
 #define INVERT_E2_DIR false
861 864
 #define INVERT_E3_DIR false
865
+#define INVERT_E4_DIR false
862 866
 
863 867
 // @section homing
864 868
 

+ 1
- 0
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 4
- 0
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 0
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 0
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -843,6 +846,7 @@
843 846
 #define INVERT_E1_DIR false
844 847
 #define INVERT_E2_DIR false
845 848
 #define INVERT_E3_DIR false
849
+#define INVERT_E4_DIR false
846 850
 
847 851
 // @section homing
848 852
 

+ 1
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 4
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 0
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 11
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -838,6 +841,7 @@
838 841
 #define INVERT_E1_DIR false
839 842
 #define INVERT_E2_DIR false
840 843
 #define INVERT_E3_DIR false
844
+#define INVERT_E4_DIR false
841 845
 
842 846
 // @section homing
843 847
 

+ 1
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 4
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

@@ -258,6 +258,7 @@
258 258
 #define TEMP_SENSOR_1 0
259 259
 #define TEMP_SENSOR_2 0
260 260
 #define TEMP_SENSOR_3 0
261
+#define TEMP_SENSOR_4 0
261 262
 #define TEMP_SENSOR_BED 5
262 263
 
263 264
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -286,6 +287,7 @@
286 287
 #define HEATER_1_MINTEMP 5
287 288
 #define HEATER_2_MINTEMP 5
288 289
 #define HEATER_3_MINTEMP 5
290
+#define HEATER_4_MINTEMP 5
289 291
 #define BED_MINTEMP 5
290 292
 
291 293
 // When temperature exceeds max temp, your heater will be switched off.
@@ -295,6 +297,7 @@
295 297
 #define HEATER_1_MAXTEMP 275
296 298
 #define HEATER_2_MAXTEMP 275
297 299
 #define HEATER_3_MAXTEMP 275
300
+#define HEATER_4_MAXTEMP 275
298 301
 #define BED_MAXTEMP 150
299 302
 
300 303
 //===========================================================================
@@ -845,6 +848,7 @@
845 848
 #define INVERT_E1_DIR false
846 849
 #define INVERT_E2_DIR false
847 850
 #define INVERT_E3_DIR false
851
+#define INVERT_E4_DIR false
848 852
 
849 853
 // @section homing
850 854
 

+ 1
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

@@ -226,6 +226,7 @@
226 226
 #define E1_AUTO_FAN_PIN -1
227 227
 #define E2_AUTO_FAN_PIN -1
228 228
 #define E3_AUTO_FAN_PIN -1
229
+#define E4_AUTO_FAN_PIN -1
229 230
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
230 231
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
231 232
 

+ 4
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 0
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 5
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -854,6 +857,7 @@
854 857
 #define INVERT_E1_DIR false
855 858
 #define INVERT_E2_DIR false
856 859
 #define INVERT_E3_DIR false
860
+#define INVERT_E4_DIR false
857 861
 
858 862
 // @section homing
859 863
 

+ 1
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 4
- 0
Marlin/example_configurations/makibox/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 0
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 12
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -755,6 +758,7 @@
755 758
 #define INVERT_E1_DIR false
756 759
 #define INVERT_E2_DIR false
757 760
 #define INVERT_E3_DIR false
761
+#define INVERT_E4_DIR false
758 762
 
759 763
 // @section homing
760 764
 

+ 1
- 0
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 4
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -254,6 +254,7 @@
254 254
 #define TEMP_SENSOR_1 0
255 255
 #define TEMP_SENSOR_2 0
256 256
 #define TEMP_SENSOR_3 0
257
+#define TEMP_SENSOR_4 0
257 258
 #define TEMP_SENSOR_BED 5
258 259
 
259 260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -282,6 +283,7 @@
282 283
 #define HEATER_1_MINTEMP 5
283 284
 #define HEATER_2_MINTEMP 5
284 285
 #define HEATER_3_MINTEMP 5
286
+#define HEATER_4_MINTEMP 5
285 287
 #define BED_MINTEMP 5
286 288
 
287 289
 // When temperature exceeds max temp, your heater will be switched off.
@@ -291,6 +293,7 @@
291 293
 #define HEATER_1_MAXTEMP 275
292 294
 #define HEATER_2_MAXTEMP 275
293 295
 #define HEATER_3_MAXTEMP 275
296
+#define HEATER_4_MAXTEMP 275
294 297
 #define BED_MAXTEMP 150
295 298
 
296 299
 //===========================================================================
@@ -748,6 +751,7 @@
748 751
 #define INVERT_E1_DIR false
749 752
 #define INVERT_E2_DIR false
750 753
 #define INVERT_E3_DIR false
754
+#define INVERT_E4_DIR false
751 755
 
752 756
 // @section homing
753 757
 

+ 1
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -221,6 +221,7 @@
221 221
 #define E1_AUTO_FAN_PIN -1
222 222
 #define E2_AUTO_FAN_PIN -1
223 223
 #define E3_AUTO_FAN_PIN -1
224
+#define E4_AUTO_FAN_PIN -1
224 225
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
225 226
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
226 227
 

+ 5
- 0
Marlin/language.h View File

@@ -268,22 +268,27 @@
268 268
 #define MSG_H2 "2"
269 269
 #define MSG_H3 "3"
270 270
 #define MSG_H4 "4"
271
+#define MSG_H5 "5"
271 272
 #define MSG_N1 " 1"
272 273
 #define MSG_N2 " 2"
273 274
 #define MSG_N3 " 3"
274 275
 #define MSG_N4 " 4"
276
+#define MSG_N5 " 5"
275 277
 #define MSG_E1 "E1"
276 278
 #define MSG_E2 "E2"
277 279
 #define MSG_E3 "E3"
278 280
 #define MSG_E4 "E4"
281
+#define MSG_E5 "E5"
279 282
 #define MSG_MOVE_E1 "1"
280 283
 #define MSG_MOVE_E2 "2"
281 284
 #define MSG_MOVE_E3 "3"
282 285
 #define MSG_MOVE_E4 "4"
286
+#define MSG_MOVE_E5 "5"
283 287
 #define MSG_DIAM_E1 " 1"
284 288
 #define MSG_DIAM_E2 " 2"
285 289
 #define MSG_DIAM_E3 " 3"
286 290
 #define MSG_DIAM_E4 " 4"
291
+#define MSG_DIAM_E5 " 5"
287 292
 
288 293
 #include INCLUDE_LANGUAGE
289 294
 

+ 6
- 4
Marlin/macros.h View File

@@ -128,10 +128,12 @@
128 128
 
129 129
 #define CEILING(x,y) (((x) + (y) - 1) / (y))
130 130
 
131
-#define MIN3(a, b, c)    min(min(a, b), c)
132
-#define MIN4(a, b, c, d) min(min(a, b), min(c, d))
133
-#define MAX3(a, b, c)    max(max(a, b), c)
134
-#define MAX4(a, b, c, d) max(max(a, b), max(c, d))
131
+#define MIN3(a, b, c)       min(min(a, b), c)
132
+#define MIN4(a, b, c, d)    min(MIN3(a, b, c), d)
133
+#define MIN5(a, b, c, d, e) min(MIN4(a, b, c, d), e)
134
+#define MAX3(a, b, c)       max(max(a, b), c)
135
+#define MAX4(a, b, c, d)    max(MAX3(a, b, c), d)
136
+#define MAX5(a, b, c, d, e) max(MAX4(a, b, c, d), e)
135 137
 
136 138
 #define UNEAR_ZERO(x) ((x) < 0.000001)
137 139
 #define NEAR_ZERO(x) WITHIN(x, -0.000001, 0.000001)

+ 15
- 12
Marlin/pins.h View File

@@ -252,6 +252,9 @@
252 252
 #ifndef TEMP_3_PIN
253 253
   #define TEMP_3_PIN -1
254 254
 #endif
255
+#ifndef TEMP_4_PIN
256
+  #define TEMP_4_PIN -1
257
+#endif
255 258
 #ifndef TEMP_BED_PIN
256 259
   #define TEMP_BED_PIN -1
257 260
 #endif
@@ -279,7 +282,7 @@
279 282
 #endif
280 283
 
281 284
 #ifndef MAX_EXTRUDERS
282
-  #define MAX_EXTRUDERS 4
285
+  #define MAX_EXTRUDERS 5
283 286
 #endif
284 287
 
285 288
 // Marlin needs to account for pins that equal -1
@@ -320,10 +323,10 @@
320 323
       #if EXTRUDERS > 4
321 324
         #undef _E4_PINS
322 325
         #define _E4_PINS E4_STEP_PIN, E4_DIR_PIN, E4_ENABLE_PIN,
323
-      #endif
324
-    #endif
325
-  #endif
326
-#endif
326
+      #endif // EXTRUDERS > 4
327
+    #endif // EXTRUDERS > 3
328
+  #endif // EXTRUDERS > 2
329
+#endif // EXTRUDERS > 1
327 330
 
328 331
 #define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, marlinAnalogInputToDigitalPin(TEMP_0_PIN),
329 332
 #define _H1_PINS
@@ -343,9 +346,9 @@
343 346
       #if HOTENDS > 4
344 347
         #undef _H4_PINS
345 348
         #define _H4_PINS HEATER_4_PIN, marlinAnalogInputToDigitalPin(TEMP_4_PIN),
346
-      #endif
347
-    #endif
348
-  #endif
349
+      #endif // HOTENDS > 4
350
+    #endif // HOTENDS > 3
351
+  #endif // HOTENDS > 2
349 352
 #elif ENABLED(MIXING_EXTRUDER)
350 353
   #undef _E1_PINS
351 354
   #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN,
@@ -358,10 +361,10 @@
358 361
       #if MIXING_STEPPERS > 4
359 362
         #undef _E4_PINS
360 363
         #define _E4_PINS E4_STEP_PIN, E4_DIR_PIN, E4_ENABLE_PIN,
361
-      #endif
362
-    #endif
363
-  #endif
364
-#endif
364
+      #endif // MIXING_STEPPERS > 4
365
+    #endif // MIXING_STEPPERS > 3
366
+  #endif // MIXING_STEPPERS > 2
367
+#endif // MIXING_STEPPERS > 1
365 368
 
366 369
 #define BED_PINS HEATER_BED_PIN, marlinAnalogInputToDigitalPin(TEMP_BED_PIN),
367 370
 

+ 2
- 2
Marlin/pins_AZTEEG_X3.h View File

@@ -24,8 +24,8 @@
24 24
  * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments
25 25
  */
26 26
 
27
-#if HOTENDS > 2
28
-  #error "Azteeg X3 supports up to 2 hotends. Comment this line to keep going."
27
+#if HOTENDS > 2 || E_STEPPERS > 2
28
+  #error "Azteeg X3 supports up to 2 hotends / E-steppers. Comment out this line to continue."
29 29
 #endif
30 30
 
31 31
 #define BOARD_NAME "Azteeg X3"

+ 4
- 0
Marlin/pins_AZTEEG_X3_PRO.h View File

@@ -24,6 +24,10 @@
24 24
  * AZTEEG_X3_PRO (Arduino Mega) pin assignments
25 25
  */
26 26
 
27
+#if HOTENDS > 5 || E_STEPPERS > 5
28
+  #error "Azteeg X3 Pro supports up to 5 hotends / E-steppers. Comment out this line to continue."
29
+#endif
30
+
27 31
 #define BOARD_NAME "Azteeg X3 Pro"
28 32
 
29 33
 #include "pins_RAMPS.h"

+ 2
- 2
Marlin/pins_BAM_DICE_DUE.h View File

@@ -24,8 +24,8 @@
24 24
  * BAM&DICE Due (Arduino Mega) pin assignments
25 25
  */
26 26
 
27
-#if HOTENDS > 2
28
-  #error "2PrintBeta Due supports up to 2 hotends. Comment this line to keep going."
27
+#if HOTENDS > 2 || E_STEPPERS > 2
28
+  #error "2PrintBeta Due supports up to 2 hotends / E-steppers. Comment out this line to continue."
29 29
 #endif
30 30
 
31 31
 #define BOARD_NAME "2PrintBeta Due"

+ 2
- 2
Marlin/pins_FELIX2.h View File

@@ -24,8 +24,8 @@
24 24
  * FELIXprinters v2.0/3.0 (RAMPS v1.4) pin assignments
25 25
  */
26 26
 
27
-#if HOTENDS > 2
28
-  #error "Felix 2.0+ supports up to 2 hotends. Comment this line to keep going."
27
+#if HOTENDS > 2 || E_STEPPERS > 2
28
+  #error "Felix 2.0+ supports up to 2 hotends / E-steppers. Comment out this line to continue."
29 29
 #endif
30 30
 
31 31
 #define BOARD_NAME "Felix 2.0+"

+ 2
- 2
Marlin/pins_MEGACONTROLLER.h View File

@@ -28,8 +28,8 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
-#if E_STEPPERS > 2 || HOTENDS > 2
32
-  #error "Mega Controller supports up to 2 hotends / E-steppers. Comment this line to keep going."
31
+#if HOTENDS > 2 || E_STEPPERS > 2
32
+  #error "Mega Controller supports up to 2 hotends / E-steppers. Comment out this line to continue."
33 33
 #endif
34 34
 
35 35
 #define BOARD_NAME "Mega Controller"

+ 2
- 2
Marlin/pins_MINITRONICS.h View File

@@ -28,8 +28,8 @@
28 28
   #error "Oops!  Make sure you have 'Minitronics' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
-#if HOTENDS > 2
32
-  #error "Minitronics supports up to 2 hotends. Comment this line to keep going."
31
+#if HOTENDS > 2 || E_STEPPERS > 2
32
+  #error "Minitronics supports up to 2 hotends / E-steppers. Comment out this line to continue."
33 33
 #endif
34 34
 
35 35
 #define BOARD_NAME         "Minitronics v1.0 / v1.1"

+ 2
- 2
Marlin/pins_MKS_13.h View File

@@ -29,8 +29,8 @@
29 29
  *  MKS v1.4  (Extruder, Extruder, Fan, Bed)
30 30
  */
31 31
 
32
-#if HOTENDS > 2
33
-  #error "MKS 1.3/1.4 supports up to 2 hotends. Comment this line to keep going."
32
+#if HOTENDS > 2 || E_STEPPERS > 2
33
+  #error "MKS 1.3/1.4 supports up to 2 hotends / E-steppers. Comment out this line to continue."
34 34
 #endif
35 35
 
36 36
 #define BOARD_NAME "MKS > v1.3"

+ 2
- 2
Marlin/pins_MKS_BASE.h View File

@@ -24,8 +24,8 @@
24 24
  * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments
25 25
  */
26 26
 
27
-#if HOTENDS > 2
28
-  #error "MKS BASE 1.0 supports up to 2 hotends. Comment this line to keep going."
27
+#if HOTENDS > 2 || E_STEPPERS > 2
28
+  #error "MKS BASE 1.0 supports up to 2 hotends / E-steppers. Comment out this line to continue."
29 29
 #endif
30 30
 
31 31
 #define BOARD_NAME "MKS BASE 1.0"

+ 2
- 2
Marlin/pins_RUMBA.h View File

@@ -28,8 +28,8 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
-#if E_STEPPERS > 3 || HOTENDS > 3
32
-  #error "RUMBA supports up to 3 hotends / E-steppers. Comment this line to keep going."
31
+#if HOTENDS > 3 || E_STEPPERS > 3
32
+  #error "RUMBA supports up to 3 hotends / E-steppers. Comment out this line to continue."
33 33
 #endif
34 34
 
35 35
 #define DEFAULT_MACHINE_NAME "Rumba"

+ 2
- 2
Marlin/pins_SAINSMART_2IN1.h View File

@@ -24,8 +24,8 @@
24 24
  *  Sainsmart 2-in-1 pin assignments
25 25
  */
26 26
 
27
-#if HOTENDS > 2
28
-  #error "Sainsmart 2-in-1 supports up to 2 hotends. Comment this line to keep going."
27
+#if HOTENDS > 2 || E_STEPPERS > 2
28
+  #error "Sainsmart 2-in-1 supports up to 2 hotends / E-steppers. Comment out this line to continue."
29 29
 #endif
30 30
 
31 31
 #define BOARD_NAME "Sainsmart"

+ 28
- 5
Marlin/planner.cpp View File

@@ -882,9 +882,12 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
882 882
               if (g_uc_extruder_last_move[2] == 0) disable_e2();
883 883
               #if EXTRUDERS > 3
884 884
                 if (g_uc_extruder_last_move[3] == 0) disable_e3();
885
-              #endif
886
-            #endif
887
-          #endif
885
+                #if EXTRUDERS > 4
886
+                  if (g_uc_extruder_last_move[4] == 0) disable_e4();
887
+                #endif // EXTRUDERS > 4
888
+              #endif // EXTRUDERS > 3
889
+            #endif // EXTRUDERS > 2
890
+          #endif // EXTRUDERS > 1
888 891
         break;
889 892
         #if EXTRUDERS > 1
890 893
           case 1:
@@ -895,8 +898,11 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
895 898
               if (g_uc_extruder_last_move[2] == 0) disable_e2();
896 899
               #if EXTRUDERS > 3
897 900
                 if (g_uc_extruder_last_move[3] == 0) disable_e3();
898
-              #endif
899
-            #endif
901
+                #if EXTRUDERS > 4
902
+                  if (g_uc_extruder_last_move[4] == 0) disable_e4();
903
+                #endif // EXTRUDERS > 4
904
+              #endif // EXTRUDERS > 3
905
+            #endif // EXTRUDERS > 2
900 906
           break;
901 907
           #if EXTRUDERS > 2
902 908
             case 2:
@@ -906,6 +912,9 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
906 912
               if (g_uc_extruder_last_move[1] == 0) disable_e1();
907 913
               #if EXTRUDERS > 3
908 914
                 if (g_uc_extruder_last_move[3] == 0) disable_e3();
915
+                #if EXTRUDERS > 4
916
+                  if (g_uc_extruder_last_move[4] == 0) disable_e4();
917
+                #endif
909 918
               #endif
910 919
             break;
911 920
             #if EXTRUDERS > 3
@@ -915,7 +924,20 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
915 924
                 if (g_uc_extruder_last_move[0] == 0) disable_e0();
916 925
                 if (g_uc_extruder_last_move[1] == 0) disable_e1();
917 926
                 if (g_uc_extruder_last_move[2] == 0) disable_e2();
927
+                #if EXTRUDERS > 4
928
+                  if (g_uc_extruder_last_move[4] == 0) disable_e4();
929
+                #endif
918 930
               break;
931
+              #if EXTRUDERS > 4
932
+                case 4:
933
+                  enable_e4();
934
+                  g_uc_extruder_last_move[4] = (BLOCK_BUFFER_SIZE) * 2;
935
+                  if (g_uc_extruder_last_move[0] == 0) disable_e0();
936
+                  if (g_uc_extruder_last_move[1] == 0) disable_e1();
937
+                  if (g_uc_extruder_last_move[2] == 0) disable_e2();
938
+                  if (g_uc_extruder_last_move[3] == 0) disable_e3();
939
+                break;
940
+              #endif // EXTRUDERS > 4
919 941
             #endif // EXTRUDERS > 3
920 942
           #endif // EXTRUDERS > 2
921 943
         #endif // EXTRUDERS > 1
@@ -925,6 +947,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
925 947
       enable_e1();
926 948
       enable_e2();
927 949
       enable_e3();
950
+      enable_e4();
928 951
     #endif
929 952
   }
930 953
 

+ 9
- 1
Marlin/stepper_indirection.h View File

@@ -388,6 +388,10 @@
388 388
   #define E_STEP_WRITE(v) E0_STEP_WRITE(v)
389 389
   #define NORM_E_DIR() E0_DIR_WRITE(current_block->active_extruder ?  INVERT_E0_DIR : !INVERT_E0_DIR)
390 390
   #define  REV_E_DIR() E0_DIR_WRITE(current_block->active_extruder ? !INVERT_E0_DIR :  INVERT_E0_DIR)
391
+#elif EXTRUDERS > 4
392
+  #define E_STEP_WRITE(v) { switch (current_block->active_extruder) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); } }
393
+  #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 4: E4_DIR_WRITE(!INVERT_E4_DIR); } }
394
+  #define REV_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(INVERT_E3_DIR); break; case 4: E4_DIR_WRITE(INVERT_E4_DIR); } }
391 395
 #elif EXTRUDERS > 3
392 396
   #define E_STEP_WRITE(v) { switch (current_block->active_extruder) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); } }
393 397
   #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); } }
@@ -408,7 +412,11 @@
408 412
   #endif
409 413
 #elif ENABLED(MIXING_EXTRUDER)
410 414
   #define E_STEP_WRITE(v) NOOP /* not used for mixing extruders! */
411
-  #if MIXING_STEPPERS > 3
415
+  #if MIXING_STEPPERS > 4
416
+    #define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); } }
417
+    #define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); E3_DIR_WRITE(!INVERT_E3_DIR); E4_DIR_WRITE(!INVERT_E4_DIR); }
418
+    #define REV_E_DIR()  { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); E3_DIR_WRITE( INVERT_E3_DIR); E4_DIR_WRITE( INVERT_E4_DIR); }
419
+  #elif MIXING_STEPPERS > 3
412 420
     #define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); } }
413 421
     #define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); E3_DIR_WRITE(!INVERT_E3_DIR); }
414 422
     #define REV_E_DIR()  { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); E3_DIR_WRITE( INVERT_E3_DIR); }

+ 129
- 78
Marlin/temperature.cpp View File

@@ -51,8 +51,8 @@
51 51
   static void* heater_ttbl_map[2] = {(void*)HEATER_0_TEMPTABLE, (void*)HEATER_1_TEMPTABLE };
52 52
   static uint8_t heater_ttbllen_map[2] = { HEATER_0_TEMPTABLE_LEN, HEATER_1_TEMPTABLE_LEN };
53 53
 #else
54
-  static void* heater_ttbl_map[HOTENDS] = ARRAY_BY_HOTENDS((void*)HEATER_0_TEMPTABLE, (void*)HEATER_1_TEMPTABLE, (void*)HEATER_2_TEMPTABLE, (void*)HEATER_3_TEMPTABLE);
55
-  static uint8_t heater_ttbllen_map[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_TEMPTABLE_LEN, HEATER_1_TEMPTABLE_LEN, HEATER_2_TEMPTABLE_LEN, HEATER_3_TEMPTABLE_LEN);
54
+  static void* heater_ttbl_map[HOTENDS] = ARRAY_BY_HOTENDS((void*)HEATER_0_TEMPTABLE, (void*)HEATER_1_TEMPTABLE, (void*)HEATER_2_TEMPTABLE, (void*)HEATER_3_TEMPTABLE, (void*)HEATER_4_TEMPTABLE);
55
+  static uint8_t heater_ttbllen_map[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_TEMPTABLE_LEN, HEATER_1_TEMPTABLE_LEN, HEATER_2_TEMPTABLE_LEN, HEATER_3_TEMPTABLE_LEN, HEATER_4_TEMPTABLE_LEN);
56 56
 #endif
57 57
 
58 58
 Temperature thermalManager;
@@ -161,8 +161,8 @@ unsigned long Temperature::raw_temp_value[MAX_EXTRUDERS] = { 0 };
161 161
 unsigned long Temperature::raw_temp_bed_value = 0;
162 162
 
163 163
 // Init min and max temp with extreme values to prevent false errors during startup
164
-int Temperature::minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_LO_TEMP , HEATER_1_RAW_LO_TEMP , HEATER_2_RAW_LO_TEMP, HEATER_3_RAW_LO_TEMP),
165
-    Temperature::maxttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_HI_TEMP , HEATER_1_RAW_HI_TEMP , HEATER_2_RAW_HI_TEMP, HEATER_3_RAW_HI_TEMP),
164
+int Temperature::minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_LO_TEMP , HEATER_1_RAW_LO_TEMP , HEATER_2_RAW_LO_TEMP, HEATER_3_RAW_LO_TEMP, HEATER_4_RAW_LO_TEMP),
165
+    Temperature::maxttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_HI_TEMP , HEATER_1_RAW_HI_TEMP , HEATER_2_RAW_HI_TEMP, HEATER_3_RAW_HI_TEMP, HEATER_4_RAW_HI_TEMP),
166 166
     Temperature::minttemp[HOTENDS] = { 0 },
167 167
     Temperature::maxttemp[HOTENDS] = ARRAY_BY_HOTENDS1(16383);
168 168
 
@@ -460,12 +460,13 @@ int Temperature::getHeaterPower(int heater) {
460 460
 #if HAS_AUTO_FAN
461 461
 
462 462
   void Temperature::checkExtruderAutoFans() {
463
-    const int8_t fanPin[] = { E0_AUTO_FAN_PIN, E1_AUTO_FAN_PIN, E2_AUTO_FAN_PIN, E3_AUTO_FAN_PIN };
464
-    const int fanBit[] = {
463
+    constexpr int8_t fanPin[] = { E0_AUTO_FAN_PIN, E1_AUTO_FAN_PIN, E2_AUTO_FAN_PIN, E3_AUTO_FAN_PIN, E4_AUTO_FAN_PIN };
464
+    constexpr int fanBit[] = {
465 465
                     0,
466 466
       AUTO_1_IS_0 ? 0 :               1,
467 467
       AUTO_2_IS_0 ? 0 : AUTO_2_IS_1 ? 1 :               2,
468
-      AUTO_3_IS_0 ? 0 : AUTO_3_IS_1 ? 1 : AUTO_3_IS_2 ? 2 : 3
468
+      AUTO_3_IS_0 ? 0 : AUTO_3_IS_1 ? 1 : AUTO_3_IS_2 ? 2 :               3,
469
+      AUTO_4_IS_0 ? 0 : AUTO_4_IS_1 ? 1 : AUTO_4_IS_2 ? 2 : AUTO_4_IS_3 ? 3 : 4
469 470
     };
470 471
     uint8_t fanState = 0;
471 472
 
@@ -973,6 +974,9 @@ void Temperature::init() {
973 974
   #if HAS_HEATER_3
974 975
     SET_OUTPUT(HEATER_3_PIN);
975 976
   #endif
977
+  #if HAS_HEATER_4
978
+    SET_OUTPUT(HEATER_3_PIN);
979
+  #endif
976 980
   #if HAS_HEATER_BED
977 981
     SET_OUTPUT(HEATER_BED_PIN);
978 982
   #endif
@@ -1033,6 +1037,9 @@ void Temperature::init() {
1033 1037
   #if HAS_TEMP_3
1034 1038
     ANALOG_SELECT(TEMP_3_PIN);
1035 1039
   #endif
1040
+  #if HAS_TEMP_4
1041
+    ANALOG_SELECT(TEMP_4_PIN);
1042
+  #endif
1036 1043
   #if HAS_TEMP_BED
1037 1044
     ANALOG_SELECT(TEMP_BED_PIN);
1038 1045
   #endif
@@ -1080,6 +1087,16 @@ void Temperature::init() {
1080 1087
       SET_OUTPUT(E3_AUTO_FAN_PIN);
1081 1088
     #endif
1082 1089
   #endif
1090
+  #if HAS_AUTO_FAN_4 && !AUTO_4_IS_0 && !AUTO_4_IS_1 && !AUTO_4_IS_2 && !AUTO_4_IS_3
1091
+    #if E4_AUTO_FAN_PIN == FAN1_PIN
1092
+      SET_OUTPUT(E4_AUTO_FAN_PIN);
1093
+      #if ENABLED(FAST_PWM_FAN)
1094
+        setPwmFrequency(E4_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1095
+      #endif
1096
+    #else
1097
+      SET_OUTPUT(E4_AUTO_FAN_PIN);
1098
+    #endif
1099
+  #endif
1083 1100
 
1084 1101
   // Use timer0 for temperature measurement
1085 1102
   // Interleave temperature interrupt with millies interrupt
@@ -1133,6 +1150,14 @@ void Temperature::init() {
1133 1150
         #ifdef HEATER_3_MAXTEMP
1134 1151
           TEMP_MAX_ROUTINE(3);
1135 1152
         #endif
1153
+        #if HOTENDS > 4
1154
+          #ifdef HEATER_4_MINTEMP
1155
+            TEMP_MIN_ROUTINE(4);
1156
+          #endif
1157
+          #ifdef HEATER_4_MAXTEMP
1158
+            TEMP_MAX_ROUTINE(4);
1159
+          #endif
1160
+        #endif // HOTENDS > 4
1136 1161
       #endif // HOTENDS > 3
1137 1162
     #endif // HOTENDS > 2
1138 1163
   #endif // HOTENDS > 1
@@ -1264,18 +1289,18 @@ void Temperature::disable_all_heaters() {
1264 1289
 
1265 1290
   #if HAS_TEMP_HOTEND
1266 1291
     DISABLE_HEATER(0);
1267
-  #endif
1268
-
1269
-  #if HOTENDS > 1 && HAS_TEMP_1
1270
-    DISABLE_HEATER(1);
1271
-  #endif
1272
-
1273
-  #if HOTENDS > 2 && HAS_TEMP_2
1274
-    DISABLE_HEATER(2);
1275
-  #endif
1276
-
1277
-  #if HOTENDS > 3 && HAS_TEMP_3
1278
-    DISABLE_HEATER(3);
1292
+    #if HOTENDS > 1
1293
+      DISABLE_HEATER(1);
1294
+      #if HOTENDS > 2
1295
+        DISABLE_HEATER(2);
1296
+        #if HOTENDS > 3
1297
+          DISABLE_HEATER(3);
1298
+          #if HOTENDS > 4
1299
+            DISABLE_HEATER(4);
1300
+          #endif // HOTENDS > 4
1301
+        #endif // HOTENDS > 3
1302
+      #endif // HOTENDS > 2
1303
+    #endif // HOTENDS > 1
1279 1304
   #endif
1280 1305
 
1281 1306
   #if HAS_TEMP_BED
@@ -1384,6 +1409,9 @@ void Temperature::set_current_temp_raw() {
1384 1409
       current_temperature_raw[2] = raw_temp_value[2];
1385 1410
       #if HAS_TEMP_3
1386 1411
         current_temperature_raw[3] = raw_temp_value[3];
1412
+        #if HAS_TEMP_4
1413
+          current_temperature_raw[4] = raw_temp_value[4];
1414
+        #endif
1387 1415
       #endif
1388 1416
     #endif
1389 1417
   #endif
@@ -1525,9 +1553,12 @@ void Temperature::isr() {
1525 1553
       ISR_STATICS(2);
1526 1554
       #if HOTENDS > 3
1527 1555
         ISR_STATICS(3);
1528
-      #endif
1529
-    #endif
1530
-  #endif
1556
+        #if HOTENDS > 4
1557
+          ISR_STATICS(4);
1558
+        #endif // HOTENDS > 4
1559
+      #endif // HOTENDS > 3
1560
+    #endif // HOTENDS > 2
1561
+  #endif // HOTENDS > 1
1531 1562
   #if HAS_HEATER_BED
1532 1563
     ISR_STATICS(BED);
1533 1564
   #endif
@@ -1561,9 +1592,13 @@ void Temperature::isr() {
1561 1592
           #if HOTENDS > 3
1562 1593
             soft_pwm_3 = (soft_pwm_3 & pwm_mask) + soft_pwm[3];
1563 1594
             WRITE_HEATER_3(soft_pwm_3 > pwm_mask ? HIGH : LOW);
1564
-          #endif
1565
-        #endif
1566
-      #endif
1595
+            #if HOTENDS > 4
1596
+              soft_pwm_4 = (soft_pwm_4 & pwm_mask) + soft_pwm[4];
1597
+              WRITE_HEATER_4(soft_pwm_4 > pwm_mask ? HIGH : LOW);
1598
+            #endif // HOTENDS > 4
1599
+          #endif // HOTENDS > 3
1600
+        #endif // HOTENDS > 2
1601
+      #endif // HOTENDS > 1
1567 1602
 
1568 1603
       #if HAS_HEATER_BED
1569 1604
         soft_pwm_BED = (soft_pwm_BED & pwm_mask) + soft_pwm_bed;
@@ -1589,13 +1624,16 @@ void Temperature::isr() {
1589 1624
       if (soft_pwm_0 <= pwm_count_tmp) WRITE_HEATER_0(0);
1590 1625
       #if HOTENDS > 1
1591 1626
         if (soft_pwm_1 <= pwm_count_tmp) WRITE_HEATER_1(0);
1592
-      #endif
1593
-      #if HOTENDS > 2
1594
-        if (soft_pwm_2 <= pwm_count_tmp) WRITE_HEATER_2(0);
1595
-      #endif
1596
-      #if HOTENDS > 3
1597
-        if (soft_pwm_3 <= pwm_count_tmp) WRITE_HEATER_3(0);
1598
-      #endif
1627
+        #if HOTENDS > 2
1628
+          if (soft_pwm_2 <= pwm_count_tmp) WRITE_HEATER_2(0);
1629
+          #if HOTENDS > 3
1630
+            if (soft_pwm_3 <= pwm_count_tmp) WRITE_HEATER_3(0);
1631
+            #if HOTENDS > 4
1632
+              if (soft_pwm_4 <= pwm_count_tmp) WRITE_HEATER_4(0);
1633
+            #endif // HOTENDS > 4
1634
+          #endif // HOTENDS > 3
1635
+        #endif // HOTENDS > 2
1636
+      #endif // HOTENDS > 1
1599 1637
 
1600 1638
       #if HAS_HEATER_BED
1601 1639
         if (soft_pwm_BED <= pwm_count_tmp) WRITE_HEATER_BED(0);
@@ -1665,32 +1703,38 @@ void Temperature::isr() {
1665 1703
 
1666 1704
     if (slow_pwm_count == 0) {
1667 1705
 
1668
-      SLOW_PWM_ROUTINE(0); // EXTRUDER 0
1706
+      SLOW_PWM_ROUTINE(0);
1669 1707
       #if HOTENDS > 1
1670
-        SLOW_PWM_ROUTINE(1); // EXTRUDER 1
1708
+        SLOW_PWM_ROUTINE(1);
1671 1709
         #if HOTENDS > 2
1672
-          SLOW_PWM_ROUTINE(2); // EXTRUDER 2
1710
+          SLOW_PWM_ROUTINE(2);
1673 1711
           #if HOTENDS > 3
1674
-            SLOW_PWM_ROUTINE(3); // EXTRUDER 3
1675
-          #endif
1676
-        #endif
1677
-      #endif
1712
+            SLOW_PWM_ROUTINE(3);
1713
+            #if HOTENDS > 4
1714
+              SLOW_PWM_ROUTINE(4);
1715
+            #endif // HOTENDS > 4
1716
+          #endif // HOTENDS > 3
1717
+        #endif // HOTENDS > 2
1718
+      #endif // HOTENDS > 1
1678 1719
       #if HAS_HEATER_BED
1679 1720
         _SLOW_PWM_ROUTINE(BED, soft_pwm_bed); // BED
1680 1721
       #endif
1681 1722
 
1682 1723
     } // slow_pwm_count == 0
1683 1724
 
1684
-    PWM_OFF_ROUTINE(0); // EXTRUDER 0
1725
+    PWM_OFF_ROUTINE(0);
1685 1726
     #if HOTENDS > 1
1686
-      PWM_OFF_ROUTINE(1); // EXTRUDER 1
1727
+      PWM_OFF_ROUTINE(1);
1687 1728
       #if HOTENDS > 2
1688
-        PWM_OFF_ROUTINE(2); // EXTRUDER 2
1729
+        PWM_OFF_ROUTINE(2);
1689 1730
         #if HOTENDS > 3
1690
-          PWM_OFF_ROUTINE(3); // EXTRUDER 3
1691
-        #endif
1692
-      #endif
1693
-    #endif
1731
+          PWM_OFF_ROUTINE(3);
1732
+          #if HOTENDS > 4
1733
+            PWM_OFF_ROUTINE(4);
1734
+          #endif // HOTENDS > 4
1735
+        #endif // HOTENDS > 3
1736
+      #endif // HOTENDS > 2
1737
+    #endif // HOTENDS > 1
1694 1738
     #if HAS_HEATER_BED
1695 1739
       PWM_OFF_ROUTINE(BED); // BED
1696 1740
     #endif
@@ -1738,17 +1782,19 @@ void Temperature::isr() {
1738 1782
       slow_pwm_count++;
1739 1783
       slow_pwm_count &= 0x7F;
1740 1784
 
1741
-      // EXTRUDER 0
1742 1785
       if (state_timer_heater_0 > 0) state_timer_heater_0--;
1743
-      #if HOTENDS > 1    // EXTRUDER 1
1786
+      #if HOTENDS > 1
1744 1787
         if (state_timer_heater_1 > 0) state_timer_heater_1--;
1745
-        #if HOTENDS > 2    // EXTRUDER 2
1788
+        #if HOTENDS > 2
1746 1789
           if (state_timer_heater_2 > 0) state_timer_heater_2--;
1747
-          #if HOTENDS > 3    // EXTRUDER 3
1790
+          #if HOTENDS > 3
1748 1791
             if (state_timer_heater_3 > 0) state_timer_heater_3--;
1749
-          #endif
1750
-        #endif
1751
-      #endif
1792
+            #if HOTENDS > 4
1793
+              if (state_timer_heater_4 > 0) state_timer_heater_4--;
1794
+            #endif // HOTENDS > 4
1795
+          #endif // HOTENDS > 3
1796
+        #endif // HOTENDS > 2
1797
+      #endif // HOTENDS > 1
1752 1798
       #if HAS_HEATER_BED
1753 1799
         if (state_timer_heater_BED > 0) state_timer_heater_BED--;
1754 1800
       #endif
@@ -1763,7 +1809,7 @@ void Temperature::isr() {
1763 1809
     #define START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
1764 1810
   #endif
1765 1811
 
1766
-  // Prepare or measure a sensor, each one every 12th frame
1812
+  // Prepare or measure a sensor, each one every 14th frame
1767 1813
   switch (temp_state) {
1768 1814
     case PrepareTemp_0:
1769 1815
       #if HAS_TEMP_0
@@ -1832,6 +1878,20 @@ void Temperature::isr() {
1832 1878
       #if HAS_TEMP_3
1833 1879
         raw_temp_value[3] += ADC;
1834 1880
       #endif
1881
+      temp_state = PrepareTemp_4;
1882
+      break;
1883
+
1884
+    case PrepareTemp_4:
1885
+      #if HAS_TEMP_4
1886
+        START_ADC(TEMP_4_PIN);
1887
+      #endif
1888
+      lcd_buttons_update();
1889
+      temp_state = MeasureTemp_4;
1890
+      break;
1891
+    case MeasureTemp_4:
1892
+      #if HAS_TEMP_4
1893
+        raw_temp_value[4] += ADC;
1894
+      #endif
1835 1895
       temp_state = Prepare_FILWIDTH;
1836 1896
       break;
1837 1897
 
@@ -1879,35 +1939,26 @@ void Temperature::isr() {
1879 1939
     ZERO(raw_temp_value);
1880 1940
     raw_temp_bed_value = 0;
1881 1941
 
1942
+    #define TEMPDIR(N) ((HEATER_##N##_RAW_LO_TEMP) > (HEATER_##N##_RAW_HI_TEMP) ? -1 : 1)
1943
+
1882 1944
     int constexpr temp_dir[] = {
1883 1945
       #if ENABLED(HEATER_0_USES_MAX6675)
1884 1946
          0
1885
-      #elif HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP
1886
-        -1
1887 1947
       #else
1888
-         1
1889
-      #endif
1890
-      #if HAS_TEMP_1 && HOTENDS > 1
1891
-        #if HEATER_1_RAW_LO_TEMP > HEATER_1_RAW_HI_TEMP
1892
-          , -1
1893
-        #else
1894
-          ,  1
1895
-        #endif
1896
-      #endif
1897
-      #if HAS_TEMP_2 && HOTENDS > 2
1898
-        #if HEATER_2_RAW_LO_TEMP > HEATER_2_RAW_HI_TEMP
1899
-          , -1
1900
-        #else
1901
-          ,  1
1902
-        #endif
1903
-      #endif
1904
-      #if HAS_TEMP_3 && HOTENDS > 3
1905
-        #if HEATER_3_RAW_LO_TEMP > HEATER_3_RAW_HI_TEMP
1906
-          , -1
1907
-        #else
1908
-          ,  1
1909
-        #endif
1948
+        TEMPDIR(0)
1910 1949
       #endif
1950
+      #if HOTENDS > 1
1951
+        , TEMPDIR(1)
1952
+        #if HOTENDS > 2
1953
+          , TEMPDIR(2)
1954
+          #if HOTENDS > 3
1955
+            , TEMPDIR(3)
1956
+            #if HOTENDS > 4
1957
+              , TEMPDIR(4)
1958
+            #endif // HOTENDS > 4
1959
+          #endif // HOTENDS > 3
1960
+        #endif // HOTENDS > 2
1961
+      #endif // HOTENDS > 1
1911 1962
     };
1912 1963
 
1913 1964
     for (uint8_t e = 0; e < COUNT(temp_dir); e++) {

+ 1
- 1
Marlin/temperature.h View File

@@ -174,7 +174,7 @@ class Temperature {
174 174
       static millis_t next_bed_check_ms;
175 175
     #endif
176 176
 
177
-    static unsigned long raw_temp_value[4],
177
+    static unsigned long raw_temp_value[MAX_EXTRUDERS],
178 178
                          raw_temp_bed_value;
179 179
 
180 180
     // Init min and max temp with extreme values to prevent false errors during startup

+ 4
- 0
Marlin/thermistortable_20.h View File

@@ -39,6 +39,10 @@
39 39
   #define HEATER_3_RAW_HI_TEMP 16383
40 40
   #define HEATER_3_RAW_LO_TEMP 0
41 41
 #endif
42
+#if (THERMISTORHEATER_4 == 20)
43
+  #define HEATER_4_RAW_HI_TEMP 16383
44
+  #define HEATER_4_RAW_LO_TEMP 0
45
+#endif
42 46
 #if (THERMISTORBED == 20)
43 47
   #define HEATER_BED_RAW_HI_TEMP 16383
44 48
   #define HEATER_BED_RAW_LO_TEMP 0

+ 11
- 1
Marlin/thermistortables.h View File

@@ -28,7 +28,7 @@
28 28
 
29 29
 #define OVERSAMPLENR 16
30 30
 
31
-#define ANY_THERMISTOR_IS(n) (THERMISTORHEATER_0 == n || THERMISTORHEATER_1 == n || THERMISTORHEATER_2 == n || THERMISTORHEATER_3 == n || THERMISTORBED == n)
31
+#define ANY_THERMISTOR_IS(n) (THERMISTORHEATER_0 == n || THERMISTORHEATER_1 == n || THERMISTORHEATER_2 == n || THERMISTORHEATER_3 == n || THERMISTORHEATER_4 == n || THERMISTORBED == n)
32 32
 
33 33
 // Pt1000 and Pt100 handling
34 34
 //
@@ -168,6 +168,16 @@
168 168
   #define HEATER_3_TEMPTABLE_LEN 0
169 169
 #endif
170 170
 
171
+#ifdef THERMISTORHEATER_4
172
+  #define HEATER_4_TEMPTABLE TT_NAME(THERMISTORHEATER_4)
173
+  #define HEATER_4_TEMPTABLE_LEN COUNT(HEATER_4_TEMPTABLE)
174
+#elif defined(HEATER_4_USES_THERMISTOR)
175
+  #error "No heater 4 thermistor table specified"
176
+#else
177
+  #define HEATER_4_TEMPTABLE NULL
178
+  #define HEATER_4_TEMPTABLE_LEN 0
179
+#endif
180
+
171 181
 #ifdef THERMISTORBED
172 182
   #define BEDTEMPTABLE TT_NAME(THERMISTORBED)
173 183
   #define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE)

+ 126
- 92
Marlin/ultralcd.cpp View File

@@ -919,31 +919,37 @@ void kill_screen(const char* lcd_msg) {
919 919
    * Watch temperature callbacks
920 920
    */
921 921
   #if WATCH_HOTENDS
922
-    #if TEMP_SENSOR_0 != 0
922
+    #if HAS_TEMP_HOTEND
923 923
       void watch_temp_callback_E0() { thermalManager.start_watching_heater(0); }
924
+      #if HOTENDS > 1
925
+        void watch_temp_callback_E1() { thermalManager.start_watching_heater(1); }
926
+        #if HOTENDS > 2
927
+          void watch_temp_callback_E2() { thermalManager.start_watching_heater(2); }
928
+          #if HOTENDS > 3
929
+            void watch_temp_callback_E3() { thermalManager.start_watching_heater(3); }
930
+            #if HOTENDS > 4
931
+              void watch_temp_callback_E4() { thermalManager.start_watching_heater(4); }
932
+            #endif // HOTENDS > 4
933
+          #endif // HOTENDS > 3
934
+        #endif // HOTENDS > 2
935
+      #endif // HOTENDS > 1
924 936
     #endif
925
-    #if HOTENDS > 1 && TEMP_SENSOR_1 != 0
926
-      void watch_temp_callback_E1() { thermalManager.start_watching_heater(1); }
927
-    #endif // HOTENDS > 1
928
-    #if HOTENDS > 2 && TEMP_SENSOR_2 != 0
929
-      void watch_temp_callback_E2() { thermalManager.start_watching_heater(2); }
930
-    #endif // HOTENDS > 2
931
-    #if HOTENDS > 3 && TEMP_SENSOR_3 != 0
932
-      void watch_temp_callback_E3() { thermalManager.start_watching_heater(3); }
933
-    #endif // HOTENDS > 3
934 937
   #else
935
-    #if TEMP_SENSOR_0 != 0
938
+    #if HAS_TEMP_HOTEND
936 939
       void watch_temp_callback_E0() {}
940
+      #if HOTENDS > 1
941
+        void watch_temp_callback_E1() {}
942
+        #if HOTENDS > 2
943
+          void watch_temp_callback_E2() {}
944
+          #if HOTENDS > 3
945
+            void watch_temp_callback_E3() {}
946
+            #if HOTENDS > 4
947
+              void watch_temp_callback_E4() {}
948
+            #endif // HOTENDS > 4
949
+          #endif // HOTENDS > 3
950
+        #endif // HOTENDS > 2
951
+      #endif // HOTENDS > 1
937 952
     #endif
938
-    #if HOTENDS > 1 && TEMP_SENSOR_1 != 0
939
-      void watch_temp_callback_E1() {}
940
-    #endif // HOTENDS > 1
941
-    #if HOTENDS > 2 && TEMP_SENSOR_2 != 0
942
-      void watch_temp_callback_E2() {}
943
-    #endif // HOTENDS > 2
944
-    #if HOTENDS > 3 && TEMP_SENSOR_3 != 0
945
-      void watch_temp_callback_E3() {}
946
-    #endif // HOTENDS > 3
947 953
   #endif
948 954
 
949 955
   #if WATCH_THE_BED
@@ -990,24 +996,17 @@ void kill_screen(const char* lcd_msg) {
990 996
     // Nozzle [1-4]:
991 997
     //
992 998
     #if HOTENDS == 1
993
-      #if TEMP_SENSOR_0 != 0
994
-        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
995
-      #endif
999
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
996 1000
     #else //HOTENDS > 1
997
-      #if TEMP_SENSOR_0 != 0
998
-        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N1, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
999
-      #endif
1000
-      #if TEMP_SENSOR_1 != 0
1001
-        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N2, &thermalManager.target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1);
1002
-      #endif
1001
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N1, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
1002
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N2, &thermalManager.target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1);
1003 1003
       #if HOTENDS > 2
1004
-        #if TEMP_SENSOR_2 != 0
1005
-          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N3, &thermalManager.target_temperature[2], 0, HEATER_2_MAXTEMP - 15, watch_temp_callback_E2);
1006
-        #endif
1004
+        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N3, &thermalManager.target_temperature[2], 0, HEATER_2_MAXTEMP - 15, watch_temp_callback_E2);
1007 1005
         #if HOTENDS > 3
1008
-          #if TEMP_SENSOR_3 != 0
1009
-            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N4, &thermalManager.target_temperature[3], 0, HEATER_3_MAXTEMP - 15, watch_temp_callback_E3);
1010
-          #endif
1006
+          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N4, &thermalManager.target_temperature[3], 0, HEATER_3_MAXTEMP - 15, watch_temp_callback_E3);
1007
+          #if HOTENDS > 4
1008
+            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N5, &thermalManager.target_temperature[4], 0, HEATER_4_MAXTEMP - 15, watch_temp_callback_E4);
1009
+          #endif // HOTENDS > 4
1011 1010
         #endif // HOTENDS > 3
1012 1011
       #endif // HOTENDS > 2
1013 1012
     #endif // HOTENDS > 1
@@ -1041,10 +1040,7 @@ void kill_screen(const char* lcd_msg) {
1041 1040
 
1042 1041
     //
1043 1042
     // Flow:
1044
-    // Flow 1:
1045
-    // Flow 2:
1046
-    // Flow 3:
1047
-    // Flow 4:
1043
+    // Flow [1-5]:
1048 1044
     //
1049 1045
     #if EXTRUDERS == 1
1050 1046
       MENU_ITEM_EDIT(int3, MSG_FLOW, &flow_percentage[0], 10, 999);
@@ -1056,6 +1052,9 @@ void kill_screen(const char* lcd_msg) {
1056 1052
         MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N3, &flow_percentage[2], 10, 999);
1057 1053
         #if EXTRUDERS > 3
1058 1054
           MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N4, &flow_percentage[3], 10, 999);
1055
+          #if EXTRUDERS > 4
1056
+            MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N5, &flow_percentage[4], 10, 999);
1057
+          #endif //EXTRUDERS > 4
1059 1058
         #endif //EXTRUDERS > 3
1060 1059
       #endif //EXTRUDERS > 2
1061 1060
     #endif //EXTRUDERS > 1
@@ -1109,7 +1108,7 @@ void kill_screen(const char* lcd_msg) {
1109 1108
     }
1110 1109
   #endif
1111 1110
 
1112
-  constexpr int heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP);
1111
+  constexpr int heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
1113 1112
 
1114 1113
   /**
1115 1114
    *
@@ -1165,8 +1164,16 @@ void kill_screen(const char* lcd_msg) {
1165 1164
           void lcd_preheat_m1_e3() { _lcd_preheat(3, lcd_preheat_hotend_temp[0], lcd_preheat_bed_temp[0], lcd_preheat_fan_speed[0]); }
1166 1165
           void lcd_preheat_m2_e3() { _lcd_preheat(3, lcd_preheat_hotend_temp[1], lcd_preheat_bed_temp[1], lcd_preheat_fan_speed[1]); }
1167 1166
         #endif
1168
-      #endif
1169
-    #endif
1167
+        #if HOTENDS > 4
1168
+          void lcd_preheat_m1_e4_only() { _lcd_preheat(4, lcd_preheat_hotend_temp[0], -1, lcd_preheat_fan_speed[0]); }
1169
+          void lcd_preheat_m2_e4_only() { _lcd_preheat(4, lcd_preheat_hotend_temp[1], -1, lcd_preheat_fan_speed[1]); }
1170
+          #if TEMP_SENSOR_BED != 0
1171
+            void lcd_preheat_m1_e4() { _lcd_preheat(4, lcd_preheat_hotend_temp[0], lcd_preheat_bed_temp[0], lcd_preheat_fan_speed[0]); }
1172
+            void lcd_preheat_m2_e4() { _lcd_preheat(4, lcd_preheat_hotend_temp[1], lcd_preheat_bed_temp[1], lcd_preheat_fan_speed[1]); }
1173
+          #endif
1174
+        #endif // HOTENDS > 4
1175
+      #endif // HOTENDS > 3
1176
+    #endif // HOTENDS > 2
1170 1177
 
1171 1178
     void lcd_preheat_m1_all() {
1172 1179
       #if HOTENDS > 1
@@ -1175,9 +1182,12 @@ void kill_screen(const char* lcd_msg) {
1175 1182
           thermalManager.setTargetHotend(lcd_preheat_hotend_temp[0], 2);
1176 1183
           #if HOTENDS > 3
1177 1184
             thermalManager.setTargetHotend(lcd_preheat_hotend_temp[0], 3);
1178
-          #endif
1179
-        #endif
1180
-      #endif
1185
+            #if HOTENDS > 4
1186
+              thermalManager.setTargetHotend(lcd_preheat_hotend_temp[0], 4);
1187
+            #endif // HOTENDS > 4
1188
+          #endif // HOTENDS > 3
1189
+        #endif // HOTENDS > 2
1190
+      #endif // HOTENDS > 1
1181 1191
       #if TEMP_SENSOR_BED != 0
1182 1192
         lcd_preheat_m1_e0();
1183 1193
       #else
@@ -1191,9 +1201,12 @@ void kill_screen(const char* lcd_msg) {
1191 1201
           thermalManager.setTargetHotend(lcd_preheat_hotend_temp[1], 2);
1192 1202
           #if HOTENDS > 3
1193 1203
             thermalManager.setTargetHotend(lcd_preheat_hotend_temp[1], 3);
1194
-          #endif
1195
-        #endif
1196
-      #endif
1204
+            #if HOTENDS > 4
1205
+              thermalManager.setTargetHotend(lcd_preheat_hotend_temp[1], 4);
1206
+            #endif // HOTENDS > 4
1207
+          #endif // HOTENDS > 3
1208
+        #endif // HOTENDS > 2
1209
+      #endif // HOTENDS > 1
1197 1210
       #if TEMP_SENSOR_BED != 0
1198 1211
         lcd_preheat_m2_e0();
1199 1212
       #else
@@ -1244,10 +1257,18 @@ void kill_screen(const char* lcd_msg) {
1244 1257
             #else
1245 1258
               MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3_only);
1246 1259
             #endif
1247
-          #endif
1248
-        #endif
1260
+            #if HOTENDS > 4
1261
+              #if TEMP_SENSOR_BED != 0
1262
+                MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H5, lcd_preheat_m1_e4);
1263
+                MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E5, lcd_preheat_m1_e4_only);
1264
+              #else
1265
+                MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H5, lcd_preheat_m1_e4_only);
1266
+              #endif
1267
+            #endif // HOTENDS > 4
1268
+          #endif // HOTENDS > 3
1269
+        #endif // HOTENDS > 2
1249 1270
         MENU_ITEM(function, MSG_PREHEAT_1_ALL, lcd_preheat_m1_all);
1250
-      #endif
1271
+      #endif // HOTENDS > 1
1251 1272
       #if TEMP_SENSOR_BED != 0
1252 1273
         MENU_ITEM(function, MSG_PREHEAT_1_BEDONLY, lcd_preheat_m1_bedonly);
1253 1274
       #endif
@@ -1288,10 +1309,18 @@ void kill_screen(const char* lcd_msg) {
1288 1309
             #else
1289 1310
               MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3_only);
1290 1311
             #endif
1291
-          #endif
1292
-        #endif
1312
+            #if HOTENDS > 4
1313
+              #if TEMP_SENSOR_BED != 0
1314
+                MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H5, lcd_preheat_m2_e4);
1315
+                MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E5, lcd_preheat_m2_e4_only);
1316
+              #else
1317
+                MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H5, lcd_preheat_m2_e4_only);
1318
+              #endif
1319
+            #endif // HOTENDS > 4
1320
+          #endif // HOTENDS > 3
1321
+        #endif // HOTENDS > 2
1293 1322
         MENU_ITEM(function, MSG_PREHEAT_2_ALL, lcd_preheat_m2_all);
1294
-      #endif
1323
+      #endif // HOTENDS > 1
1295 1324
       #if TEMP_SENSOR_BED != 0
1296 1325
         MENU_ITEM(function, MSG_PREHEAT_2_BEDONLY, lcd_preheat_m2_bedonly);
1297 1326
       #endif
@@ -2104,16 +2133,16 @@ void kill_screen(const char* lcd_msg) {
2104 2133
       PID_PARAM(Kd, e) = scalePID_d(raw_Kd);
2105 2134
       thermalManager.updatePID();
2106 2135
     }
2107
-    #define _PIDTEMP_BASE_FUNCTIONS(eindex) \
2108
-      void copy_and_scalePID_i_E ## eindex() { copy_and_scalePID_i(eindex); } \
2109
-      void copy_and_scalePID_d_E ## eindex() { copy_and_scalePID_d(eindex); }
2136
+    #define _PIDTEMP_BASE_FUNCTIONS(N) \
2137
+      void copy_and_scalePID_i_E ## N() { copy_and_scalePID_i(N); } \
2138
+      void copy_and_scalePID_d_E ## N() { copy_and_scalePID_d(N); }
2110 2139
 
2111 2140
     #if ENABLED(PID_AUTOTUNE_MENU)
2112
-      #define _PIDTEMP_FUNCTIONS(eindex) \
2113
-        _PIDTEMP_BASE_FUNCTIONS(eindex); \
2114
-        void lcd_autotune_callback_E ## eindex() { _lcd_autotune(eindex); }
2141
+      #define _PIDTEMP_FUNCTIONS(N) \
2142
+        _PIDTEMP_BASE_FUNCTIONS(N); \
2143
+        void lcd_autotune_callback_E ## N() { _lcd_autotune(N); }
2115 2144
     #else
2116
-      #define _PIDTEMP_FUNCTIONS(eindex) _PIDTEMP_BASE_FUNCTIONS(eindex)
2145
+      #define _PIDTEMP_FUNCTIONS(N) _PIDTEMP_BASE_FUNCTIONS(N)
2117 2146
     #endif
2118 2147
 
2119 2148
     _PIDTEMP_FUNCTIONS(0)
@@ -2124,12 +2153,15 @@ void kill_screen(const char* lcd_msg) {
2124 2153
           _PIDTEMP_FUNCTIONS(2)
2125 2154
           #if HOTENDS > 3
2126 2155
             _PIDTEMP_FUNCTIONS(3)
2127
-          #endif //HOTENDS > 3
2128
-        #endif //HOTENDS > 2
2129
-      #endif //HOTENDS > 1
2130
-    #endif //PID_PARAMS_PER_HOTEND
2156
+            #if HOTENDS > 4
2157
+              _PIDTEMP_FUNCTIONS(4)
2158
+            #endif // HOTENDS > 4
2159
+          #endif // HOTENDS > 3
2160
+        #endif // HOTENDS > 2
2161
+      #endif // HOTENDS > 1
2162
+    #endif // PID_PARAMS_PER_HOTEND
2131 2163
 
2132
-  #endif //PIDTEMP
2164
+  #endif // PIDTEMP
2133 2165
 
2134 2166
   /**
2135 2167
    *
@@ -2146,27 +2178,20 @@ void kill_screen(const char* lcd_msg) {
2146 2178
 
2147 2179
     //
2148 2180
     // Nozzle:
2149
-    // Nozzle [1-4]:
2181
+    // Nozzle [1-5]:
2150 2182
     //
2151 2183
     #if HOTENDS == 1
2152
-      #if TEMP_SENSOR_0 != 0
2153
-        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
2154
-      #endif
2155
-    #else //HOTENDS > 1
2156
-      #if TEMP_SENSOR_0 != 0
2157
-        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N1, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
2158
-      #endif
2159
-      #if TEMP_SENSOR_1 != 0
2160
-        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N2, &thermalManager.target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1);
2161
-      #endif
2184
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
2185
+    #else // HOTENDS > 1
2186
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N1, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
2187
+      MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N2, &thermalManager.target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1);
2162 2188
       #if HOTENDS > 2
2163
-        #if TEMP_SENSOR_2 != 0
2164
-          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N3, &thermalManager.target_temperature[2], 0, HEATER_2_MAXTEMP - 15, watch_temp_callback_E2);
2165
-        #endif
2189
+        MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N3, &thermalManager.target_temperature[2], 0, HEATER_2_MAXTEMP - 15, watch_temp_callback_E2);
2166 2190
         #if HOTENDS > 3
2167
-          #if TEMP_SENSOR_3 != 0
2168
-            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N4, &thermalManager.target_temperature[3], 0, HEATER_3_MAXTEMP - 15, watch_temp_callback_E3);
2169
-          #endif
2191
+          MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N4, &thermalManager.target_temperature[3], 0, HEATER_3_MAXTEMP - 15, watch_temp_callback_E3);
2192
+          #if HOTENDS > 4
2193
+            MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N5, &thermalManager.target_temperature[4], 0, HEATER_4_MAXTEMP - 15, watch_temp_callback_E4);
2194
+          #endif // HOTENDS > 4
2170 2195
         #endif // HOTENDS > 3
2171 2196
       #endif // HOTENDS > 2
2172 2197
     #endif // HOTENDS > 1
@@ -2247,11 +2272,14 @@ void kill_screen(const char* lcd_msg) {
2247 2272
           PID_MENU_ITEMS(" " MSG_E3, 2);
2248 2273
           #if HOTENDS > 3
2249 2274
             PID_MENU_ITEMS(" " MSG_E4, 3);
2250
-          #endif //HOTENDS > 3
2251
-        #endif //HOTENDS > 2
2252
-      #else //!PID_PARAMS_PER_HOTEND || HOTENDS == 1
2275
+            #if HOTENDS > 4
2276
+              PID_MENU_ITEMS(" " MSG_E5, 4);
2277
+            #endif // HOTENDS > 4
2278
+          #endif // HOTENDS > 3
2279
+        #endif // HOTENDS > 2
2280
+      #else // !PID_PARAMS_PER_HOTEND || HOTENDS == 1
2253 2281
         PID_MENU_ITEMS("", 0);
2254
-      #endif //!PID_PARAMS_PER_HOTEND || HOTENDS == 1
2282
+      #endif // !PID_PARAMS_PER_HOTEND || HOTENDS == 1
2255 2283
 
2256 2284
     #endif //PIDTEMP
2257 2285
 
@@ -2268,7 +2296,10 @@ void kill_screen(const char* lcd_msg) {
2268 2296
   }
2269 2297
 
2270 2298
   void _lcd_control_temperature_preheat_settings_menu(uint8_t material) {
2271
-    #if HOTENDS > 3
2299
+    #if HOTENDS > 4
2300
+      #define MINTEMP_ALL MIN5(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP, HEATER_4_MINTEMP)
2301
+      #define MAXTEMP_ALL MAX5(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP)
2302
+    #elif HOTENDS > 3
2272 2303
       #define MINTEMP_ALL MIN4(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP)
2273 2304
       #define MAXTEMP_ALL MAX4(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP)
2274 2305
     #elif HOTENDS > 2
@@ -2455,16 +2486,19 @@ void kill_screen(const char* lcd_msg) {
2455 2486
     if (volumetric_enabled) {
2456 2487
       #if EXTRUDERS == 1
2457 2488
         MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM, &filament_size[0], 1.5, 3.25, calculate_volumetric_multipliers);
2458
-      #else //EXTRUDERS > 1
2489
+      #else // EXTRUDERS > 1
2459 2490
         MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E1, &filament_size[0], 1.5, 3.25, calculate_volumetric_multipliers);
2460 2491
         MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E2, &filament_size[1], 1.5, 3.25, calculate_volumetric_multipliers);
2461 2492
         #if EXTRUDERS > 2
2462 2493
           MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E3, &filament_size[2], 1.5, 3.25, calculate_volumetric_multipliers);
2463 2494
           #if EXTRUDERS > 3
2464 2495
             MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E4, &filament_size[3], 1.5, 3.25, calculate_volumetric_multipliers);
2465
-          #endif //EXTRUDERS > 3
2466
-        #endif //EXTRUDERS > 2
2467
-      #endif //EXTRUDERS > 1
2496
+            #if EXTRUDERS > 4
2497
+              MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E5, &filament_size[4], 1.5, 3.25, calculate_volumetric_multipliers);
2498
+            #endif // EXTRUDERS > 4
2499
+          #endif // EXTRUDERS > 3
2500
+        #endif // EXTRUDERS > 2
2501
+      #endif // EXTRUDERS > 1
2468 2502
     }
2469 2503
 
2470 2504
     END_MENU();

Loading…
Cancel
Save