Use set_current_from_steppers in quickstop_stepper

This commit is contained in:
Scott Lahteine 2016-07-21 14:36:10 -07:00
parent 9f30cc84ce
commit cde068ea42

View File

@ -6076,18 +6076,9 @@ inline void gcode_M400() { stepper.synchronize(); }
void quickstop_stepper() { void quickstop_stepper() {
stepper.quick_stop(); stepper.quick_stop();
#if DISABLED(DELTA) && DISABLED(SCARA) #if DISABLED(SCARA)
stepper.synchronize(); stepper.synchronize();
#if ENABLED(AUTO_BED_LEVELING_FEATURE) set_current_from_steppers();
vector_3 pos = planner.adjusted_position(); // values directly from steppers...
current_position[X_AXIS] = pos.x;
current_position[Y_AXIS] = pos.y;
current_position[Z_AXIS] = pos.z;
#else
current_position[X_AXIS] = stepper.get_axis_position_mm(X_AXIS);
current_position[Y_AXIS] = stepper.get_axis_position_mm(Y_AXIS);
current_position[Z_AXIS] = stepper.get_axis_position_mm(Z_AXIS);
#endif
sync_plan_position(); // ...re-apply to planner position sync_plan_position(); // ...re-apply to planner position
#endif #endif
} }