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
     #define HEATER_3_USES_THERMISTOR
279
     #define HEATER_3_USES_THERMISTOR
280
   #endif
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
   #if TEMP_SENSOR_BED <= -2
294
   #if TEMP_SENSOR_BED <= -2
283
     #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED"
295
     #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED"
284
   #elif TEMP_SENSOR_BED == -1
296
   #elif TEMP_SENSOR_BED == -1
427
   #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2)
439
   #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2)
428
   #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2)
440
   #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2)
429
   #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0 && TEMP_SENSOR_3 > -2)
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
   #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
443
   #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
431
   #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
444
   #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
432
   #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
445
   #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
433
   #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
446
   #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
434
   #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
447
   #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
448
+  #define HAS_HEATER_4 (PIN_EXISTS(HEATER_4))
435
   #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
449
   #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
436
   #define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN))
450
   #define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN))
437
   #define HAS_AUTO_FAN_1 (HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN))
451
   #define HAS_AUTO_FAN_1 (HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN))
438
   #define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN))
452
   #define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN))
439
   #define HAS_AUTO_FAN_3 (HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN))
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
   #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
455
   #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
441
   #define AUTO_1_IS_0 (E1_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
456
   #define AUTO_1_IS_0 (E1_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
442
   #define AUTO_2_IS_0 (E2_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
457
   #define AUTO_2_IS_0 (E2_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
444
   #define AUTO_3_IS_0 (E3_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
459
   #define AUTO_3_IS_0 (E3_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
445
   #define AUTO_3_IS_1 (E3_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
460
   #define AUTO_3_IS_1 (E3_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
446
   #define AUTO_3_IS_2 (E3_AUTO_FAN_PIN == E2_AUTO_FAN_PIN)
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
   #define HAS_FAN0 (PIN_EXISTS(FAN))
466
   #define HAS_FAN0 (PIN_EXISTS(FAN))
448
   #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)
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
   #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)
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
       #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v)
562
       #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v)
544
       #if HOTENDS > 3
563
       #if HOTENDS > 3
545
         #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, v)
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
   #if ENABLED(HEATERS_PARALLEL)
571
   #if ENABLED(HEATERS_PARALLEL)
550
     #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); }
572
     #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); }
551
   #else
573
   #else

+ 4
- 0
Marlin/Configuration.h View File

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

+ 1
- 0
Marlin/Configuration_adv.h View File

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

+ 10
- 0
Marlin/Marlin.h View File

113
   #define disable_e2() NOOP
113
   #define disable_e2() NOOP
114
   #define  enable_e3() NOOP
114
   #define  enable_e3() NOOP
115
   #define disable_e3() NOOP
115
   #define disable_e3() NOOP
116
+  #define  enable_e4() NOOP
117
+  #define disable_e4() NOOP
116
 
118
 
117
 #else // !MIXING_EXTRUDER
119
 #else // !MIXING_EXTRUDER
118
 
120
 
148
     #define disable_e3() NOOP
150
     #define disable_e3() NOOP
149
   #endif
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
 #endif // !MIXING_EXTRUDER
161
 #endif // !MIXING_EXTRUDER
152
 
162
 
153
 #if ENABLED(G38_PROBE_TARGET)
163
 #if ENABLED(G38_PROBE_TARGET)

+ 25
- 9
Marlin/Marlin_main.cpp View File

10704
               || E2_ENABLE_READ == E_ENABLE_ON
10704
               || E2_ENABLE_READ == E_ENABLE_ON
10705
               #if E_STEPPERS > 3
10705
               #if E_STEPPERS > 3
10706
                 || E3_ENABLE_READ == E_ENABLE_ON
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
         lastMotorOn = ms; //... set time to NOW so the fan will turn on
10714
         lastMotorOn = ms; //... set time to NOW so the fan will turn on
10712
       }
10715
       }
10927
   enable_e1();
10930
   enable_e1();
10928
   enable_e2();
10931
   enable_e2();
10929
   enable_e3();
10932
   enable_e3();
10933
+  enable_e4();
10930
 }
10934
 }
10931
 
10935
 
10932
 void disable_e_steppers() {
10936
 void disable_e_steppers() {
10934
   disable_e1();
10938
   disable_e1();
10935
   disable_e2();
10939
   disable_e2();
10936
   disable_e3();
10940
   disable_e3();
10941
+  disable_e4();
10937
 }
10942
 }
10938
 
10943
 
10939
 void disable_all_steppers() {
10944
 void disable_all_steppers() {
11132
                   oldstatus = E3_ENABLE_READ;
11137
                   oldstatus = E3_ENABLE_READ;
11133
                   enable_e3();
11138
                   enable_e3();
11134
                   break;
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
       #endif // !SWITCHING_EXTRUDER
11150
       #endif // !SWITCHING_EXTRUDER
11140
 
11151
 
11165
                 case 3:
11176
                 case 3:
11166
                   E3_ENABLE_WRITE(oldstatus);
11177
                   E3_ENABLE_WRITE(oldstatus);
11167
                   break;
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
       #endif // !SWITCHING_EXTRUDER
11188
       #endif // !SWITCHING_EXTRUDER
11173
     }
11189
     }

+ 25
- 4
Marlin/SanityCheck.h View File

309
  */
309
  */
310
 #if EXTRUDERS > 1
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
   #endif
314
   #endif
315
 
315
 
316
   #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
316
   #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
800
     #endif
800
     #endif
801
     #if HOTENDS > 3
801
     #if HOTENDS > 3
802
       #if TEMP_SENSOR_3 == 0
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
       #elif !HAS_HEATER_3
804
       #elif !HAS_HEATER_3
805
         #error "HEATER_3_PIN not defined for this board."
805
         #error "HEATER_3_PIN not defined for this board."
806
       #elif !PIN_EXISTS(TEMP_3)
806
       #elif !PIN_EXISTS(TEMP_3)
807
         #error "TEMP_3_PIN not defined for this board."
807
         #error "TEMP_3_PIN not defined for this board."
808
       #endif
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
     #elif TEMP_SENSOR_3 != 0
820
     #elif TEMP_SENSOR_3 != 0
810
       #error "TEMP_SENSOR_3 shouldn't be set with only 3 extruders."
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
     #endif
824
     #endif
812
   #elif TEMP_SENSOR_2 != 0
825
   #elif TEMP_SENSOR_2 != 0
813
     #error "TEMP_SENSOR_2 shouldn't be set with only 2 extruders."
826
     #error "TEMP_SENSOR_2 shouldn't be set with only 2 extruders."
814
   #elif TEMP_SENSOR_3 != 0
827
   #elif TEMP_SENSOR_3 != 0
815
     #error "TEMP_SENSOR_3 shouldn't be set with only 2 extruders."
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
   #endif
831
   #endif
817
 #elif TEMP_SENSOR_1 != 0 && DISABLED(TEMP_SENSOR_1_AS_REDUNDANT)
832
 #elif TEMP_SENSOR_1 != 0 && DISABLED(TEMP_SENSOR_1_AS_REDUNDANT)
818
   #error "TEMP_SENSOR_1 shouldn't be set with only 1 extruder."
833
   #error "TEMP_SENSOR_1 shouldn't be set with only 1 extruder."
820
   #error "TEMP_SENSOR_2 shouldn't be set with only 1 extruder."
835
   #error "TEMP_SENSOR_2 shouldn't be set with only 1 extruder."
821
 #elif TEMP_SENSOR_3 != 0
836
 #elif TEMP_SENSOR_3 != 0
822
   #error "TEMP_SENSOR_3 shouldn't be set with only 1 extruder."
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
 #endif
840
 #endif
824
 
841
 
825
 #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0
842
 #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0
853
 /**
870
 /**
854
  * Test Extruder Pins
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
   #if !PIN_EXISTS(E3_STEP) || !PIN_EXISTS(E3_DIR) || !PIN_EXISTS(E3_ENABLE)
878
   #if !PIN_EXISTS(E3_STEP) || !PIN_EXISTS(E3_DIR) || !PIN_EXISTS(E3_ENABLE)
858
     #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
879
     #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
859
   #endif
880
   #endif

+ 80
- 74
Marlin/configuration_store.cpp View File

36
  *
36
  *
37
  */
37
  */
38
 
38
 
39
-#define EEPROM_VERSION "V31"
39
+#define EEPROM_VERSION "V32"
40
 
40
 
41
 // Change EEPROM version if these are changed:
41
 // Change EEPROM version if these are changed:
42
 #define EEPROM_OFFSET 100
42
 #define EEPROM_OFFSET 100
44
 /**
44
 /**
45
  * V31 EEPROM Layout:
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
  *  106            E_STEPPERS (uint8_t)
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
  *  171  M205 T    planner.min_travel_feedrate_mm_s (float)
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
  * DELTA (if deltabot):                             48 bytes
87
  * DELTA (if deltabot):                             48 bytes
88
  *  348  M666 XYZ  endstop_adj                      (float x3)
88
  *  348  M666 XYZ  endstop_adj                      (float x3)
96
  *  388  M665 J    delta_tower_angle_trim[B]        (float)
96
  *  388  M665 J    delta_tower_angle_trim[B]        (float)
97
  *  392  M665 K    delta_tower_angle_trim[C]        (float)
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
  * PIDTEMPBED:                                      12 bytes
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
  * DOGLCD:                                          2 bytes
119
  * DOGLCD:                                          2 bytes
119
- *  486  M250 C    lcd_contrast                     (int)
120
+ *  502  M250 C    lcd_contrast                     (int)
120
  *
121
  *
121
  * FWRETRACT:                                       29 bytes
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
  * TMC2130 Stepper Current:                         20 bytes
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
 #include "Marlin.h"
152
 #include "Marlin.h"
1433
           CONFIG_ECHO_START;
1434
           CONFIG_ECHO_START;
1434
           SERIAL_ECHOPAIR("  M200 T3 D", filament_size[3]);
1435
           SERIAL_ECHOPAIR("  M200 T3 D", filament_size[3]);
1435
           SERIAL_EOL;
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
     if (!volumetric_enabled) {
1446
     if (!volumetric_enabled) {
1441
       CONFIG_ECHO_START;
1447
       CONFIG_ECHO_START;

+ 2
- 0
Marlin/enum.h View File

106
   MeasureTemp_2,
106
   MeasureTemp_2,
107
   PrepareTemp_3,
107
   PrepareTemp_3,
108
   MeasureTemp_3,
108
   MeasureTemp_3,
109
+  PrepareTemp_4,
110
+  MeasureTemp_4,
109
   Prepare_FILWIDTH,
111
   Prepare_FILWIDTH,
110
   Measure_FILWIDTH,
112
   Measure_FILWIDTH,
111
   StartupDelay // Startup, delay initial temp reading a tiny bit so the hardware can settle
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
 #define TEMP_SENSOR_1 -1
255
 #define TEMP_SENSOR_1 -1
256
 #define TEMP_SENSOR_2 1
256
 #define TEMP_SENSOR_2 1
257
 #define TEMP_SENSOR_3 0
257
 #define TEMP_SENSOR_3 0
258
+#define TEMP_SENSOR_4 0
258
 #define TEMP_SENSOR_BED 1
259
 #define TEMP_SENSOR_BED 1
259
 
260
 
260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
261
 // Dummy thermistor constant temperature readings, for use with 998 and 999
283
 #define HEATER_1_MINTEMP 5
284
 #define HEATER_1_MINTEMP 5
284
 #define HEATER_2_MINTEMP 5
285
 #define HEATER_2_MINTEMP 5
285
 #define HEATER_3_MINTEMP 5
286
 #define HEATER_3_MINTEMP 5
287
+#define HEATER_4_MINTEMP 5
286
 #define BED_MINTEMP 5
288
 #define BED_MINTEMP 5
287
 
289
 
288
 // When temperature exceeds max temp, your heater will be switched off.
290
 // When temperature exceeds max temp, your heater will be switched off.
752
 #define INVERT_E1_DIR false
754
 #define INVERT_E1_DIR false
753
 #define INVERT_E2_DIR false
755
 #define INVERT_E2_DIR false
754
 #define INVERT_E3_DIR false
756
 #define INVERT_E3_DIR false
757
+#define INVERT_E4_DIR false
755
 
758
 
756
 // @section homing
759
 // @section homing
757
 
760
 

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

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

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

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

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

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

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

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

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

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

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

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

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

250
  *
250
  *
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" }
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
 #define TEMP_SENSOR_BED 0
258
 #define TEMP_SENSOR_BED 0
258
 
259
 
259
 // Dummy thermistor constant temperature readings, for use with 998 and 999
260
 // Dummy thermistor constant temperature readings, for use with 998 and 999
279
 // to check that the wiring to the thermistor is not broken.
280
 // to check that the wiring to the thermistor is not broken.
280
 // Otherwise this would lead to the heater being powered on all the time.
281
 // Otherwise this would lead to the heater being powered on all the time.
281
 #define HEATER_0_MINTEMP 15
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
 // When temperature exceeds max temp, your heater will be switched off.
289
 // When temperature exceeds max temp, your heater will be switched off.
288
 // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
290
 // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
289
 // You should use MINTEMP for thermistor short/failure protection.
291
 // You should use MINTEMP for thermistor short/failure protection.
290
 #define HEATER_0_MAXTEMP 250
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
 //============================= PID Settings ================================
300
 //============================= PID Settings ================================
746
 #define INVERT_E1_DIR false
749
 #define INVERT_E1_DIR false
747
 #define INVERT_E2_DIR false
750
 #define INVERT_E2_DIR false
748
 #define INVERT_E3_DIR false
751
 #define INVERT_E3_DIR false
752
+#define INVERT_E4_DIR false
749
 
753
 
750
 // @section homing
754
 // @section homing
751
 
755
 

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

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

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

274
 #define TEMP_SENSOR_1 0
274
 #define TEMP_SENSOR_1 0
275
 #define TEMP_SENSOR_2 0
275
 #define TEMP_SENSOR_2 0
276
 #define TEMP_SENSOR_3 0
276
 #define TEMP_SENSOR_3 0
277
+#define TEMP_SENSOR_4 0
277
 #define TEMP_SENSOR_BED 5
278
 #define TEMP_SENSOR_BED 5
278
 
279
 
279
 // Dummy thermistor constant temperature readings, for use with 998 and 999
280
 // Dummy thermistor constant temperature readings, for use with 998 and 999
302
 #define HEATER_1_MINTEMP 5
303
 #define HEATER_1_MINTEMP 5
303
 #define HEATER_2_MINTEMP 5
304
 #define HEATER_2_MINTEMP 5
304
 #define HEATER_3_MINTEMP 5
305
 #define HEATER_3_MINTEMP 5
306
+#define HEATER_4_MINTEMP 5
305
 #define BED_MINTEMP 5
307
 #define BED_MINTEMP 5
306
 
308
 
307
 // When temperature exceeds max temp, your heater will be switched off.
309
 // When temperature exceeds max temp, your heater will be switched off.
311
 #define HEATER_1_MAXTEMP 275
313
 #define HEATER_1_MAXTEMP 275
312
 #define HEATER_2_MAXTEMP 275
314
 #define HEATER_2_MAXTEMP 275
313
 #define HEATER_3_MAXTEMP 275
315
 #define HEATER_3_MAXTEMP 275
316
+#define HEATER_4_MAXTEMP 275
314
 #define BED_MAXTEMP 150
317
 #define BED_MAXTEMP 150
315
 
318
 
316
 //===========================================================================
319
 //===========================================================================
780
 #define INVERT_E1_DIR true
783
 #define INVERT_E1_DIR true
781
 #define INVERT_E2_DIR true
784
 #define INVERT_E2_DIR true
782
 #define INVERT_E3_DIR true
785
 #define INVERT_E3_DIR true
786
+#define INVERT_E4_DIR true
783
 
787
 
784
 // @section homing
788
 // @section homing
785
 // K8200: it is usual to have clamps for the glass plate on the heatbed
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
 #define E1_AUTO_FAN_PIN -1
234
 #define E1_AUTO_FAN_PIN -1
235
 #define E2_AUTO_FAN_PIN -1
235
 #define E2_AUTO_FAN_PIN -1
236
 #define E3_AUTO_FAN_PIN -1
236
 #define E3_AUTO_FAN_PIN -1
237
+#define E4_AUTO_FAN_PIN -1
237
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
238
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
238
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
239
 #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
239
 
240
 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 5
- 0
Marlin/language.h View File

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

+ 6
- 4
Marlin/macros.h View File

128
 
128
 
129
 #define CEILING(x,y) (((x) + (y) - 1) / (y))
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
 #define UNEAR_ZERO(x) ((x) < 0.000001)
138
 #define UNEAR_ZERO(x) ((x) < 0.000001)
137
 #define NEAR_ZERO(x) WITHIN(x, -0.000001, 0.000001)
139
 #define NEAR_ZERO(x) WITHIN(x, -0.000001, 0.000001)

+ 15
- 12
Marlin/pins.h View File

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

+ 2
- 2
Marlin/pins_AZTEEG_X3.h View File

24
  * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments
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
 #endif
29
 #endif
30
 
30
 
31
 #define BOARD_NAME "Azteeg X3"
31
 #define BOARD_NAME "Azteeg X3"

+ 4
- 0
Marlin/pins_AZTEEG_X3_PRO.h View File

24
  * AZTEEG_X3_PRO (Arduino Mega) pin assignments
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
 #define BOARD_NAME "Azteeg X3 Pro"
31
 #define BOARD_NAME "Azteeg X3 Pro"
28
 
32
 
29
 #include "pins_RAMPS.h"
33
 #include "pins_RAMPS.h"

+ 2
- 2
Marlin/pins_BAM_DICE_DUE.h View File

24
  * BAM&DICE Due (Arduino Mega) pin assignments
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
 #endif
29
 #endif
30
 
30
 
31
 #define BOARD_NAME "2PrintBeta Due"
31
 #define BOARD_NAME "2PrintBeta Due"

+ 2
- 2
Marlin/pins_FELIX2.h View File

24
  * FELIXprinters v2.0/3.0 (RAMPS v1.4) pin assignments
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
 #endif
29
 #endif
30
 
30
 
31
 #define BOARD_NAME "Felix 2.0+"
31
 #define BOARD_NAME "Felix 2.0+"

+ 2
- 2
Marlin/pins_MEGACONTROLLER.h View File

28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29
 #endif
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
 #endif
33
 #endif
34
 
34
 
35
 #define BOARD_NAME "Mega Controller"
35
 #define BOARD_NAME "Mega Controller"

+ 2
- 2
Marlin/pins_MINITRONICS.h View File

28
   #error "Oops!  Make sure you have 'Minitronics' selected from the 'Tools -> Boards' menu."
28
   #error "Oops!  Make sure you have 'Minitronics' selected from the 'Tools -> Boards' menu."
29
 #endif
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
 #endif
33
 #endif
34
 
34
 
35
 #define BOARD_NAME         "Minitronics v1.0 / v1.1"
35
 #define BOARD_NAME         "Minitronics v1.0 / v1.1"

+ 2
- 2
Marlin/pins_MKS_13.h View File

29
  *  MKS v1.4  (Extruder, Extruder, Fan, Bed)
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
 #endif
34
 #endif
35
 
35
 
36
 #define BOARD_NAME "MKS > v1.3"
36
 #define BOARD_NAME "MKS > v1.3"

+ 2
- 2
Marlin/pins_MKS_BASE.h View File

24
  * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments
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
 #endif
29
 #endif
30
 
30
 
31
 #define BOARD_NAME "MKS BASE 1.0"
31
 #define BOARD_NAME "MKS BASE 1.0"

+ 2
- 2
Marlin/pins_RUMBA.h View File

28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29
 #endif
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
 #endif
33
 #endif
34
 
34
 
35
 #define DEFAULT_MACHINE_NAME "Rumba"
35
 #define DEFAULT_MACHINE_NAME "Rumba"

+ 2
- 2
Marlin/pins_SAINSMART_2IN1.h View File

24
  *  Sainsmart 2-in-1 pin assignments
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
 #endif
29
 #endif
30
 
30
 
31
 #define BOARD_NAME "Sainsmart"
31
 #define BOARD_NAME "Sainsmart"

+ 28
- 5
Marlin/planner.cpp View File

882
               if (g_uc_extruder_last_move[2] == 0) disable_e2();
882
               if (g_uc_extruder_last_move[2] == 0) disable_e2();
883
               #if EXTRUDERS > 3
883
               #if EXTRUDERS > 3
884
                 if (g_uc_extruder_last_move[3] == 0) disable_e3();
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
         break;
891
         break;
889
         #if EXTRUDERS > 1
892
         #if EXTRUDERS > 1
890
           case 1:
893
           case 1:
895
               if (g_uc_extruder_last_move[2] == 0) disable_e2();
898
               if (g_uc_extruder_last_move[2] == 0) disable_e2();
896
               #if EXTRUDERS > 3
899
               #if EXTRUDERS > 3
897
                 if (g_uc_extruder_last_move[3] == 0) disable_e3();
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
           break;
906
           break;
901
           #if EXTRUDERS > 2
907
           #if EXTRUDERS > 2
902
             case 2:
908
             case 2:
906
               if (g_uc_extruder_last_move[1] == 0) disable_e1();
912
               if (g_uc_extruder_last_move[1] == 0) disable_e1();
907
               #if EXTRUDERS > 3
913
               #if EXTRUDERS > 3
908
                 if (g_uc_extruder_last_move[3] == 0) disable_e3();
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
               #endif
918
               #endif
910
             break;
919
             break;
911
             #if EXTRUDERS > 3
920
             #if EXTRUDERS > 3
915
                 if (g_uc_extruder_last_move[0] == 0) disable_e0();
924
                 if (g_uc_extruder_last_move[0] == 0) disable_e0();
916
                 if (g_uc_extruder_last_move[1] == 0) disable_e1();
925
                 if (g_uc_extruder_last_move[1] == 0) disable_e1();
917
                 if (g_uc_extruder_last_move[2] == 0) disable_e2();
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
               break;
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
             #endif // EXTRUDERS > 3
941
             #endif // EXTRUDERS > 3
920
           #endif // EXTRUDERS > 2
942
           #endif // EXTRUDERS > 2
921
         #endif // EXTRUDERS > 1
943
         #endif // EXTRUDERS > 1
925
       enable_e1();
947
       enable_e1();
926
       enable_e2();
948
       enable_e2();
927
       enable_e3();
949
       enable_e3();
950
+      enable_e4();
928
     #endif
951
     #endif
929
   }
952
   }
930
 
953
 

+ 9
- 1
Marlin/stepper_indirection.h View File

388
   #define E_STEP_WRITE(v) E0_STEP_WRITE(v)
388
   #define E_STEP_WRITE(v) E0_STEP_WRITE(v)
389
   #define NORM_E_DIR() E0_DIR_WRITE(current_block->active_extruder ?  INVERT_E0_DIR : !INVERT_E0_DIR)
389
   #define NORM_E_DIR() E0_DIR_WRITE(current_block->active_extruder ?  INVERT_E0_DIR : !INVERT_E0_DIR)
390
   #define  REV_E_DIR() E0_DIR_WRITE(current_block->active_extruder ? !INVERT_E0_DIR :  INVERT_E0_DIR)
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
 #elif EXTRUDERS > 3
395
 #elif EXTRUDERS > 3
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); } }
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
   #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); } }
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
   #endif
412
   #endif
409
 #elif ENABLED(MIXING_EXTRUDER)
413
 #elif ENABLED(MIXING_EXTRUDER)
410
   #define E_STEP_WRITE(v) NOOP /* not used for mixing extruders! */
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
     #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); } }
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
     #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); }
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
     #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); }
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
   static void* heater_ttbl_map[2] = {(void*)HEATER_0_TEMPTABLE, (void*)HEATER_1_TEMPTABLE };
51
   static void* heater_ttbl_map[2] = {(void*)HEATER_0_TEMPTABLE, (void*)HEATER_1_TEMPTABLE };
52
   static uint8_t heater_ttbllen_map[2] = { HEATER_0_TEMPTABLE_LEN, HEATER_1_TEMPTABLE_LEN };
52
   static uint8_t heater_ttbllen_map[2] = { HEATER_0_TEMPTABLE_LEN, HEATER_1_TEMPTABLE_LEN };
53
 #else
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
 #endif
56
 #endif
57
 
57
 
58
 Temperature thermalManager;
58
 Temperature thermalManager;
161
 unsigned long Temperature::raw_temp_bed_value = 0;
161
 unsigned long Temperature::raw_temp_bed_value = 0;
162
 
162
 
163
 // Init min and max temp with extreme values to prevent false errors during startup
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
     Temperature::minttemp[HOTENDS] = { 0 },
166
     Temperature::minttemp[HOTENDS] = { 0 },
167
     Temperature::maxttemp[HOTENDS] = ARRAY_BY_HOTENDS1(16383);
167
     Temperature::maxttemp[HOTENDS] = ARRAY_BY_HOTENDS1(16383);
168
 
168
 
460
 #if HAS_AUTO_FAN
460
 #if HAS_AUTO_FAN
461
 
461
 
462
   void Temperature::checkExtruderAutoFans() {
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
                     0,
465
                     0,
466
       AUTO_1_IS_0 ? 0 :               1,
466
       AUTO_1_IS_0 ? 0 :               1,
467
       AUTO_2_IS_0 ? 0 : AUTO_2_IS_1 ? 1 :               2,
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
     uint8_t fanState = 0;
471
     uint8_t fanState = 0;
471
 
472
 
973
   #if HAS_HEATER_3
974
   #if HAS_HEATER_3
974
     SET_OUTPUT(HEATER_3_PIN);
975
     SET_OUTPUT(HEATER_3_PIN);
975
   #endif
976
   #endif
977
+  #if HAS_HEATER_4
978
+    SET_OUTPUT(HEATER_3_PIN);
979
+  #endif
976
   #if HAS_HEATER_BED
980
   #if HAS_HEATER_BED
977
     SET_OUTPUT(HEATER_BED_PIN);
981
     SET_OUTPUT(HEATER_BED_PIN);
978
   #endif
982
   #endif
1033
   #if HAS_TEMP_3
1037
   #if HAS_TEMP_3
1034
     ANALOG_SELECT(TEMP_3_PIN);
1038
     ANALOG_SELECT(TEMP_3_PIN);
1035
   #endif
1039
   #endif
1040
+  #if HAS_TEMP_4
1041
+    ANALOG_SELECT(TEMP_4_PIN);
1042
+  #endif
1036
   #if HAS_TEMP_BED
1043
   #if HAS_TEMP_BED
1037
     ANALOG_SELECT(TEMP_BED_PIN);
1044
     ANALOG_SELECT(TEMP_BED_PIN);
1038
   #endif
1045
   #endif
1080
       SET_OUTPUT(E3_AUTO_FAN_PIN);
1087
       SET_OUTPUT(E3_AUTO_FAN_PIN);
1081
     #endif
1088
     #endif
1082
   #endif
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
   // Use timer0 for temperature measurement
1101
   // Use timer0 for temperature measurement
1085
   // Interleave temperature interrupt with millies interrupt
1102
   // Interleave temperature interrupt with millies interrupt
1133
         #ifdef HEATER_3_MAXTEMP
1150
         #ifdef HEATER_3_MAXTEMP
1134
           TEMP_MAX_ROUTINE(3);
1151
           TEMP_MAX_ROUTINE(3);
1135
         #endif
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
       #endif // HOTENDS > 3
1161
       #endif // HOTENDS > 3
1137
     #endif // HOTENDS > 2
1162
     #endif // HOTENDS > 2
1138
   #endif // HOTENDS > 1
1163
   #endif // HOTENDS > 1
1264
 
1289
 
1265
   #if HAS_TEMP_HOTEND
1290
   #if HAS_TEMP_HOTEND
1266
     DISABLE_HEATER(0);
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
   #endif
1304
   #endif
1280
 
1305
 
1281
   #if HAS_TEMP_BED
1306
   #if HAS_TEMP_BED
1384
       current_temperature_raw[2] = raw_temp_value[2];
1409
       current_temperature_raw[2] = raw_temp_value[2];
1385
       #if HAS_TEMP_3
1410
       #if HAS_TEMP_3
1386
         current_temperature_raw[3] = raw_temp_value[3];
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
       #endif
1415
       #endif
1388
     #endif
1416
     #endif
1389
   #endif
1417
   #endif
1525
       ISR_STATICS(2);
1553
       ISR_STATICS(2);
1526
       #if HOTENDS > 3
1554
       #if HOTENDS > 3
1527
         ISR_STATICS(3);
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
   #if HAS_HEATER_BED
1562
   #if HAS_HEATER_BED
1532
     ISR_STATICS(BED);
1563
     ISR_STATICS(BED);
1533
   #endif
1564
   #endif
1561
           #if HOTENDS > 3
1592
           #if HOTENDS > 3
1562
             soft_pwm_3 = (soft_pwm_3 & pwm_mask) + soft_pwm[3];
1593
             soft_pwm_3 = (soft_pwm_3 & pwm_mask) + soft_pwm[3];
1563
             WRITE_HEATER_3(soft_pwm_3 > pwm_mask ? HIGH : LOW);
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
       #if HAS_HEATER_BED
1603
       #if HAS_HEATER_BED
1569
         soft_pwm_BED = (soft_pwm_BED & pwm_mask) + soft_pwm_bed;
1604
         soft_pwm_BED = (soft_pwm_BED & pwm_mask) + soft_pwm_bed;
1589
       if (soft_pwm_0 <= pwm_count_tmp) WRITE_HEATER_0(0);
1624
       if (soft_pwm_0 <= pwm_count_tmp) WRITE_HEATER_0(0);
1590
       #if HOTENDS > 1
1625
       #if HOTENDS > 1
1591
         if (soft_pwm_1 <= pwm_count_tmp) WRITE_HEATER_1(0);
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
       #if HAS_HEATER_BED
1638
       #if HAS_HEATER_BED
1601
         if (soft_pwm_BED <= pwm_count_tmp) WRITE_HEATER_BED(0);
1639
         if (soft_pwm_BED <= pwm_count_tmp) WRITE_HEATER_BED(0);
1665
 
1703
 
1666
     if (slow_pwm_count == 0) {
1704
     if (slow_pwm_count == 0) {
1667
 
1705
 
1668
-      SLOW_PWM_ROUTINE(0); // EXTRUDER 0
1706
+      SLOW_PWM_ROUTINE(0);
1669
       #if HOTENDS > 1
1707
       #if HOTENDS > 1
1670
-        SLOW_PWM_ROUTINE(1); // EXTRUDER 1
1708
+        SLOW_PWM_ROUTINE(1);
1671
         #if HOTENDS > 2
1709
         #if HOTENDS > 2
1672
-          SLOW_PWM_ROUTINE(2); // EXTRUDER 2
1710
+          SLOW_PWM_ROUTINE(2);
1673
           #if HOTENDS > 3
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
       #if HAS_HEATER_BED
1719
       #if HAS_HEATER_BED
1679
         _SLOW_PWM_ROUTINE(BED, soft_pwm_bed); // BED
1720
         _SLOW_PWM_ROUTINE(BED, soft_pwm_bed); // BED
1680
       #endif
1721
       #endif
1681
 
1722
 
1682
     } // slow_pwm_count == 0
1723
     } // slow_pwm_count == 0
1683
 
1724
 
1684
-    PWM_OFF_ROUTINE(0); // EXTRUDER 0
1725
+    PWM_OFF_ROUTINE(0);
1685
     #if HOTENDS > 1
1726
     #if HOTENDS > 1
1686
-      PWM_OFF_ROUTINE(1); // EXTRUDER 1
1727
+      PWM_OFF_ROUTINE(1);
1687
       #if HOTENDS > 2
1728
       #if HOTENDS > 2
1688
-        PWM_OFF_ROUTINE(2); // EXTRUDER 2
1729
+        PWM_OFF_ROUTINE(2);
1689
         #if HOTENDS > 3
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
     #if HAS_HEATER_BED
1738
     #if HAS_HEATER_BED
1695
       PWM_OFF_ROUTINE(BED); // BED
1739
       PWM_OFF_ROUTINE(BED); // BED
1696
     #endif
1740
     #endif
1738
       slow_pwm_count++;
1782
       slow_pwm_count++;
1739
       slow_pwm_count &= 0x7F;
1783
       slow_pwm_count &= 0x7F;
1740
 
1784
 
1741
-      // EXTRUDER 0
1742
       if (state_timer_heater_0 > 0) state_timer_heater_0--;
1785
       if (state_timer_heater_0 > 0) state_timer_heater_0--;
1743
-      #if HOTENDS > 1    // EXTRUDER 1
1786
+      #if HOTENDS > 1
1744
         if (state_timer_heater_1 > 0) state_timer_heater_1--;
1787
         if (state_timer_heater_1 > 0) state_timer_heater_1--;
1745
-        #if HOTENDS > 2    // EXTRUDER 2
1788
+        #if HOTENDS > 2
1746
           if (state_timer_heater_2 > 0) state_timer_heater_2--;
1789
           if (state_timer_heater_2 > 0) state_timer_heater_2--;
1747
-          #if HOTENDS > 3    // EXTRUDER 3
1790
+          #if HOTENDS > 3
1748
             if (state_timer_heater_3 > 0) state_timer_heater_3--;
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
       #if HAS_HEATER_BED
1798
       #if HAS_HEATER_BED
1753
         if (state_timer_heater_BED > 0) state_timer_heater_BED--;
1799
         if (state_timer_heater_BED > 0) state_timer_heater_BED--;
1754
       #endif
1800
       #endif
1763
     #define START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
1809
     #define START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
1764
   #endif
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
   switch (temp_state) {
1813
   switch (temp_state) {
1768
     case PrepareTemp_0:
1814
     case PrepareTemp_0:
1769
       #if HAS_TEMP_0
1815
       #if HAS_TEMP_0
1832
       #if HAS_TEMP_3
1878
       #if HAS_TEMP_3
1833
         raw_temp_value[3] += ADC;
1879
         raw_temp_value[3] += ADC;
1834
       #endif
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
       temp_state = Prepare_FILWIDTH;
1895
       temp_state = Prepare_FILWIDTH;
1836
       break;
1896
       break;
1837
 
1897
 
1879
     ZERO(raw_temp_value);
1939
     ZERO(raw_temp_value);
1880
     raw_temp_bed_value = 0;
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
     int constexpr temp_dir[] = {
1944
     int constexpr temp_dir[] = {
1883
       #if ENABLED(HEATER_0_USES_MAX6675)
1945
       #if ENABLED(HEATER_0_USES_MAX6675)
1884
          0
1946
          0
1885
-      #elif HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP
1886
-        -1
1887
       #else
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
       #endif
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
     for (uint8_t e = 0; e < COUNT(temp_dir); e++) {
1964
     for (uint8_t e = 0; e < COUNT(temp_dir); e++) {

+ 1
- 1
Marlin/temperature.h View File

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

+ 4
- 0
Marlin/thermistortable_20.h View File

39
   #define HEATER_3_RAW_HI_TEMP 16383
39
   #define HEATER_3_RAW_HI_TEMP 16383
40
   #define HEATER_3_RAW_LO_TEMP 0
40
   #define HEATER_3_RAW_LO_TEMP 0
41
 #endif
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
 #if (THERMISTORBED == 20)
46
 #if (THERMISTORBED == 20)
43
   #define HEATER_BED_RAW_HI_TEMP 16383
47
   #define HEATER_BED_RAW_HI_TEMP 16383
44
   #define HEATER_BED_RAW_LO_TEMP 0
48
   #define HEATER_BED_RAW_LO_TEMP 0

+ 11
- 1
Marlin/thermistortables.h View File

28
 
28
 
29
 #define OVERSAMPLENR 16
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
 // Pt1000 and Pt100 handling
33
 // Pt1000 and Pt100 handling
34
 //
34
 //
168
   #define HEATER_3_TEMPTABLE_LEN 0
168
   #define HEATER_3_TEMPTABLE_LEN 0
169
 #endif
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
 #ifdef THERMISTORBED
181
 #ifdef THERMISTORBED
172
   #define BEDTEMPTABLE TT_NAME(THERMISTORBED)
182
   #define BEDTEMPTABLE TT_NAME(THERMISTORBED)
173
   #define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE)
183
   #define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE)

+ 126
- 92
Marlin/ultralcd.cpp View File

919
    * Watch temperature callbacks
919
    * Watch temperature callbacks
920
    */
920
    */
921
   #if WATCH_HOTENDS
921
   #if WATCH_HOTENDS
922
-    #if TEMP_SENSOR_0 != 0
922
+    #if HAS_TEMP_HOTEND
923
       void watch_temp_callback_E0() { thermalManager.start_watching_heater(0); }
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
     #endif
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
   #else
937
   #else
935
-    #if TEMP_SENSOR_0 != 0
938
+    #if HAS_TEMP_HOTEND
936
       void watch_temp_callback_E0() {}
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
     #endif
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
   #endif
953
   #endif
948
 
954
 
949
   #if WATCH_THE_BED
955
   #if WATCH_THE_BED
990
     // Nozzle [1-4]:
996
     // Nozzle [1-4]:
991
     //
997
     //
992
     #if HOTENDS == 1
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
     #else //HOTENDS > 1
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
       #if HOTENDS > 2
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
         #if HOTENDS > 3
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
         #endif // HOTENDS > 3
1010
         #endif // HOTENDS > 3
1012
       #endif // HOTENDS > 2
1011
       #endif // HOTENDS > 2
1013
     #endif // HOTENDS > 1
1012
     #endif // HOTENDS > 1
1041
 
1040
 
1042
     //
1041
     //
1043
     // Flow:
1042
     // Flow:
1044
-    // Flow 1:
1045
-    // Flow 2:
1046
-    // Flow 3:
1047
-    // Flow 4:
1043
+    // Flow [1-5]:
1048
     //
1044
     //
1049
     #if EXTRUDERS == 1
1045
     #if EXTRUDERS == 1
1050
       MENU_ITEM_EDIT(int3, MSG_FLOW, &flow_percentage[0], 10, 999);
1046
       MENU_ITEM_EDIT(int3, MSG_FLOW, &flow_percentage[0], 10, 999);
1056
         MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N3, &flow_percentage[2], 10, 999);
1052
         MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N3, &flow_percentage[2], 10, 999);
1057
         #if EXTRUDERS > 3
1053
         #if EXTRUDERS > 3
1058
           MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N4, &flow_percentage[3], 10, 999);
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
         #endif //EXTRUDERS > 3
1058
         #endif //EXTRUDERS > 3
1060
       #endif //EXTRUDERS > 2
1059
       #endif //EXTRUDERS > 2
1061
     #endif //EXTRUDERS > 1
1060
     #endif //EXTRUDERS > 1
1109
     }
1108
     }
1110
   #endif
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
           void lcd_preheat_m1_e3() { _lcd_preheat(3, lcd_preheat_hotend_temp[0], lcd_preheat_bed_temp[0], lcd_preheat_fan_speed[0]); }
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
           void lcd_preheat_m2_e3() { _lcd_preheat(3, lcd_preheat_hotend_temp[1], lcd_preheat_bed_temp[1], lcd_preheat_fan_speed[1]); }
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
         #endif
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
     void lcd_preheat_m1_all() {
1178
     void lcd_preheat_m1_all() {
1172
       #if HOTENDS > 1
1179
       #if HOTENDS > 1
1175
           thermalManager.setTargetHotend(lcd_preheat_hotend_temp[0], 2);
1182
           thermalManager.setTargetHotend(lcd_preheat_hotend_temp[0], 2);
1176
           #if HOTENDS > 3
1183
           #if HOTENDS > 3
1177
             thermalManager.setTargetHotend(lcd_preheat_hotend_temp[0], 3);
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
       #if TEMP_SENSOR_BED != 0
1191
       #if TEMP_SENSOR_BED != 0
1182
         lcd_preheat_m1_e0();
1192
         lcd_preheat_m1_e0();
1183
       #else
1193
       #else
1191
           thermalManager.setTargetHotend(lcd_preheat_hotend_temp[1], 2);
1201
           thermalManager.setTargetHotend(lcd_preheat_hotend_temp[1], 2);
1192
           #if HOTENDS > 3
1202
           #if HOTENDS > 3
1193
             thermalManager.setTargetHotend(lcd_preheat_hotend_temp[1], 3);
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
       #if TEMP_SENSOR_BED != 0
1210
       #if TEMP_SENSOR_BED != 0
1198
         lcd_preheat_m2_e0();
1211
         lcd_preheat_m2_e0();
1199
       #else
1212
       #else
1244
             #else
1257
             #else
1245
               MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3_only);
1258
               MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3_only);
1246
             #endif
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
         MENU_ITEM(function, MSG_PREHEAT_1_ALL, lcd_preheat_m1_all);
1270
         MENU_ITEM(function, MSG_PREHEAT_1_ALL, lcd_preheat_m1_all);
1250
-      #endif
1271
+      #endif // HOTENDS > 1
1251
       #if TEMP_SENSOR_BED != 0
1272
       #if TEMP_SENSOR_BED != 0
1252
         MENU_ITEM(function, MSG_PREHEAT_1_BEDONLY, lcd_preheat_m1_bedonly);
1273
         MENU_ITEM(function, MSG_PREHEAT_1_BEDONLY, lcd_preheat_m1_bedonly);
1253
       #endif
1274
       #endif
1288
             #else
1309
             #else
1289
               MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3_only);
1310
               MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3_only);
1290
             #endif
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
         MENU_ITEM(function, MSG_PREHEAT_2_ALL, lcd_preheat_m2_all);
1322
         MENU_ITEM(function, MSG_PREHEAT_2_ALL, lcd_preheat_m2_all);
1294
-      #endif
1323
+      #endif // HOTENDS > 1
1295
       #if TEMP_SENSOR_BED != 0
1324
       #if TEMP_SENSOR_BED != 0
1296
         MENU_ITEM(function, MSG_PREHEAT_2_BEDONLY, lcd_preheat_m2_bedonly);
1325
         MENU_ITEM(function, MSG_PREHEAT_2_BEDONLY, lcd_preheat_m2_bedonly);
1297
       #endif
1326
       #endif
2104
       PID_PARAM(Kd, e) = scalePID_d(raw_Kd);
2133
       PID_PARAM(Kd, e) = scalePID_d(raw_Kd);
2105
       thermalManager.updatePID();
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
     #if ENABLED(PID_AUTOTUNE_MENU)
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
     #else
2144
     #else
2116
-      #define _PIDTEMP_FUNCTIONS(eindex) _PIDTEMP_BASE_FUNCTIONS(eindex)
2145
+      #define _PIDTEMP_FUNCTIONS(N) _PIDTEMP_BASE_FUNCTIONS(N)
2117
     #endif
2146
     #endif
2118
 
2147
 
2119
     _PIDTEMP_FUNCTIONS(0)
2148
     _PIDTEMP_FUNCTIONS(0)
2124
           _PIDTEMP_FUNCTIONS(2)
2153
           _PIDTEMP_FUNCTIONS(2)
2125
           #if HOTENDS > 3
2154
           #if HOTENDS > 3
2126
             _PIDTEMP_FUNCTIONS(3)
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
 
2178
 
2147
     //
2179
     //
2148
     // Nozzle:
2180
     // Nozzle:
2149
-    // Nozzle [1-4]:
2181
+    // Nozzle [1-5]:
2150
     //
2182
     //
2151
     #if HOTENDS == 1
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
       #if HOTENDS > 2
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
         #if HOTENDS > 3
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
         #endif // HOTENDS > 3
2195
         #endif // HOTENDS > 3
2171
       #endif // HOTENDS > 2
2196
       #endif // HOTENDS > 2
2172
     #endif // HOTENDS > 1
2197
     #endif // HOTENDS > 1
2247
           PID_MENU_ITEMS(" " MSG_E3, 2);
2272
           PID_MENU_ITEMS(" " MSG_E3, 2);
2248
           #if HOTENDS > 3
2273
           #if HOTENDS > 3
2249
             PID_MENU_ITEMS(" " MSG_E4, 3);
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
         PID_MENU_ITEMS("", 0);
2281
         PID_MENU_ITEMS("", 0);
2254
-      #endif //!PID_PARAMS_PER_HOTEND || HOTENDS == 1
2282
+      #endif // !PID_PARAMS_PER_HOTEND || HOTENDS == 1
2255
 
2283
 
2256
     #endif //PIDTEMP
2284
     #endif //PIDTEMP
2257
 
2285
 
2268
   }
2296
   }
2269
 
2297
 
2270
   void _lcd_control_temperature_preheat_settings_menu(uint8_t material) {
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
       #define MINTEMP_ALL MIN4(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP)
2303
       #define MINTEMP_ALL MIN4(HEATER_0_MINTEMP, HEATER_1_MINTEMP, HEATER_2_MINTEMP, HEATER_3_MINTEMP)
2273
       #define MAXTEMP_ALL MAX4(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP)
2304
       #define MAXTEMP_ALL MAX4(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP)
2274
     #elif HOTENDS > 2
2305
     #elif HOTENDS > 2
2455
     if (volumetric_enabled) {
2486
     if (volumetric_enabled) {
2456
       #if EXTRUDERS == 1
2487
       #if EXTRUDERS == 1
2457
         MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM, &filament_size[0], 1.5, 3.25, calculate_volumetric_multipliers);
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
         MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E1, &filament_size[0], 1.5, 3.25, calculate_volumetric_multipliers);
2490
         MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E1, &filament_size[0], 1.5, 3.25, calculate_volumetric_multipliers);
2460
         MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E2, &filament_size[1], 1.5, 3.25, calculate_volumetric_multipliers);
2491
         MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E2, &filament_size[1], 1.5, 3.25, calculate_volumetric_multipliers);
2461
         #if EXTRUDERS > 2
2492
         #if EXTRUDERS > 2
2462
           MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E3, &filament_size[2], 1.5, 3.25, calculate_volumetric_multipliers);
2493
           MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E3, &filament_size[2], 1.5, 3.25, calculate_volumetric_multipliers);
2463
           #if EXTRUDERS > 3
2494
           #if EXTRUDERS > 3
2464
             MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM MSG_DIAM_E4, &filament_size[3], 1.5, 3.25, calculate_volumetric_multipliers);
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
     END_MENU();
2504
     END_MENU();

Loading…
Cancel
Save