|
@@ -3420,95 +3420,76 @@ void Stepper::report_positions() {
|
3420
|
3420
|
}
|
3421
|
3421
|
|
3422
|
3422
|
void Stepper::microstep_readings() {
|
3423
|
|
- SERIAL_ECHOLNPGM("MS1|MS2|MS3 Pins");
|
|
3423
|
+ #define PIN_CHAR(P) SERIAL_CHAR('0' + READ(P##_PIN))
|
|
3424
|
+ #define MS_LINE(A) do{ SERIAL_ECHOPGM(" " STRINGIFY(A) ":"); PIN_CHAR(A##_MS1); PIN_CHAR(A##_MS2); }while(0)
|
|
3425
|
+ SERIAL_ECHOPGM("MS1|2|3 Pins");
|
3424
|
3426
|
#if HAS_X_MS_PINS
|
3425
|
|
- SERIAL_ECHOPGM("X: ");
|
3426
|
|
- SERIAL_CHAR('0' + READ(X_MS1_PIN), '0' + READ(X_MS2_PIN)
|
3427
|
|
- #if PIN_EXISTS(X_MS3)
|
3428
|
|
- , '0' + READ(X_MS3_PIN)
|
3429
|
|
- #endif
|
3430
|
|
- );
|
|
3427
|
+ MS_LINE(X);
|
|
3428
|
+ #if PIN_EXISTS(X_MS3)
|
|
3429
|
+ PIN_CHAR(X_MS3);
|
|
3430
|
+ #endif
|
3431
|
3431
|
#endif
|
3432
|
3432
|
#if HAS_Y_MS_PINS
|
3433
|
|
- SERIAL_ECHOPGM("Y: ");
|
3434
|
|
- SERIAL_CHAR('0' + READ(Y_MS1_PIN), '0' + READ(Y_MS2_PIN)
|
3435
|
|
- #if PIN_EXISTS(Y_MS3)
|
3436
|
|
- , '0' + READ(Y_MS3_PIN)
|
3437
|
|
- #endif
|
3438
|
|
- );
|
|
3433
|
+ MS_LINE(Y);
|
|
3434
|
+ #if PIN_EXISTS(Y_MS3)
|
|
3435
|
+ PIN_CHAR(Y_MS3);
|
|
3436
|
+ #endif
|
3439
|
3437
|
#endif
|
3440
|
3438
|
#if HAS_Z_MS_PINS
|
3441
|
|
- SERIAL_ECHOPGM("Z: ");
|
3442
|
|
- SERIAL_CHAR('0' + READ(Z_MS1_PIN), '0' + READ(Z_MS2_PIN)
|
3443
|
|
- #if PIN_EXISTS(Z_MS3)
|
3444
|
|
- , '0' + READ(Z_MS3_PIN)
|
3445
|
|
- #endif
|
3446
|
|
- );
|
|
3439
|
+ MS_LINE(Z);
|
|
3440
|
+ #if PIN_EXISTS(Z_MS3)
|
|
3441
|
+ PIN_CHAR(Z_MS3);
|
|
3442
|
+ #endif
|
3447
|
3443
|
#endif
|
3448
|
3444
|
#if HAS_E0_MS_PINS
|
3449
|
|
- SERIAL_ECHOPGM("E0: ");
|
3450
|
|
- SERIAL_CHAR('0' + READ(E0_MS1_PIN), '0' + READ(E0_MS2_PIN)
|
3451
|
|
- #if PIN_EXISTS(E0_MS3)
|
3452
|
|
- , '0' + READ(E0_MS3_PIN)
|
3453
|
|
- #endif
|
3454
|
|
- );
|
|
3445
|
+ MS_LINE(E0);
|
|
3446
|
+ #if PIN_EXISTS(E0_MS3)
|
|
3447
|
+ PIN_CHAR(E0_MS3);
|
|
3448
|
+ #endif
|
3455
|
3449
|
#endif
|
3456
|
3450
|
#if HAS_E1_MS_PINS
|
3457
|
|
- SERIAL_ECHOPGM("E1: ");
|
3458
|
|
- SERIAL_CHAR('0' + READ(E1_MS1_PIN), '0' + READ(E1_MS2_PIN)
|
3459
|
|
- #if PIN_EXISTS(E1_MS3)
|
3460
|
|
- , '0' + READ(E1_MS3_PIN)
|
3461
|
|
- #endif
|
3462
|
|
- );
|
|
3451
|
+ MS_LINE(E1);
|
|
3452
|
+ #if PIN_EXISTS(E1_MS3)
|
|
3453
|
+ PIN_CHAR(E1_MS3);
|
|
3454
|
+ #endif
|
3463
|
3455
|
#endif
|
3464
|
3456
|
#if HAS_E2_MS_PINS
|
3465
|
|
- SERIAL_ECHOPGM("E2: ");
|
3466
|
|
- SERIAL_CHAR('0' + READ(E2_MS1_PIN), '0' + READ(E2_MS2_PIN)
|
3467
|
|
- #if PIN_EXISTS(E2_MS3)
|
3468
|
|
- , '0' + READ(E2_MS3_PIN)
|
3469
|
|
- #endif
|
3470
|
|
- );
|
|
3457
|
+ MS_LINE(E2);
|
|
3458
|
+ #if PIN_EXISTS(E2_MS3)
|
|
3459
|
+ PIN_CHAR(E2_MS3);
|
|
3460
|
+ #endif
|
3471
|
3461
|
#endif
|
3472
|
3462
|
#if HAS_E3_MS_PINS
|
3473
|
|
- SERIAL_ECHOPGM("E3: ");
|
3474
|
|
- SERIAL_CHAR('0' + READ(E3_MS1_PIN), '0' + READ(E3_MS2_PIN)
|
3475
|
|
- #if PIN_EXISTS(E3_MS3)
|
3476
|
|
- , '0' + READ(E3_MS3_PIN)
|
3477
|
|
- #endif
|
3478
|
|
- );
|
|
3463
|
+ MS_LINE(E3);
|
|
3464
|
+ #if PIN_EXISTS(E3_MS3)
|
|
3465
|
+ PIN_CHAR(E3_MS3);
|
|
3466
|
+ #endif
|
3479
|
3467
|
#endif
|
3480
|
3468
|
#if HAS_E4_MS_PINS
|
3481
|
|
- SERIAL_ECHOPGM("E4: ");
|
3482
|
|
- SERIAL_CHAR('0' + READ(E4_MS1_PIN), '0' + READ(E4_MS2_PIN)
|
3483
|
|
- #if PIN_EXISTS(E4_MS3)
|
3484
|
|
- , '0' + READ(E4_MS3_PIN)
|
3485
|
|
- #endif
|
3486
|
|
- );
|
|
3469
|
+ MS_LINE(E4);
|
|
3470
|
+ #if PIN_EXISTS(E4_MS3)
|
|
3471
|
+ PIN_CHAR(E4_MS3);
|
|
3472
|
+ #endif
|
3487
|
3473
|
#endif
|
3488
|
3474
|
#if HAS_E5_MS_PINS
|
3489
|
|
- SERIAL_ECHOPGM("E5: ");
|
3490
|
|
- SERIAL_CHAR('0' + READ(E5_MS1_PIN), '0' + READ(E5_MS2_PIN)
|
3491
|
|
- #if PIN_EXISTS(E5_MS3)
|
3492
|
|
- , '0' + READ(E5_MS3_PIN)
|
3493
|
|
- #endif
|
3494
|
|
- );
|
|
3475
|
+ MS_LINE(E5);
|
|
3476
|
+ #if PIN_EXISTS(E5_MS3)
|
|
3477
|
+ PIN_CHAR(E5_MS3);
|
|
3478
|
+ #endif
|
3495
|
3479
|
#endif
|
3496
|
3480
|
#if HAS_E6_MS_PINS
|
3497
|
|
- SERIAL_ECHOPGM("E6: ");
|
3498
|
|
- SERIAL_CHAR('0' + READ(E6_MS1_PIN), '0' + READ(E6_MS2_PIN)
|
3499
|
|
- #if PIN_EXISTS(E6_MS3)
|
3500
|
|
- , '0' + READ(E6_MS3_PIN)
|
3501
|
|
- #endif
|
3502
|
|
- );
|
|
3481
|
+ MS_LINE(E6);
|
|
3482
|
+ #if PIN_EXISTS(E6_MS3)
|
|
3483
|
+ PIN_CHAR(E6_MS3);
|
|
3484
|
+ #endif
|
3503
|
3485
|
#endif
|
3504
|
3486
|
#if HAS_E7_MS_PINS
|
3505
|
|
- SERIAL_ECHOPGM("E7: ");
|
3506
|
|
- SERIAL_CHAR('0' + READ(E7_MS1_PIN), '0' + READ(E7_MS2_PIN)
|
3507
|
|
- #if PIN_EXISTS(E7_MS3)
|
3508
|
|
- , '0' + READ(E7_MS3_PIN)
|
3509
|
|
- #endif
|
3510
|
|
- );
|
|
3487
|
+ MS_LINE(E7);
|
|
3488
|
+ #if PIN_EXISTS(E7_MS3)
|
|
3489
|
+ PIN_CHAR(E7_MS3);
|
|
3490
|
+ #endif
|
3511
|
3491
|
#endif
|
|
3492
|
+ SERIAL_EOL();
|
3512
|
3493
|
}
|
3513
|
3494
|
|
3514
|
3495
|
#endif // HAS_MICROSTEPS
|