|
@ -286,7 +286,7 @@ bool target_direction; |
|
|
|
|
|
|
|
|
#ifdef ENABLE_AUTO_BED_LEVELING |
|
|
#ifdef ENABLE_AUTO_BED_LEVELING |
|
|
int xy_travel_speed = XY_TRAVEL_SPEED; |
|
|
int xy_travel_speed = XY_TRAVEL_SPEED; |
|
|
float zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER; |
|
|
float zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if defined(Z_DUAL_ENDSTOPS) && !defined(DELTA) |
|
|
#if defined(Z_DUAL_ENDSTOPS) && !defined(DELTA) |
|
@ -1060,7 +1060,7 @@ static void axis_is_at_home(AxisEnum axis) { |
|
|
max_pos[axis] = base_max_pos(axis) + home_offset[axis]; |
|
|
max_pos[axis] = base_max_pos(axis) + home_offset[axis]; |
|
|
|
|
|
|
|
|
#if defined(ENABLE_AUTO_BED_LEVELING) && Z_HOME_DIR < 0 |
|
|
#if defined(ENABLE_AUTO_BED_LEVELING) && Z_HOME_DIR < 0 |
|
|
if (axis == Z_AXIS) current_position[Z_AXIS] += zprobe_zoffset; |
|
|
if (axis == Z_AXIS) current_position[Z_AXIS] -= zprobe_zoffset; |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -4648,7 +4648,7 @@ inline void gcode_M400() { st_synchronize(); } |
|
|
#ifdef SERVO_ENDSTOPS |
|
|
#ifdef SERVO_ENDSTOPS |
|
|
void raise_z_for_servo() { |
|
|
void raise_z_for_servo() { |
|
|
float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_HOMING; |
|
|
float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_HOMING; |
|
|
z_dest += axis_known_position[Z_AXIS] ? -zprobe_zoffset : zpos; |
|
|
z_dest += axis_known_position[Z_AXIS] ? zprobe_zoffset : zpos; |
|
|
if (zpos < z_dest) |
|
|
if (zpos < z_dest) |
|
|
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_dest); // also updates current_position
|
|
|
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_dest); // also updates current_position
|
|
|
} |
|
|
} |
|
@ -4869,7 +4869,7 @@ inline void gcode_M503() { |
|
|
if (code_seen('Z')) { |
|
|
if (code_seen('Z')) { |
|
|
value = code_value(); |
|
|
value = code_value(); |
|
|
if (Z_PROBE_OFFSET_RANGE_MIN <= value && value <= Z_PROBE_OFFSET_RANGE_MAX) { |
|
|
if (Z_PROBE_OFFSET_RANGE_MIN <= value && value <= Z_PROBE_OFFSET_RANGE_MAX) { |
|
|
zprobe_zoffset = -value; |
|
|
zprobe_zoffset = value; |
|
|
SERIAL_ECHO_START; |
|
|
SERIAL_ECHO_START; |
|
|
SERIAL_ECHOLNPGM(MSG_ZPROBE_ZOFFSET " " MSG_OK); |
|
|
SERIAL_ECHOLNPGM(MSG_ZPROBE_ZOFFSET " " MSG_OK); |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
@ -4886,8 +4886,8 @@ inline void gcode_M503() { |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
SERIAL_ECHO_START; |
|
|
SERIAL_ECHO_START; |
|
|
SERIAL_ECHOLNPGM(MSG_ZPROBE_ZOFFSET " : "); |
|
|
SERIAL_ECHOPGM(MSG_ZPROBE_ZOFFSET " : "); |
|
|
SERIAL_ECHO(-zprobe_zoffset); |
|
|
SERIAL_ECHO(zprobe_zoffset); |
|
|
SERIAL_EOL; |
|
|
SERIAL_EOL; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|