Sfoglia il codice sorgente

Merge pull request #6346 from thinkyhead/rc_broken_abl_test

Add support for SOLENOID_PROBE
Scott Lahteine 8 anni fa
parent
commit
2355d87e11
56 ha cambiato i file con 421 aggiunte e 151 eliminazioni
  1. 12
    6
      .travis.yml
  2. 1
    1
      Marlin/Conditionals_LCD.h
  3. 94
    61
      Marlin/Conditionals_post.h
  4. 3
    0
      Marlin/Configuration.h
  5. 5
    1
      Marlin/Configuration_adv.h
  6. 43
    20
      Marlin/Marlin_main.cpp
  7. 16
    0
      Marlin/SanityCheck.h
  8. 3
    0
      Marlin/example_configurations/Cartesio/Configuration.h
  9. 5
    1
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  10. 3
    0
      Marlin/example_configurations/Felix/Configuration.h
  11. 5
    1
      Marlin/example_configurations/Felix/Configuration_adv.h
  12. 3
    0
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  13. 3
    0
      Marlin/example_configurations/Hephestos/Configuration.h
  14. 5
    1
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  15. 3
    0
      Marlin/example_configurations/Hephestos_2/Configuration.h
  16. 5
    1
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  17. 3
    0
      Marlin/example_configurations/K8200/Configuration.h
  18. 5
    1
      Marlin/example_configurations/K8200/Configuration_adv.h
  19. 3
    0
      Marlin/example_configurations/K8400/Configuration.h
  20. 5
    1
      Marlin/example_configurations/K8400/Configuration_adv.h
  21. 3
    0
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  22. 3
    0
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  23. 3
    0
      Marlin/example_configurations/RigidBot/Configuration.h
  24. 5
    1
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  25. 3
    0
      Marlin/example_configurations/SCARA/Configuration.h
  26. 5
    1
      Marlin/example_configurations/SCARA/Configuration_adv.h
  27. 3
    0
      Marlin/example_configurations/TAZ4/Configuration.h
  28. 5
    1
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  29. 3
    0
      Marlin/example_configurations/TinyBoy2/Configuration.h
  30. 5
    1
      Marlin/example_configurations/TinyBoy2/Configuration_adv.h
  31. 3
    0
      Marlin/example_configurations/WITBOX/Configuration.h
  32. 5
    1
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  33. 3
    0
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  34. 3
    0
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h
  35. 5
    1
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration_adv.h
  36. 3
    0
      Marlin/example_configurations/delta/generic/Configuration.h
  37. 5
    1
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  38. 3
    0
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  39. 5
    1
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  40. 3
    0
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  41. 5
    1
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  42. 3
    0
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  43. 5
    1
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  44. 3
    0
      Marlin/example_configurations/makibox/Configuration.h
  45. 5
    1
      Marlin/example_configurations/makibox/Configuration_adv.h
  46. 3
    0
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  47. 5
    1
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  48. 3
    0
      Marlin/example_configurations/wt150/Configuration.h
  49. 5
    1
      Marlin/example_configurations/wt150/Configuration_adv.h
  50. 0
    2
      Marlin/pins_MEGATRONICS_3.h
  51. 0
    4
      Marlin/pins_RAMBO.h
  52. 0
    2
      Marlin/pins_RAMPS.h
  53. 0
    7
      Marlin/pins_SANGUINOLOLU_11.h
  54. 0
    2
      Marlin/pins_SCOOVO_X9H.h
  55. 74
    26
      Marlin/stepper.cpp
  56. 9
    0
      Marlin/thermistortables.h

+ 12
- 6
.travis.yml Vedi File

@@ -83,18 +83,23 @@ script:
83 83
   - opt_set TEMP_SENSOR_1 1
84 84
   - build_marlin
85 85
   #
86
-  # Test 3 extruders on RUMBA (can use any board with >=3 extruders defined)
86
+  # Test 5 extruders on AZTEEG_X3_PRO (can use any board with >=5 extruders defined)
87 87
   # Include a test for LIN_ADVANCE here also
88 88
   #
89
-  - opt_set MOTHERBOARD BOARD_RUMBA
90
-  - opt_set EXTRUDERS 3
91
-  - opt_set TEMP_SENSOR_2 1
89
+  - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
90
+  - opt_set EXTRUDERS 5
91
+  - opt_set TEMP_SENSOR_1 1
92
+  - opt_set TEMP_SENSOR_2 5
93
+  - opt_set TEMP_SENSOR_3 20
94
+  - opt_set TEMP_SENSOR_4 999
95
+  - opt_set TEMP_SENSOR_BED 1
92 96
   - opt_enable_adv LIN_ADVANCE
93 97
   - build_marlin
94 98
   #
95 99
   # Test PIDTEMPBED
96 100
   #
97 101
   - restore_configs
102
+  - opt_set TEMP_SENSOR_BED 1
98 103
   - opt_enable PIDTEMPBED
99 104
   - build_marlin
100 105
   #
@@ -158,11 +163,12 @@ script:
158 163
   - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
159 164
   - build_marlin
160 165
   #
161
-  # Mixing Extruder
166
+  # Mixing Extruder with 5 steppers
162 167
   #
163 168
   - restore_configs
169
+  - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
164 170
   - opt_enable MIXING_EXTRUDER
165
-  - opt_set MIXING_STEPPERS 2
171
+  - opt_set MIXING_STEPPERS 5
166 172
   - build_marlin
167 173
   #
168 174
   # Test DUAL_X_CARRIAGE

+ 1
- 1
Marlin/Conditionals_LCD.h Vedi File

@@ -374,7 +374,7 @@
374 374
   /**
375 375
    * Set a flag for any enabled probe
376 376
    */
377
-  #define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED))
377
+  #define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE))
378 378
 
379 379
   /**
380 380
    * Clear probe pin settings when no probe is selected

+ 94
- 61
Marlin/Conditionals_post.h Vedi File

@@ -435,18 +435,100 @@
435 435
   /**
436 436
    * Shorthand for pin tests, used wherever needed
437 437
    */
438
+
439
+  // Steppers
440
+  #define HAS_X_ENABLE      (PIN_EXISTS(X_ENABLE))
441
+  #define HAS_X_DIR         (PIN_EXISTS(X_DIR))
442
+  #define HAS_X_STEP        (PIN_EXISTS(X_STEP))
443
+  #define HAS_X_MICROSTEPS  (PIN_EXISTS(X_MS1))
444
+
445
+  #define HAS_X2_ENABLE     (PIN_EXISTS(X2_ENABLE))
446
+  #define HAS_X2_DIR        (PIN_EXISTS(X2_DIR))
447
+  #define HAS_X2_STEP       (PIN_EXISTS(X2_STEP))
448
+  #define HAS_Y_MICROSTEPS  (PIN_EXISTS(Y_MS1))
449
+
450
+  #define HAS_Y_ENABLE      (PIN_EXISTS(Y_ENABLE))
451
+  #define HAS_Y_DIR         (PIN_EXISTS(Y_DIR))
452
+  #define HAS_Y_STEP        (PIN_EXISTS(Y_STEP))
453
+  #define HAS_Z_MICROSTEPS  (PIN_EXISTS(Z_MS1))
454
+
455
+  #define HAS_Y2_ENABLE     (PIN_EXISTS(Y2_ENABLE))
456
+  #define HAS_Y2_DIR        (PIN_EXISTS(Y2_DIR))
457
+  #define HAS_Y2_STEP       (PIN_EXISTS(Y2_STEP))
458
+
459
+  #define HAS_Z_ENABLE      (PIN_EXISTS(Z_ENABLE))
460
+  #define HAS_Z_DIR         (PIN_EXISTS(Z_DIR))
461
+  #define HAS_Z_STEP        (PIN_EXISTS(Z_STEP))
462
+
463
+  #define HAS_Z2_ENABLE     (PIN_EXISTS(Z2_ENABLE))
464
+  #define HAS_Z2_DIR        (PIN_EXISTS(Z2_DIR))
465
+  #define HAS_Z2_STEP       (PIN_EXISTS(Z2_STEP))
466
+
467
+  // Extruder steppers and solenoids
468
+  #define HAS_E0_ENABLE     (PIN_EXISTS(E0_ENABLE))
469
+  #define HAS_E0_DIR        (PIN_EXISTS(E0_DIR))
470
+  #define HAS_E0_STEP       (PIN_EXISTS(E0_STEP))
471
+  #define HAS_E0_MICROSTEPS (PIN_EXISTS(E0_MS1))
472
+  #define HAS_SOLENOID_0    (PIN_EXISTS(SOL0))
473
+
474
+  #define HAS_E1_ENABLE     (PIN_EXISTS(E1_ENABLE))
475
+  #define HAS_E1_DIR        (PIN_EXISTS(E1_DIR))
476
+  #define HAS_E1_STEP       (PIN_EXISTS(E1_STEP))
477
+  #define HAS_E1_MICROSTEPS (PIN_EXISTS(E1_MS1))
478
+  #define HAS_SOLENOID_1    (PIN_EXISTS(SOL1))
479
+
480
+  #define HAS_E2_ENABLE     (PIN_EXISTS(E2_ENABLE))
481
+  #define HAS_E2_DIR        (PIN_EXISTS(E2_DIR))
482
+  #define HAS_E2_STEP       (PIN_EXISTS(E2_STEP))
483
+  #define HAS_E2_MICROSTEPS (PIN_EXISTS(E2_MS1))
484
+  #define HAS_SOLENOID_2    (PIN_EXISTS(SOL2))
485
+
486
+  #define HAS_E3_ENABLE     (PIN_EXISTS(E3_ENABLE))
487
+  #define HAS_E3_DIR        (PIN_EXISTS(E3_DIR))
488
+  #define HAS_E3_STEP       (PIN_EXISTS(E3_STEP))
489
+  #define HAS_E3_MICROSTEPS (PIN_EXISTS(E3_MS1))
490
+  #define HAS_SOLENOID_3    (PIN_EXISTS(SOL3))
491
+
492
+  #define HAS_E4_ENABLE     (PIN_EXISTS(E4_ENABLE))
493
+  #define HAS_E4_DIR        (PIN_EXISTS(E4_DIR))
494
+  #define HAS_E4_STEP       (PIN_EXISTS(E4_STEP))
495
+  #define HAS_E4_MICROSTEPS (PIN_EXISTS(E4_MS1))
496
+  #define HAS_SOLENOID_4    (PIN_EXISTS(SOL4))
497
+
498
+  // Endstops and bed probe
499
+  #define HAS_X_MIN (PIN_EXISTS(X_MIN) && !IS_Z2_OR_PROBE(X_MIN_PIN))
500
+  #define HAS_X_MAX (PIN_EXISTS(X_MAX) && !IS_Z2_OR_PROBE(X_MAX_PIN))
501
+  #define HAS_Y_MIN (PIN_EXISTS(Y_MIN) && !IS_Z2_OR_PROBE(Y_MIN_PIN))
502
+  #define HAS_Y_MAX (PIN_EXISTS(Y_MAX) && !IS_Z2_OR_PROBE(Y_MAX_PIN))
503
+  #define HAS_Z_MIN (PIN_EXISTS(Z_MIN) && !IS_Z2_OR_PROBE(Z_MIN_PIN))
504
+  #define HAS_Z_MAX (PIN_EXISTS(Z_MAX) && !IS_Z2_OR_PROBE(Z_MAX_PIN))
505
+  #define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
506
+  #define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
507
+  #define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE))
508
+
509
+  // Thermistors
438 510
   #define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 > -2)
439 511
   #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2)
440 512
   #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2)
441 513
   #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0 && TEMP_SENSOR_3 > -2)
442 514
   #define HAS_TEMP_4 (PIN_EXISTS(TEMP_4) && TEMP_SENSOR_4 != 0 && TEMP_SENSOR_4 > -2)
515
+  #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
443 516
   #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
517
+
518
+  // Heaters
444 519
   #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
445 520
   #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
446 521
   #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
447 522
   #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
448 523
   #define HAS_HEATER_4 (PIN_EXISTS(HEATER_4))
449 524
   #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
525
+
526
+  // Thermal protection
527
+  #define HAS_THERMALLY_PROTECTED_BED (ENABLED(THERMAL_PROTECTION_BED) && HAS_TEMP_BED && HAS_HEATER_BED)
528
+  #define WATCH_HOTENDS (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0)
529
+  #define WATCH_THE_BED (HAS_THERMALLY_PROTECTED_BED && WATCH_BED_TEMP_PERIOD > 0)
530
+
531
+  // Auto fans
450 532
   #define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN))
451 533
   #define HAS_AUTO_FAN_1 (HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN))
452 534
   #define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN))
@@ -463,87 +545,38 @@
463 545
   #define AUTO_4_IS_1 (E4_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
464 546
   #define AUTO_4_IS_2 (E4_AUTO_FAN_PIN == E2_AUTO_FAN_PIN)
465 547
   #define AUTO_4_IS_3 (E4_AUTO_FAN_PIN == E3_AUTO_FAN_PIN)
548
+
549
+  // Other fans
466 550
   #define HAS_FAN0 (PIN_EXISTS(FAN))
467 551
   #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)
468 552
   #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)
469 553
   #define HAS_CONTROLLERFAN (PIN_EXISTS(CONTROLLERFAN))
554
+
555
+  // Servos
470 556
   #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0)
471 557
   #define HAS_SERVO_0 (PIN_EXISTS(SERVO0))
472 558
   #define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
473 559
   #define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
474 560
   #define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
561
+
562
+  // Sensors
475 563
   #define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH))
476 564
   #define HAS_FIL_RUNOUT (PIN_EXISTS(FIL_RUNOUT))
565
+
566
+  // User Interface
477 567
   #define HAS_HOME (PIN_EXISTS(HOME))
478 568
   #define HAS_KILL (PIN_EXISTS(KILL))
479 569
   #define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
480 570
   #define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH))
481
-  #define HAS_X_MIN (PIN_EXISTS(X_MIN) && !IS_Z2_OR_PROBE(X_MIN_PIN))
482
-  #define HAS_X_MAX (PIN_EXISTS(X_MAX) && !IS_Z2_OR_PROBE(X_MAX_PIN))
483
-  #define HAS_Y_MIN (PIN_EXISTS(Y_MIN) && !IS_Z2_OR_PROBE(Y_MIN_PIN))
484
-  #define HAS_Y_MAX (PIN_EXISTS(Y_MAX) && !IS_Z2_OR_PROBE(Y_MAX_PIN))
485
-  #define HAS_Z_MIN (PIN_EXISTS(Z_MIN) && !IS_Z2_OR_PROBE(Z_MIN_PIN))
486
-  #define HAS_Z_MAX (PIN_EXISTS(Z_MAX) && !IS_Z2_OR_PROBE(Z_MAX_PIN))
487
-  #define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
488
-  #define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
489
-  #define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE))
490
-  #define HAS_SOLENOID_1 (PIN_EXISTS(SOL1))
491
-  #define HAS_SOLENOID_2 (PIN_EXISTS(SOL2))
492
-  #define HAS_SOLENOID_3 (PIN_EXISTS(SOL3))
493
-  #define HAS_MICROSTEPS_X (PIN_EXISTS(X_MS1))
494
-  #define HAS_MICROSTEPS_Y (PIN_EXISTS(Y_MS1))
495
-  #define HAS_MICROSTEPS_Z (PIN_EXISTS(Z_MS1))
496
-  #define HAS_MICROSTEPS_E0 (PIN_EXISTS(E0_MS1))
497
-  #define HAS_MICROSTEPS_E1 (PIN_EXISTS(E1_MS1))
498
-  #define HAS_MICROSTEPS_E2 (PIN_EXISTS(E2_MS1))
499
-  #define HAS_MICROSTEPS (HAS_MICROSTEPS_X || HAS_MICROSTEPS_Y || HAS_MICROSTEPS_Z || HAS_MICROSTEPS_E0 || HAS_MICROSTEPS_E1 || HAS_MICROSTEPS_E2)
500
-  #define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET))
501
-  #define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE))
502
-  #define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE))
503
-  #define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE))
504
-  #define HAS_Y2_ENABLE (PIN_EXISTS(Y2_ENABLE))
505
-  #define HAS_Z_ENABLE (PIN_EXISTS(Z_ENABLE))
506
-  #define HAS_Z2_ENABLE (PIN_EXISTS(Z2_ENABLE))
507
-  #define HAS_E0_ENABLE (PIN_EXISTS(E0_ENABLE))
508
-  #define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE))
509
-  #define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE))
510
-  #define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE))
511
-  #define HAS_E4_ENABLE (PIN_EXISTS(E4_ENABLE))
512
-  #define HAS_X_DIR (PIN_EXISTS(X_DIR))
513
-  #define HAS_X2_DIR (PIN_EXISTS(X2_DIR))
514
-  #define HAS_Y_DIR (PIN_EXISTS(Y_DIR))
515
-  #define HAS_Y2_DIR (PIN_EXISTS(Y2_DIR))
516
-  #define HAS_Z_DIR (PIN_EXISTS(Z_DIR))
517
-  #define HAS_Z2_DIR (PIN_EXISTS(Z2_DIR))
518
-  #define HAS_E0_DIR (PIN_EXISTS(E0_DIR))
519
-  #define HAS_E1_DIR (PIN_EXISTS(E1_DIR))
520
-  #define HAS_E2_DIR (PIN_EXISTS(E2_DIR))
521
-  #define HAS_E3_DIR (PIN_EXISTS(E3_DIR))
522
-  #define HAS_E4_DIR (PIN_EXISTS(E4_DIR))
523
-  #define HAS_X_STEP (PIN_EXISTS(X_STEP))
524
-  #define HAS_X2_STEP (PIN_EXISTS(X2_STEP))
525
-  #define HAS_Y_STEP (PIN_EXISTS(Y_STEP))
526
-  #define HAS_Y2_STEP (PIN_EXISTS(Y2_STEP))
527
-  #define HAS_Z_STEP (PIN_EXISTS(Z_STEP))
528
-  #define HAS_Z2_STEP (PIN_EXISTS(Z2_STEP))
529
-  #define HAS_E0_STEP (PIN_EXISTS(E0_STEP))
530
-  #define HAS_E1_STEP (PIN_EXISTS(E1_STEP))
531
-  #define HAS_E2_STEP (PIN_EXISTS(E2_STEP))
532
-  #define HAS_E3_STEP (PIN_EXISTS(E3_STEP))
533
-  #define HAS_E4_STEP (PIN_EXISTS(E4_STEP))
534
-  #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
535 571
   #define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER))
536 572
   #define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT))
537 573
 
574
+  // Digital control
575
+  #define HAS_MICROSTEPS (HAS_X_MICROSTEPS || HAS_Y_MICROSTEPS || HAS_Z_MICROSTEPS || HAS_E0_MICROSTEPS || HAS_E1_MICROSTEPS || HAS_E2_MICROSTEPS || HAS_E3_MICROSTEPS || HAS_E4_MICROSTEPS)
576
+  #define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET))
577
+  #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
538 578
   #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
539 579
 
540
-  #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
541
-
542
-  #define HAS_THERMALLY_PROTECTED_BED (HAS_TEMP_BED && HAS_HEATER_BED && ENABLED(THERMAL_PROTECTION_BED))
543
-
544
-  #define WATCH_HOTENDS (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0)
545
-  #define WATCH_THE_BED (HAS_THERMALLY_PROTECTED_BED && WATCH_BED_TEMP_PERIOD > 0)
546
-
547 580
   /**
548 581
    * This setting is also used by M109 when trying to calculate
549 582
    * a ballpark safe margin to prevent wait-forever situation.

+ 3
- 0
Marlin/Configuration.h Vedi File

@@ -593,6 +593,9 @@
593 593
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
594 594
  */
595 595
 
596
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
597
+//#define SOLENOID_PROBE
598
+
596 599
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
597 600
 //#define Z_PROBE_SLED
598 601
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 43
- 20
Marlin/Marlin_main.cpp Vedi File

@@ -963,15 +963,15 @@ void servo_init() {
963 963
 
964 964
       // This variant uses 3 separate pins for the RGB components.
965 965
       // If the pins can do PWM then their intensity will be set.
966
-      digitalWrite(RGB_LED_R_PIN, r ? HIGH : LOW);
967
-      digitalWrite(RGB_LED_G_PIN, g ? HIGH : LOW);
968
-      digitalWrite(RGB_LED_B_PIN, b ? HIGH : LOW);
966
+      WRITE(RGB_LED_R_PIN, r ? HIGH : LOW);
967
+      WRITE(RGB_LED_G_PIN, g ? HIGH : LOW);
968
+      WRITE(RGB_LED_B_PIN, b ? HIGH : LOW);
969 969
       analogWrite(RGB_LED_R_PIN, r);
970 970
       analogWrite(RGB_LED_G_PIN, g);
971 971
       analogWrite(RGB_LED_B_PIN, b);
972 972
 
973 973
       #if ENABLED(RGBW_LED)
974
-        digitalWrite(RGB_LED_W_PIN, w ? HIGH : LOW);
974
+        WRITE(RGB_LED_W_PIN, w ? HIGH : LOW);
975 975
         analogWrite(RGB_LED_W_PIN, w);
976 976
       #endif
977 977
 
@@ -1854,8 +1854,8 @@ static void clean_up_after_endstop_or_probe_move() {
1854 1854
     // Dock sled a bit closer to ensure proper capturing
1855 1855
     do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET - ((stow) ? 1 : 0));
1856 1856
 
1857
-    #if PIN_EXISTS(SLED)
1858
-      digitalWrite(SLED_PIN, !stow); // switch solenoid
1857
+    #if HAS_SOLENOID_1 && DISABLED(EXT_SOLENOID)
1858
+      WRITE(SOL1_PIN, !stow); // switch solenoid
1859 1859
     #endif
1860 1860
   }
1861 1861
 
@@ -2123,7 +2123,13 @@ static void clean_up_after_endstop_or_probe_move() {
2123 2123
                                                      // otherwise an Allen-Key probe can't be stowed.
2124 2124
     #endif
2125 2125
 
2126
-        #if ENABLED(Z_PROBE_SLED)
2126
+        #if ENABLED(SOLENOID_PROBE)
2127
+
2128
+          #if HAS_SOLENOID_1
2129
+            WRITE(SOL1_PIN, deploy);
2130
+          #endif
2131
+
2132
+        #elif ENABLED(Z_PROBE_SLED)
2127 2133
 
2128 2134
           dock_sled(!deploy);
2129 2135
 
@@ -7588,26 +7594,31 @@ inline void gcode_M303() {
7588 7594
 
7589 7595
 #if ENABLED(EXT_SOLENOID)
7590 7596
 
7591
-  void enable_solenoid(uint8_t num) {
7597
+  void enable_solenoid(const uint8_t num) {
7592 7598
     switch (num) {
7593 7599
       case 0:
7594 7600
         OUT_WRITE(SOL0_PIN, HIGH);
7595 7601
         break;
7596
-        #if HAS_SOLENOID_1
7602
+        #if HAS_SOLENOID_1 && EXTRUDERS > 1
7597 7603
           case 1:
7598 7604
             OUT_WRITE(SOL1_PIN, HIGH);
7599 7605
             break;
7600 7606
         #endif
7601
-        #if HAS_SOLENOID_2
7607
+        #if HAS_SOLENOID_2 && EXTRUDERS > 2
7602 7608
           case 2:
7603 7609
             OUT_WRITE(SOL2_PIN, HIGH);
7604 7610
             break;
7605 7611
         #endif
7606
-        #if HAS_SOLENOID_3
7612
+        #if HAS_SOLENOID_3 && EXTRUDERS > 3
7607 7613
           case 3:
7608 7614
             OUT_WRITE(SOL3_PIN, HIGH);
7609 7615
             break;
7610 7616
         #endif
7617
+        #if HAS_SOLENOID_4 && EXTRUDERS > 4
7618
+          case 4:
7619
+            OUT_WRITE(SOL4_PIN, HIGH);
7620
+            break;
7621
+        #endif
7611 7622
       default:
7612 7623
         SERIAL_ECHO_START;
7613 7624
         SERIAL_ECHOLNPGM(MSG_INVALID_SOLENOID);
@@ -7619,9 +7630,18 @@ inline void gcode_M303() {
7619 7630
 
7620 7631
   void disable_all_solenoids() {
7621 7632
     OUT_WRITE(SOL0_PIN, LOW);
7622
-    OUT_WRITE(SOL1_PIN, LOW);
7623
-    OUT_WRITE(SOL2_PIN, LOW);
7624
-    OUT_WRITE(SOL3_PIN, LOW);
7633
+    #if HAS_SOLENOID_1 && EXTRUDERS > 1
7634
+      OUT_WRITE(SOL1_PIN, LOW);
7635
+    #endif
7636
+    #if HAS_SOLENOID_2 && EXTRUDERS > 2
7637
+      OUT_WRITE(SOL2_PIN, LOW);
7638
+    #endif
7639
+    #if HAS_SOLENOID_3 && EXTRUDERS > 3
7640
+      OUT_WRITE(SOL3_PIN, LOW);
7641
+    #endif
7642
+    #if HAS_SOLENOID_4 && EXTRUDERS > 4
7643
+      OUT_WRITE(SOL4_PIN, LOW);
7644
+    #endif
7625 7645
   }
7626 7646
 
7627 7647
   /**
@@ -8548,7 +8568,7 @@ inline void gcode_M907() {
8548 8568
   uint8_t case_light_brightness = 255;
8549 8569
 
8550 8570
   void update_case_light() {
8551
-    digitalWrite(CASE_LIGHT_PIN, case_light_on != INVERT_CASE_LIGHT ? HIGH : LOW);
8571
+    WRITE(CASE_LIGHT_PIN, case_light_on != INVERT_CASE_LIGHT ? HIGH : LOW);
8552 8572
     analogWrite(CASE_LIGHT_PIN, case_light_on != INVERT_CASE_LIGHT ? case_light_brightness : 0);
8553 8573
   }
8554 8574
 
@@ -10739,7 +10759,7 @@ void prepare_move_to_destination() {
10739 10759
       uint8_t speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : CONTROLLERFAN_SPEED;
10740 10760
 
10741 10761
       // allows digital or PWM fan output to be used (see M42 handling)
10742
-      digitalWrite(CONTROLLERFAN_PIN, speed);
10762
+      WRITE(CONTROLLERFAN_PIN, speed);
10743 10763
       analogWrite(CONTROLLERFAN_PIN, speed);
10744 10764
     }
10745 10765
   }
@@ -11437,9 +11457,9 @@ void setup() {
11437 11457
     dac_init();
11438 11458
   #endif
11439 11459
 
11440
-  #if ENABLED(Z_PROBE_SLED) && PIN_EXISTS(SLED)
11441
-    OUT_WRITE(SLED_PIN, LOW); // turn it off
11442
-  #endif // Z_PROBE_SLED
11460
+  #if (ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE)) && HAS_SOLENOID_1
11461
+    OUT_WRITE(SOL1_PIN, LOW); // turn it off
11462
+  #endif
11443 11463
 
11444 11464
   setup_homepin();
11445 11465
 
@@ -11451,10 +11471,13 @@ void setup() {
11451 11471
     OUT_WRITE(STAT_LED_BLUE_PIN, LOW); // turn it off
11452 11472
   #endif
11453 11473
 
11454
-  #if ENABLED(RGB_LED)
11474
+  #if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
11455 11475
     SET_OUTPUT(RGB_LED_R_PIN);
11456 11476
     SET_OUTPUT(RGB_LED_G_PIN);
11457 11477
     SET_OUTPUT(RGB_LED_B_PIN);
11478
+    #if ENABLED(RGBW_LED)
11479
+      SET_OUTPUT(RGB_LED_W_PIN);
11480
+    #endif
11458 11481
   #endif
11459 11482
 
11460 11483
   lcd_init();

+ 16
- 0
Marlin/SanityCheck.h Vedi File

@@ -172,6 +172,8 @@
172 172
   #error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
173 173
 #elif defined(min_software_endstops) || defined(max_software_endstops)
174 174
   #error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration."
175
+#elif ENABLED(Z_PROBE_SLED) && defined(SLED_PIN)
176
+  #error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)."
175 177
 #endif
176 178
 
177 179
 /**
@@ -459,6 +461,9 @@ static_assert(1 >= 0
459 461
   #if ENABLED(Z_PROBE_SLED)
460 462
     + 1
461 463
   #endif
464
+  #if ENABLED(SOLENOID_PROBE)
465
+    + 1
466
+  #endif
462 467
   , "Please enable only one probe: PROBE_MANUALLY, FIX_MOUNTED_PROBE, Z Servo, BLTOUCH, Z_PROBE_ALLEN_KEY, or Z_PROBE_SLED."
463 468
 );
464 469
 
@@ -473,6 +478,17 @@ static_assert(1 >= 0
473 478
   #endif
474 479
 
475 480
   /**
481
+   * SOLENOID_PROBE requirements
482
+   */
483
+  #if ENABLED(SOLENOID_PROBE)
484
+    #if ENABLED(EXT_SOLENOID)
485
+      #error "SOLENOID_PROBE is incompatible with EXT_SOLENOID."
486
+    #elif !HAS_SOLENOID_1
487
+      #error "SOLENOID_PROBE requires SOL1_PIN. It can be added to your Configuration.h."
488
+    #endif
489
+  #endif
490
+
491
+  /**
476 492
    * NUM_SERVOS is required for a Z servo probe
477 493
    */
478 494
   #if HAS_Z_SERVO_ENDSTOP

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

@@ -592,6 +592,9 @@
592 592
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
593 593
  */
594 594
 
595
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
596
+//#define SOLENOID_PROBE
597
+
595 598
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
596 599
 //#define Z_PROBE_SLED
597 600
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/Cartesio/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/Felix/Configuration.h Vedi File

@@ -576,6 +576,9 @@
576 576
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
577 577
  */
578 578
 
579
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
580
+//#define SOLENOID_PROBE
581
+
579 582
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
580 583
 //#define Z_PROBE_SLED
581 584
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/Felix/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/Felix/DUAL/Configuration.h Vedi File

@@ -576,6 +576,9 @@
576 576
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
577 577
  */
578 578
 
579
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
580
+//#define SOLENOID_PROBE
581
+
579 582
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
580 583
 //#define Z_PROBE_SLED
581 584
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

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

@@ -584,6 +584,9 @@
584 584
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
585 585
  */
586 586
 
587
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
588
+//#define SOLENOID_PROBE
589
+
587 590
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
588 591
 //#define Z_PROBE_SLED
589 592
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/Hephestos/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/Hephestos_2/Configuration.h Vedi File

@@ -587,6 +587,9 @@
587 587
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
588 588
  */
589 589
 
590
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
591
+//#define SOLENOID_PROBE
592
+
590 593
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
591 594
 //#define Z_PROBE_SLED
592 595
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/Hephestos_2/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/K8200/Configuration.h Vedi File

@@ -622,6 +622,9 @@
622 622
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
623 623
  */
624 624
 
625
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
626
+//#define SOLENOID_PROBE
627
+
625 628
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
626 629
 //#define Z_PROBE_SLED
627 630
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/K8200/Configuration_adv.h Vedi File

@@ -340,7 +340,11 @@
340 340
   // Default x offset in duplication mode (typically set to half print bed width)
341 341
   #define DEFAULT_DUPLICATION_X_OFFSET 100
342 342
 
343
-#endif //DUAL_X_CARRIAGE
343
+#endif // DUAL_X_CARRIAGE
344
+
345
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
346
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
347
+//#define EXT_SOLENOID
344 348
 
345 349
 // @section homing
346 350
 

+ 3
- 0
Marlin/example_configurations/K8400/Configuration.h Vedi File

@@ -593,6 +593,9 @@
593 593
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
594 594
  */
595 595
 
596
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
597
+//#define SOLENOID_PROBE
598
+
596 599
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
597 600
 //#define Z_PROBE_SLED
598 601
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/K8400/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/K8400/Dual-head/Configuration.h Vedi File

@@ -593,6 +593,9 @@
593 593
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
594 594
  */
595 595
 
596
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
597
+//#define SOLENOID_PROBE
598
+
596 599
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
597 600
 //#define Z_PROBE_SLED
598 601
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 3
- 0
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Vedi File

@@ -593,6 +593,9 @@
593 593
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
594 594
  */
595 595
 
596
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
597
+//#define SOLENOID_PROBE
598
+
596 599
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
597 600
 //#define Z_PROBE_SLED
598 601
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 3
- 0
Marlin/example_configurations/RigidBot/Configuration.h Vedi File

@@ -592,6 +592,9 @@
592 592
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
593 593
  */
594 594
 
595
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
596
+//#define SOLENOID_PROBE
597
+
595 598
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
596 599
 //#define Z_PROBE_SLED
597 600
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/RigidBot/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/SCARA/Configuration.h Vedi File

@@ -608,6 +608,9 @@
608 608
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
609 609
  */
610 610
 
611
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
612
+//#define SOLENOID_PROBE
613
+
611 614
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
612 615
 //#define Z_PROBE_SLED
613 616
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/SCARA/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

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

@@ -613,6 +613,9 @@
613 613
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
614 614
  */
615 615
 
616
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
617
+//#define SOLENOID_PROBE
618
+
616 619
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
617 620
 //#define Z_PROBE_SLED
618 621
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/TAZ4/Configuration_adv.h Vedi File

@@ -335,7 +335,11 @@
335 335
   // Default x offset in duplication mode (typically set to half print bed width)
336 336
   #define DEFAULT_DUPLICATION_X_OFFSET 100
337 337
 
338
-#endif //DUAL_X_CARRIAGE
338
+#endif // DUAL_X_CARRIAGE
339
+
340
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
341
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
342
+//#define EXT_SOLENOID
339 343
 
340 344
 // @section homing
341 345
 

+ 3
- 0
Marlin/example_configurations/TinyBoy2/Configuration.h Vedi File

@@ -644,6 +644,9 @@
644 644
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
645 645
  */
646 646
 
647
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
648
+//#define SOLENOID_PROBE
649
+
647 650
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
648 651
 //#define Z_PROBE_SLED
649 652
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/TinyBoy2/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

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

@@ -584,6 +584,9 @@
584 584
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
585 585
  */
586 586
 
587
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
588
+//#define SOLENOID_PROBE
589
+
587 590
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
588 591
 //#define Z_PROBE_SLED
589 592
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/WITBOX/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/adafruit/ST7565/Configuration.h Vedi File

@@ -593,6 +593,9 @@
593 593
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
594 594
  */
595 595
 
596
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
597
+//#define SOLENOID_PROBE
598
+
596 599
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
597 600
 //#define Z_PROBE_SLED
598 601
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 3
- 0
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h Vedi File

@@ -662,6 +662,9 @@
662 662
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
663 663
  */
664 664
 
665
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
666
+//#define SOLENOID_PROBE
667
+
665 668
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
666 669
 //#define Z_PROBE_SLED
667 670
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/delta/generic/Configuration.h Vedi File

@@ -649,6 +649,9 @@
649 649
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
650 650
  */
651 651
 
652
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
653
+//#define SOLENOID_PROBE
654
+
652 655
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
653 656
 //#define Z_PROBE_SLED
654 657
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/delta/generic/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration.h Vedi File

@@ -642,6 +642,9 @@
642 642
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
643 643
  */
644 644
 
645
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
646
+//#define SOLENOID_PROBE
647
+
645 648
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
646 649
 //#define Z_PROBE_SLED
647 650
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration.h Vedi File

@@ -643,6 +643,9 @@
643 643
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
644 644
  */
645 645
 
646
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
647
+//#define SOLENOID_PROBE
648
+
646 649
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
647 650
 //#define Z_PROBE_SLED
648 651
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h Vedi File

@@ -332,7 +332,11 @@
332 332
   // Default x offset in duplication mode (typically set to half print bed width)
333 333
   #define DEFAULT_DUPLICATION_X_OFFSET 100
334 334
 
335
-#endif //DUAL_X_CARRIAGE
335
+#endif // DUAL_X_CARRIAGE
336
+
337
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
338
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
339
+//#define EXT_SOLENOID
336 340
 
337 341
 // @section homing
338 342
 

+ 3
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration.h Vedi File

@@ -662,6 +662,9 @@
662 662
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
663 663
  */
664 664
 
665
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
666
+//#define SOLENOID_PROBE
667
+
665 668
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
666 669
 //#define Z_PROBE_SLED
667 670
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/makibox/Configuration.h Vedi File

@@ -596,6 +596,9 @@
596 596
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
597 597
  */
598 598
 
599
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
600
+//#define SOLENOID_PROBE
601
+
599 602
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
600 603
 //#define Z_PROBE_SLED
601 604
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/makibox/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration.h Vedi File

@@ -589,6 +589,9 @@
589 589
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
590 590
  */
591 591
 
592
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
593
+//#define SOLENOID_PROBE
594
+
592 595
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
593 596
 //#define Z_PROBE_SLED
594 597
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 3
- 0
Marlin/example_configurations/wt150/Configuration.h Vedi File

@@ -598,6 +598,9 @@
598 598
  *   is enabled then it also applies to Z_PROBE_SPEED_SLOW.
599 599
  */
600 600
 
601
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
602
+//#define SOLENOID_PROBE
603
+
601 604
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
602 605
 //#define Z_PROBE_SLED
603 606
 //#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

+ 5
- 1
Marlin/example_configurations/wt150/Configuration_adv.h Vedi File

@@ -327,7 +327,11 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331
+
332
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
333
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
334
+//#define EXT_SOLENOID
331 335
 
332 336
 // @section homing
333 337
 

+ 0
- 2
Marlin/pins_MEGATRONICS_3.h Vedi File

@@ -61,8 +61,6 @@
61 61
   #define Z_MIN_PROBE_PIN  19
62 62
 #endif
63 63
 
64
-#define SLED_PIN           -1
65
-
66 64
 //
67 65
 // Steppers
68 66
 //

+ 0
- 4
Marlin/pins_RAMBO.h Vedi File

@@ -63,10 +63,6 @@
63 63
   #define Z_MIN_PROBE_PIN  30
64 64
 #endif
65 65
 
66
-#if ENABLED(Z_PROBE_SLED)
67
-  #define SLED_PIN         -1
68
-#endif
69
-
70 66
 //
71 67
 // Limit Switches
72 68
 //

+ 0
- 2
Marlin/pins_RAMPS.h Vedi File

@@ -85,8 +85,6 @@
85 85
   #define Z_MIN_PROBE_PIN  32
86 86
 #endif
87 87
 
88
-#define SLED_PIN           -1
89
-
90 88
 //
91 89
 // Steppers
92 90
 //

+ 0
- 7
Marlin/pins_SANGUINOLOLU_11.h Vedi File

@@ -42,13 +42,6 @@
42 42
 #define Z_STOP_PIN         20
43 43
 
44 44
 //
45
-// Z Probe (when not Z_MIN_PIN)
46
-//
47
-#if ENABLED(Z_PROBE_SLED)
48
-  #define SLED_PIN         -1
49
-#endif
50
-
51
-//
52 45
 // Steppers
53 46
 //
54 47
 #define X_STEP_PIN         15

+ 0
- 2
Marlin/pins_SCOOVO_X9H.h Vedi File

@@ -57,8 +57,6 @@
57 57
   #define Z_MIN_PROBE_PIN   30
58 58
 #endif
59 59
 
60
-#define SLED_PIN -1
61
-
62 60
 //
63 61
 // Steppers
64 62
 //

+ 74
- 26
Marlin/stepper.cpp Vedi File

@@ -1076,6 +1076,9 @@ void Stepper::init() {
1076 1076
   #if HAS_E3_STEP
1077 1077
     E_AXIS_INIT(3);
1078 1078
   #endif
1079
+  #if HAS_E4_STEP
1080
+    E_AXIS_INIT(4);
1081
+  #endif
1079 1082
 
1080 1083
   // waveform generation = 0100 = CTC
1081 1084
   CBI(TCCR1B, WGM13);
@@ -1461,22 +1464,34 @@ void Stepper::report_positions() {
1461 1464
   void Stepper::microstep_init() {
1462 1465
     SET_OUTPUT(X_MS1_PIN);
1463 1466
     SET_OUTPUT(X_MS2_PIN);
1464
-    #if HAS_MICROSTEPS_Y
1467
+    #if HAS_Y_MICROSTEPS
1465 1468
       SET_OUTPUT(Y_MS1_PIN);
1466 1469
       SET_OUTPUT(Y_MS2_PIN);
1467 1470
     #endif
1468
-    #if HAS_MICROSTEPS_Z
1471
+    #if HAS_Z_MICROSTEPS
1469 1472
       SET_OUTPUT(Z_MS1_PIN);
1470 1473
       SET_OUTPUT(Z_MS2_PIN);
1471 1474
     #endif
1472
-    #if HAS_MICROSTEPS_E0
1475
+    #if HAS_E0_MICROSTEPS
1473 1476
       SET_OUTPUT(E0_MS1_PIN);
1474 1477
       SET_OUTPUT(E0_MS2_PIN);
1475 1478
     #endif
1476
-    #if HAS_MICROSTEPS_E1
1479
+    #if HAS_E1_MICROSTEPS
1477 1480
       SET_OUTPUT(E1_MS1_PIN);
1478 1481
       SET_OUTPUT(E1_MS2_PIN);
1479 1482
     #endif
1483
+    #if HAS_E2_MICROSTEPS
1484
+      SET_OUTPUT(E2_MS1_PIN);
1485
+      SET_OUTPUT(E2_MS2_PIN);
1486
+    #endif
1487
+    #if HAS_E3_MICROSTEPS
1488
+      SET_OUTPUT(E3_MS1_PIN);
1489
+      SET_OUTPUT(E3_MS2_PIN);
1490
+    #endif
1491
+    #if HAS_E4_MICROSTEPS
1492
+      SET_OUTPUT(E4_MS1_PIN);
1493
+      SET_OUTPUT(E4_MS2_PIN);
1494
+    #endif
1480 1495
     static const uint8_t microstep_modes[] = MICROSTEP_MODES;
1481 1496
     for (uint16_t i = 0; i < COUNT(microstep_modes); i++)
1482 1497
       microstep_mode(i, microstep_modes[i]);
@@ -1484,33 +1499,51 @@ void Stepper::report_positions() {
1484 1499
 
1485 1500
   void Stepper::microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2) {
1486 1501
     if (ms1 >= 0) switch (driver) {
1487
-      case 0: digitalWrite(X_MS1_PIN, ms1); break;
1488
-      #if HAS_MICROSTEPS_Y
1489
-        case 1: digitalWrite(Y_MS1_PIN, ms1); break;
1502
+      case 0: WRITE(X_MS1_PIN, ms1); break;
1503
+      #if HAS_Y_MICROSTEPS
1504
+        case 1: WRITE(Y_MS1_PIN, ms1); break;
1505
+      #endif
1506
+      #if HAS_Z_MICROSTEPS
1507
+        case 2: WRITE(Z_MS1_PIN, ms1); break;
1508
+      #endif
1509
+      #if HAS_E0_MICROSTEPS
1510
+        case 3: WRITE(E0_MS1_PIN, ms1); break;
1511
+      #endif
1512
+      #if HAS_E1_MICROSTEPS
1513
+        case 4: WRITE(E1_MS1_PIN, ms1); break;
1490 1514
       #endif
1491
-      #if HAS_MICROSTEPS_Z
1492
-        case 2: digitalWrite(Z_MS1_PIN, ms1); break;
1515
+      #if HAS_E2_MICROSTEPS
1516
+        case 5: WRITE(E2_MS1_PIN, ms1); break;
1493 1517
       #endif
1494
-      #if HAS_MICROSTEPS_E0
1495
-        case 3: digitalWrite(E0_MS1_PIN, ms1); break;
1518
+      #if HAS_E3_MICROSTEPS
1519
+        case 6: WRITE(E3_MS1_PIN, ms1); break;
1496 1520
       #endif
1497
-      #if HAS_MICROSTEPS_E1
1498
-        case 4: digitalWrite(E1_MS1_PIN, ms1); break;
1521
+      #if HAS_E4_MICROSTEPS
1522
+        case 7: WRITE(E4_MS1_PIN, ms1); break;
1499 1523
       #endif
1500 1524
     }
1501 1525
     if (ms2 >= 0) switch (driver) {
1502
-      case 0: digitalWrite(X_MS2_PIN, ms2); break;
1503
-      #if HAS_MICROSTEPS_Y
1504
-        case 1: digitalWrite(Y_MS2_PIN, ms2); break;
1526
+      case 0: WRITE(X_MS2_PIN, ms2); break;
1527
+      #if HAS_Y_MICROSTEPS
1528
+        case 1: WRITE(Y_MS2_PIN, ms2); break;
1505 1529
       #endif
1506
-      #if HAS_MICROSTEPS_Z
1507
-        case 2: digitalWrite(Z_MS2_PIN, ms2); break;
1530
+      #if HAS_Z_MICROSTEPS
1531
+        case 2: WRITE(Z_MS2_PIN, ms2); break;
1508 1532
       #endif
1509
-      #if HAS_MICROSTEPS_E0
1510
-        case 3: digitalWrite(E0_MS2_PIN, ms2); break;
1533
+      #if HAS_E0_MICROSTEPS
1534
+        case 3: WRITE(E0_MS2_PIN, ms2); break;
1511 1535
       #endif
1512
-      #if HAS_MICROSTEPS_E1
1513
-        case 4: digitalWrite(E1_MS2_PIN, ms2); break;
1536
+      #if HAS_E1_MICROSTEPS
1537
+        case 4: WRITE(E1_MS2_PIN, ms2); break;
1538
+      #endif
1539
+      #if HAS_E2_MICROSTEPS
1540
+        case 5: WRITE(E2_MS2_PIN, ms2); break;
1541
+      #endif
1542
+      #if HAS_E3_MICROSTEPS
1543
+        case 6: WRITE(E3_MS2_PIN, ms2); break;
1544
+      #endif
1545
+      #if HAS_E4_MICROSTEPS
1546
+        case 7: WRITE(E4_MS2_PIN, ms2); break;
1514 1547
       #endif
1515 1548
     }
1516 1549
   }
@@ -1530,26 +1563,41 @@ void Stepper::report_positions() {
1530 1563
     SERIAL_PROTOCOLPGM("X: ");
1531 1564
     SERIAL_PROTOCOL(READ(X_MS1_PIN));
1532 1565
     SERIAL_PROTOCOLLN(READ(X_MS2_PIN));
1533
-    #if HAS_MICROSTEPS_Y
1566
+    #if HAS_Y_MICROSTEPS
1534 1567
       SERIAL_PROTOCOLPGM("Y: ");
1535 1568
       SERIAL_PROTOCOL(READ(Y_MS1_PIN));
1536 1569
       SERIAL_PROTOCOLLN(READ(Y_MS2_PIN));
1537 1570
     #endif
1538
-    #if HAS_MICROSTEPS_Z
1571
+    #if HAS_Z_MICROSTEPS
1539 1572
       SERIAL_PROTOCOLPGM("Z: ");
1540 1573
       SERIAL_PROTOCOL(READ(Z_MS1_PIN));
1541 1574
       SERIAL_PROTOCOLLN(READ(Z_MS2_PIN));
1542 1575
     #endif
1543
-    #if HAS_MICROSTEPS_E0
1576
+    #if HAS_E0_MICROSTEPS
1544 1577
       SERIAL_PROTOCOLPGM("E0: ");
1545 1578
       SERIAL_PROTOCOL(READ(E0_MS1_PIN));
1546 1579
       SERIAL_PROTOCOLLN(READ(E0_MS2_PIN));
1547 1580
     #endif
1548
-    #if HAS_MICROSTEPS_E1
1581
+    #if HAS_E1_MICROSTEPS
1549 1582
       SERIAL_PROTOCOLPGM("E1: ");
1550 1583
       SERIAL_PROTOCOL(READ(E1_MS1_PIN));
1551 1584
       SERIAL_PROTOCOLLN(READ(E1_MS2_PIN));
1552 1585
     #endif
1586
+    #if HAS_E2_MICROSTEPS
1587
+      SERIAL_PROTOCOLPGM("E2: ");
1588
+      SERIAL_PROTOCOL(READ(E2_MS1_PIN));
1589
+      SERIAL_PROTOCOLLN(READ(E2_MS2_PIN));
1590
+    #endif
1591
+    #if HAS_E3_MICROSTEPS
1592
+      SERIAL_PROTOCOLPGM("E3: ");
1593
+      SERIAL_PROTOCOL(READ(E3_MS1_PIN));
1594
+      SERIAL_PROTOCOLLN(READ(E3_MS2_PIN));
1595
+    #endif
1596
+    #if HAS_E4_MICROSTEPS
1597
+      SERIAL_PROTOCOLPGM("E4: ");
1598
+      SERIAL_PROTOCOL(READ(E4_MS1_PIN));
1599
+      SERIAL_PROTOCOLLN(READ(E4_MS2_PIN));
1600
+    #endif
1553 1601
   }
1554 1602
 
1555 1603
 #endif // HAS_MICROSTEPS

+ 9
- 0
Marlin/thermistortables.h Vedi File

@@ -226,6 +226,15 @@
226 226
     #define HEATER_3_RAW_LO_TEMP 0
227 227
   #endif
228 228
 #endif
229
+#ifndef HEATER_4_RAW_HI_TEMP
230
+  #ifdef HEATER_4_USES_THERMISTOR
231
+    #define HEATER_4_RAW_HI_TEMP 0
232
+    #define HEATER_4_RAW_LO_TEMP 16383
233
+  #else
234
+    #define HEATER_4_RAW_HI_TEMP 16383
235
+    #define HEATER_4_RAW_LO_TEMP 0
236
+  #endif
237
+#endif
229 238
 #ifndef HEATER_BED_RAW_HI_TEMP
230 239
   #ifdef BED_USES_THERMISTOR
231 240
     #define HEATER_BED_RAW_HI_TEMP 0

Loading…
Annulla
Salva