Parcourir la source

Reorder Conditionals_post.h and add comments

Scott Lahteine il y a 7 ans
Parent
révision
f4685c28b7
2 fichiers modifiés avec 122 ajouts et 93 suppressions
  1. 94
    65
      Marlin/Conditionals_post.h
  2. 28
    28
      Marlin/stepper.cpp

+ 94
- 65
Marlin/Conditionals_post.h Voir le fichier

@@ -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,91 +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_0 (PIN_EXISTS(SOL0))
491
-  #define HAS_SOLENOID_1 (PIN_EXISTS(SOL1))
492
-  #define HAS_SOLENOID_2 (PIN_EXISTS(SOL2))
493
-  #define HAS_SOLENOID_3 (PIN_EXISTS(SOL3))
494
-  #define HAS_SOLENOID_4 (PIN_EXISTS(SOL4))
495
-  #define HAS_MICROSTEPS_X (PIN_EXISTS(X_MS1))
496
-  #define HAS_MICROSTEPS_Y (PIN_EXISTS(Y_MS1))
497
-  #define HAS_MICROSTEPS_Z (PIN_EXISTS(Z_MS1))
498
-  #define HAS_MICROSTEPS_E0 (PIN_EXISTS(E0_MS1))
499
-  #define HAS_MICROSTEPS_E1 (PIN_EXISTS(E1_MS1))
500
-  #define HAS_MICROSTEPS_E2 (PIN_EXISTS(E2_MS1))
501
-  #define HAS_MICROSTEPS_E3 (PIN_EXISTS(E3_MS1))
502
-  #define HAS_MICROSTEPS_E4 (PIN_EXISTS(E4_MS1))
503
-  #define HAS_MICROSTEPS (HAS_MICROSTEPS_X || HAS_MICROSTEPS_Y || HAS_MICROSTEPS_Z || HAS_MICROSTEPS_E0 || HAS_MICROSTEPS_E1 || HAS_MICROSTEPS_E2)
504
-  #define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET))
505
-  #define HAS_X_ENABLE (PIN_EXISTS(X_ENABLE))
506
-  #define HAS_X2_ENABLE (PIN_EXISTS(X2_ENABLE))
507
-  #define HAS_Y_ENABLE (PIN_EXISTS(Y_ENABLE))
508
-  #define HAS_Y2_ENABLE (PIN_EXISTS(Y2_ENABLE))
509
-  #define HAS_Z_ENABLE (PIN_EXISTS(Z_ENABLE))
510
-  #define HAS_Z2_ENABLE (PIN_EXISTS(Z2_ENABLE))
511
-  #define HAS_E0_ENABLE (PIN_EXISTS(E0_ENABLE))
512
-  #define HAS_E1_ENABLE (PIN_EXISTS(E1_ENABLE))
513
-  #define HAS_E2_ENABLE (PIN_EXISTS(E2_ENABLE))
514
-  #define HAS_E3_ENABLE (PIN_EXISTS(E3_ENABLE))
515
-  #define HAS_E4_ENABLE (PIN_EXISTS(E4_ENABLE))
516
-  #define HAS_X_DIR (PIN_EXISTS(X_DIR))
517
-  #define HAS_X2_DIR (PIN_EXISTS(X2_DIR))
518
-  #define HAS_Y_DIR (PIN_EXISTS(Y_DIR))
519
-  #define HAS_Y2_DIR (PIN_EXISTS(Y2_DIR))
520
-  #define HAS_Z_DIR (PIN_EXISTS(Z_DIR))
521
-  #define HAS_Z2_DIR (PIN_EXISTS(Z2_DIR))
522
-  #define HAS_E0_DIR (PIN_EXISTS(E0_DIR))
523
-  #define HAS_E1_DIR (PIN_EXISTS(E1_DIR))
524
-  #define HAS_E2_DIR (PIN_EXISTS(E2_DIR))
525
-  #define HAS_E3_DIR (PIN_EXISTS(E3_DIR))
526
-  #define HAS_E4_DIR (PIN_EXISTS(E4_DIR))
527
-  #define HAS_X_STEP (PIN_EXISTS(X_STEP))
528
-  #define HAS_X2_STEP (PIN_EXISTS(X2_STEP))
529
-  #define HAS_Y_STEP (PIN_EXISTS(Y_STEP))
530
-  #define HAS_Y2_STEP (PIN_EXISTS(Y2_STEP))
531
-  #define HAS_Z_STEP (PIN_EXISTS(Z_STEP))
532
-  #define HAS_Z2_STEP (PIN_EXISTS(Z2_STEP))
533
-  #define HAS_E0_STEP (PIN_EXISTS(E0_STEP))
534
-  #define HAS_E1_STEP (PIN_EXISTS(E1_STEP))
535
-  #define HAS_E2_STEP (PIN_EXISTS(E2_STEP))
536
-  #define HAS_E3_STEP (PIN_EXISTS(E3_STEP))
537
-  #define HAS_E4_STEP (PIN_EXISTS(E4_STEP))
538
-  #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
539 571
   #define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER))
540 572
   #define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT))
541 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))
542 578
   #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
543 579
 
544
-  #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
545
-
546
-  #define HAS_THERMALLY_PROTECTED_BED (HAS_TEMP_BED && HAS_HEATER_BED && ENABLED(THERMAL_PROTECTION_BED))
547
-
548
-  #define WATCH_HOTENDS (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0)
549
-  #define WATCH_THE_BED (HAS_THERMALLY_PROTECTED_BED && WATCH_BED_TEMP_PERIOD > 0)
550
-
551 580
   /**
552 581
    * This setting is also used by M109 when trying to calculate
553 582
    * a ballpark safe margin to prevent wait-forever situation.

+ 28
- 28
Marlin/stepper.cpp Voir le fichier

@@ -1464,31 +1464,31 @@ void Stepper::report_positions() {
1464 1464
   void Stepper::microstep_init() {
1465 1465
     SET_OUTPUT(X_MS1_PIN);
1466 1466
     SET_OUTPUT(X_MS2_PIN);
1467
-    #if HAS_MICROSTEPS_Y
1467
+    #if HAS_Y_MICROSTEPS
1468 1468
       SET_OUTPUT(Y_MS1_PIN);
1469 1469
       SET_OUTPUT(Y_MS2_PIN);
1470 1470
     #endif
1471
-    #if HAS_MICROSTEPS_Z
1471
+    #if HAS_Z_MICROSTEPS
1472 1472
       SET_OUTPUT(Z_MS1_PIN);
1473 1473
       SET_OUTPUT(Z_MS2_PIN);
1474 1474
     #endif
1475
-    #if HAS_MICROSTEPS_E0
1475
+    #if HAS_E0_MICROSTEPS
1476 1476
       SET_OUTPUT(E0_MS1_PIN);
1477 1477
       SET_OUTPUT(E0_MS2_PIN);
1478 1478
     #endif
1479
-    #if HAS_MICROSTEPS_E1
1479
+    #if HAS_E1_MICROSTEPS
1480 1480
       SET_OUTPUT(E1_MS1_PIN);
1481 1481
       SET_OUTPUT(E1_MS2_PIN);
1482 1482
     #endif
1483
-    #if HAS_MICROSTEPS_E2
1483
+    #if HAS_E2_MICROSTEPS
1484 1484
       SET_OUTPUT(E2_MS1_PIN);
1485 1485
       SET_OUTPUT(E2_MS2_PIN);
1486 1486
     #endif
1487
-    #if HAS_MICROSTEPS_E3
1487
+    #if HAS_E3_MICROSTEPS
1488 1488
       SET_OUTPUT(E3_MS1_PIN);
1489 1489
       SET_OUTPUT(E3_MS2_PIN);
1490 1490
     #endif
1491
-    #if HAS_MICROSTEPS_E4
1491
+    #if HAS_E4_MICROSTEPS
1492 1492
       SET_OUTPUT(E4_MS1_PIN);
1493 1493
       SET_OUTPUT(E4_MS2_PIN);
1494 1494
     #endif
@@ -1500,49 +1500,49 @@ void Stepper::report_positions() {
1500 1500
   void Stepper::microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2) {
1501 1501
     if (ms1 >= 0) switch (driver) {
1502 1502
       case 0: WRITE(X_MS1_PIN, ms1); break;
1503
-      #if HAS_MICROSTEPS_Y
1503
+      #if HAS_Y_MICROSTEPS
1504 1504
         case 1: WRITE(Y_MS1_PIN, ms1); break;
1505 1505
       #endif
1506
-      #if HAS_MICROSTEPS_Z
1506
+      #if HAS_Z_MICROSTEPS
1507 1507
         case 2: WRITE(Z_MS1_PIN, ms1); break;
1508 1508
       #endif
1509
-      #if HAS_MICROSTEPS_E0
1509
+      #if HAS_E0_MICROSTEPS
1510 1510
         case 3: WRITE(E0_MS1_PIN, ms1); break;
1511 1511
       #endif
1512
-      #if HAS_MICROSTEPS_E1
1512
+      #if HAS_E1_MICROSTEPS
1513 1513
         case 4: WRITE(E1_MS1_PIN, ms1); break;
1514 1514
       #endif
1515
-      #if HAS_MICROSTEPS_E2
1515
+      #if HAS_E2_MICROSTEPS
1516 1516
         case 5: WRITE(E2_MS1_PIN, ms1); break;
1517 1517
       #endif
1518
-      #if HAS_MICROSTEPS_E3
1518
+      #if HAS_E3_MICROSTEPS
1519 1519
         case 6: WRITE(E3_MS1_PIN, ms1); break;
1520 1520
       #endif
1521
-      #if HAS_MICROSTEPS_E4
1521
+      #if HAS_E4_MICROSTEPS
1522 1522
         case 7: WRITE(E4_MS1_PIN, ms1); break;
1523 1523
       #endif
1524 1524
     }
1525 1525
     if (ms2 >= 0) switch (driver) {
1526 1526
       case 0: WRITE(X_MS2_PIN, ms2); break;
1527
-      #if HAS_MICROSTEPS_Y
1527
+      #if HAS_Y_MICROSTEPS
1528 1528
         case 1: WRITE(Y_MS2_PIN, ms2); break;
1529 1529
       #endif
1530
-      #if HAS_MICROSTEPS_Z
1530
+      #if HAS_Z_MICROSTEPS
1531 1531
         case 2: WRITE(Z_MS2_PIN, ms2); break;
1532 1532
       #endif
1533
-      #if HAS_MICROSTEPS_E0
1533
+      #if HAS_E0_MICROSTEPS
1534 1534
         case 3: WRITE(E0_MS2_PIN, ms2); break;
1535 1535
       #endif
1536
-      #if HAS_MICROSTEPS_E1
1536
+      #if HAS_E1_MICROSTEPS
1537 1537
         case 4: WRITE(E1_MS2_PIN, ms2); break;
1538 1538
       #endif
1539
-      #if HAS_MICROSTEPS_E2
1539
+      #if HAS_E2_MICROSTEPS
1540 1540
         case 5: WRITE(E2_MS2_PIN, ms2); break;
1541 1541
       #endif
1542
-      #if HAS_MICROSTEPS_E3
1542
+      #if HAS_E3_MICROSTEPS
1543 1543
         case 6: WRITE(E3_MS2_PIN, ms2); break;
1544 1544
       #endif
1545
-      #if HAS_MICROSTEPS_E4
1545
+      #if HAS_E4_MICROSTEPS
1546 1546
         case 7: WRITE(E4_MS2_PIN, ms2); break;
1547 1547
       #endif
1548 1548
     }
@@ -1563,37 +1563,37 @@ void Stepper::report_positions() {
1563 1563
     SERIAL_PROTOCOLPGM("X: ");
1564 1564
     SERIAL_PROTOCOL(READ(X_MS1_PIN));
1565 1565
     SERIAL_PROTOCOLLN(READ(X_MS2_PIN));
1566
-    #if HAS_MICROSTEPS_Y
1566
+    #if HAS_Y_MICROSTEPS
1567 1567
       SERIAL_PROTOCOLPGM("Y: ");
1568 1568
       SERIAL_PROTOCOL(READ(Y_MS1_PIN));
1569 1569
       SERIAL_PROTOCOLLN(READ(Y_MS2_PIN));
1570 1570
     #endif
1571
-    #if HAS_MICROSTEPS_Z
1571
+    #if HAS_Z_MICROSTEPS
1572 1572
       SERIAL_PROTOCOLPGM("Z: ");
1573 1573
       SERIAL_PROTOCOL(READ(Z_MS1_PIN));
1574 1574
       SERIAL_PROTOCOLLN(READ(Z_MS2_PIN));
1575 1575
     #endif
1576
-    #if HAS_MICROSTEPS_E0
1576
+    #if HAS_E0_MICROSTEPS
1577 1577
       SERIAL_PROTOCOLPGM("E0: ");
1578 1578
       SERIAL_PROTOCOL(READ(E0_MS1_PIN));
1579 1579
       SERIAL_PROTOCOLLN(READ(E0_MS2_PIN));
1580 1580
     #endif
1581
-    #if HAS_MICROSTEPS_E1
1581
+    #if HAS_E1_MICROSTEPS
1582 1582
       SERIAL_PROTOCOLPGM("E1: ");
1583 1583
       SERIAL_PROTOCOL(READ(E1_MS1_PIN));
1584 1584
       SERIAL_PROTOCOLLN(READ(E1_MS2_PIN));
1585 1585
     #endif
1586
-    #if HAS_MICROSTEPS_E2
1586
+    #if HAS_E2_MICROSTEPS
1587 1587
       SERIAL_PROTOCOLPGM("E2: ");
1588 1588
       SERIAL_PROTOCOL(READ(E2_MS1_PIN));
1589 1589
       SERIAL_PROTOCOLLN(READ(E2_MS2_PIN));
1590 1590
     #endif
1591
-    #if HAS_MICROSTEPS_E3
1591
+    #if HAS_E3_MICROSTEPS
1592 1592
       SERIAL_PROTOCOLPGM("E3: ");
1593 1593
       SERIAL_PROTOCOL(READ(E3_MS1_PIN));
1594 1594
       SERIAL_PROTOCOLLN(READ(E3_MS2_PIN));
1595 1595
     #endif
1596
-    #if HAS_MICROSTEPS_E4
1596
+    #if HAS_E4_MICROSTEPS
1597 1597
       SERIAL_PROTOCOLPGM("E4: ");
1598 1598
       SERIAL_PROTOCOL(READ(E4_MS1_PIN));
1599 1599
       SERIAL_PROTOCOLLN(READ(E4_MS2_PIN));

Chargement…
Annuler
Enregistrer