Browse Source

Fixes #6828: M428 bug

pull/1/head
Scott Lahteine 7 years ago
parent
commit
ceb62fc7e1
  1. 6
      Marlin/Marlin_main.cpp

6
Marlin/Marlin_main.cpp

@ -8740,10 +8740,10 @@ void quickstop_stepper() {
bool err = false;
LOOP_XYZ(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,
diff = current_position[i] - LOGICAL_POSITION(base, i);
const float base = (current_position[i] > (soft_endstop_min[i] + soft_endstop_max[i]) * 0.5) ? base_home_pos((AxisEnum)i) : 0,
diff = base - RAW_POSITION(current_position[i], i);
if (WITHIN(diff, -20, 20)) {
set_home_offset((AxisEnum)i, home_offset[i] - diff);
set_home_offset((AxisEnum)i, diff);
}
else {
SERIAL_ERROR_START;

Loading…
Cancel
Save