Add Planner::sync_from_steppers
Use to sync the planner after an interrupted move (when not overriding the logical position).
This commit is contained in:
@@ -1210,6 +1210,13 @@ void Planner::set_position_mm(ARG_X, ARG_Y, ARG_Z, const float &e) {
|
||||
LOOP_XYZE(i) previous_speed[i] = 0.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sync from the stepper positions. (e.g., after an interrupted move)
|
||||
*/
|
||||
void Planner::sync_from_steppers() {
|
||||
LOOP_XYZE(i) position[i] = stepper.position((AxisEnum)i);
|
||||
}
|
||||
|
||||
/**
|
||||
* Directly set the planner E position (hence the stepper E position).
|
||||
*/
|
||||
|
Reference in New Issue
Block a user