Z Endstop Servo => Z Probe Servo
This commit is contained in:
parent
2dafc10da3
commit
be098cd42f
59 changed files with 89 additions and 87 deletions
|
|
@ -572,7 +572,7 @@ uint8_t target_extruder;
|
|||
float hotend_offset[XYZ][HOTENDS]; // Initialized by settings.load()
|
||||
#endif
|
||||
|
||||
#if HAS_Z_SERVO_ENDSTOP
|
||||
#if HAS_Z_SERVO_PROBE
|
||||
const int z_servo_angle[2] = Z_SERVO_ANGLES;
|
||||
#endif
|
||||
|
||||
|
|
@ -676,9 +676,9 @@ static bool send_ok[BUFSIZE];
|
|||
#if HAS_SERVOS
|
||||
Servo servo[NUM_SERVOS];
|
||||
#define MOVE_SERVO(I, P) servo[I].move(P)
|
||||
#if HAS_Z_SERVO_ENDSTOP
|
||||
#define DEPLOY_Z_SERVO() MOVE_SERVO(Z_ENDSTOP_SERVO_NR, z_servo_angle[0])
|
||||
#define STOW_Z_SERVO() MOVE_SERVO(Z_ENDSTOP_SERVO_NR, z_servo_angle[1])
|
||||
#if HAS_Z_SERVO_PROBE
|
||||
#define DEPLOY_Z_SERVO() MOVE_SERVO(Z_PROBE_SERVO_NR, z_servo_angle[0])
|
||||
#define STOW_Z_SERVO() MOVE_SERVO(Z_PROBE_SERVO_NR, z_servo_angle[1])
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -947,7 +947,7 @@ void servo_init() {
|
|||
servo[3].detach();
|
||||
#endif
|
||||
|
||||
#if HAS_Z_SERVO_ENDSTOP
|
||||
#if HAS_Z_SERVO_PROBE
|
||||
/**
|
||||
* Set position of Z Servo Endstop
|
||||
*
|
||||
|
|
@ -2013,7 +2013,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
|||
#if ENABLED(BLTOUCH)
|
||||
|
||||
void bltouch_command(int angle) {
|
||||
MOVE_SERVO(Z_ENDSTOP_SERVO_NR, angle); // Give the BL-Touch the command and wait
|
||||
MOVE_SERVO(Z_PROBE_SERVO_NR, angle); // Give the BL-Touch the command and wait
|
||||
safe_delay(BLTOUCH_DELAY);
|
||||
}
|
||||
|
||||
|
|
@ -2138,9 +2138,9 @@ static void clean_up_after_endstop_or_probe_move() {
|
|||
|
||||
dock_sled(!deploy);
|
||||
|
||||
#elif HAS_Z_SERVO_ENDSTOP && DISABLED(BLTOUCH)
|
||||
#elif HAS_Z_SERVO_PROBE && DISABLED(BLTOUCH)
|
||||
|
||||
MOVE_SERVO(Z_ENDSTOP_SERVO_NR, z_servo_angle[deploy ? 0 : 1]);
|
||||
MOVE_SERVO(Z_PROBE_SERVO_NR, z_servo_angle[deploy ? 0 : 1]);
|
||||
|
||||
#elif ENABLED(Z_PROBE_ALLEN_KEY)
|
||||
|
||||
|
|
@ -3683,7 +3683,7 @@ inline void gcode_G4() {
|
|||
SERIAL_ECHOLNPGM("FIX_MOUNTED_PROBE");
|
||||
#elif ENABLED(BLTOUCH)
|
||||
SERIAL_ECHOLNPGM("BLTOUCH");
|
||||
#elif HAS_Z_SERVO_ENDSTOP
|
||||
#elif HAS_Z_SERVO_PROBE
|
||||
SERIAL_ECHOLNPGM("SERVO PROBE");
|
||||
#elif ENABLED(Z_PROBE_SLED)
|
||||
SERIAL_ECHOLNPGM("Z_PROBE_SLED");
|
||||
|
|
@ -7174,14 +7174,14 @@ inline void gcode_M42() {
|
|||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM("SERVO not setup");
|
||||
|
||||
#elif !HAS_Z_SERVO_ENDSTOP
|
||||
#elif !HAS_Z_SERVO_PROBE
|
||||
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM("Z_ENDSTOP_SERVO_NR not setup");
|
||||
SERIAL_ERRORLNPGM("Z_PROBE_SERVO_NR not setup");
|
||||
|
||||
#else // HAS_Z_SERVO_ENDSTOP
|
||||
#else // HAS_Z_SERVO_PROBE
|
||||
|
||||
const uint8_t probe_index = parser.byteval('P', Z_ENDSTOP_SERVO_NR);
|
||||
const uint8_t probe_index = parser.byteval('P', Z_PROBE_SERVO_NR);
|
||||
|
||||
SERIAL_PROTOCOLLNPGM("Servo probe test");
|
||||
SERIAL_PROTOCOLLNPAIR(". using index: ", probe_index);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue