|
@@ -5397,12 +5397,11 @@ inline void gcode_M42() {
|
5397
|
5397
|
#if !(NUM_SERVOS >= 1 && HAS_SERVO_0)
|
5398
|
5398
|
SERIAL_ERROR_START;
|
5399
|
5399
|
SERIAL_ERRORLNPGM("SERVO not setup");
|
|
5400
|
+ #elif !HAS_Z_SERVO_ENDSTOP
|
|
5401
|
+ SERIAL_ERROR_START;
|
|
5402
|
+ SERIAL_ERRORLNPGM("Z_ENDSTOP_SERVO_NR not setup");
|
5400
|
5403
|
#else
|
5401
|
|
-
|
5402
|
|
- #if !defined(z_servo_angle)
|
5403
|
|
- const int z_servo_angle[2] = Z_SERVO_ANGLES;
|
5404
|
|
- #endif
|
5405
|
|
- uint8_t probe_index = code_seen('P') ? code_value_byte() : 0;
|
|
5404
|
+ uint8_t probe_index = code_seen('P') ? code_value_byte() : Z_ENDSTOP_SERVO_NR;
|
5406
|
5405
|
SERIAL_PROTOCOLLNPGM("Servo probe test");
|
5407
|
5406
|
SERIAL_PROTOCOLLNPAIR(". using index: ", probe_index);
|
5408
|
5407
|
SERIAL_PROTOCOLLNPAIR(". deploy angle: ", z_servo_angle[0]);
|
|
@@ -5418,7 +5417,6 @@ inline void gcode_M42() {
|
5418
|
5417
|
probe_inverting = Z_MIN_ENDSTOP_INVERTING;
|
5419
|
5418
|
#elif ENABLED(Z_MIN_PROBE_ENDSTOP)
|
5420
|
5419
|
#define PROBE_TEST_PIN Z_MIN_PROBE_PIN
|
5421
|
|
-
|
5422
|
5420
|
SERIAL_PROTOCOLLNPAIR(". probe uses Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN);
|
5423
|
5421
|
SERIAL_PROTOCOLLNPGM(". uses Z_MIN_PROBE_ENDSTOP_INVERTING (ignores Z_MIN_ENDSTOP_INVERTING)");
|
5424
|
5422
|
SERIAL_PROTOCOLPGM(". Z_MIN_PROBE_ENDSTOP_INVERTING: ");
|
|
@@ -5443,7 +5441,7 @@ inline void gcode_M42() {
|
5443
|
5441
|
if (probe_inverting != deploy_state) SERIAL_PROTOCOLLNPGM("WARNING - INVERTING setting probably backwards");
|
5444
|
5442
|
refresh_cmd_timeout();
|
5445
|
5443
|
if (deploy_state != stow_state) {
|
5446
|
|
- SERIAL_PROTOCOLLNPGM("TLTouch detected"); // BLTouch clone?
|
|
5444
|
+ SERIAL_PROTOCOLLNPGM("BLTouch clone detected");
|
5447
|
5445
|
if (deploy_state) {
|
5448
|
5446
|
SERIAL_PROTOCOLLNPGM(". DEPLOYED state: HIGH (logic 1)");
|
5449
|
5447
|
SERIAL_PROTOCOLLNPGM(". STOWED (triggered) state: LOW (logic 0)");
|
|
@@ -5452,6 +5450,10 @@ inline void gcode_M42() {
|
5452
|
5450
|
SERIAL_PROTOCOLLNPGM(". DEPLOYED state: LOW (logic 0)");
|
5453
|
5451
|
SERIAL_PROTOCOLLNPGM(". STOWED (triggered) state: HIGH (logic 1)");
|
5454
|
5452
|
}
|
|
5453
|
+ #if ENABLED(BLTOUCH)
|
|
5454
|
+ SERIAL_PROTOCOLLNPGM("ERROR: BLTOUCH enabled - set this device up as a Z Servo Probe with inverting as true.");
|
|
5455
|
+ #endif
|
|
5456
|
+
|
5455
|
5457
|
}
|
5456
|
5458
|
else { // measure active signal length
|
5457
|
5459
|
servo[probe_index].move(z_servo_angle[0]); //deploy
|