Fixes #6828: M428 bug
This commit is contained in:
parent
48f7652143
commit
ceb62fc7e1
@ -8740,10 +8740,10 @@ void quickstop_stepper() {
|
|||||||
bool err = false;
|
bool err = false;
|
||||||
LOOP_XYZ(i) {
|
LOOP_XYZ(i) {
|
||||||
if (axis_homed[i]) {
|
if (axis_homed[i]) {
|
||||||
float base = (current_position[i] > (soft_endstop_min[i] + soft_endstop_max[i]) * 0.5) ? base_home_pos((AxisEnum)i) : 0,
|
const float base = (current_position[i] > (soft_endstop_min[i] + soft_endstop_max[i]) * 0.5) ? base_home_pos((AxisEnum)i) : 0,
|
||||||
diff = current_position[i] - LOGICAL_POSITION(base, i);
|
diff = base - RAW_POSITION(current_position[i], i);
|
||||||
if (WITHIN(diff, -20, 20)) {
|
if (WITHIN(diff, -20, 20)) {
|
||||||
set_home_offset((AxisEnum)i, home_offset[i] - diff);
|
set_home_offset((AxisEnum)i, diff);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SERIAL_ERROR_START;
|
SERIAL_ERROR_START;
|
||||||
|
Loading…
Reference in New Issue
Block a user