|
@@ -5894,20 +5894,22 @@ inline void gcode_M400() { stepper.synchronize(); }
|
5894
|
5894
|
|
5895
|
5895
|
#endif // FILAMENT_WIDTH_SENSOR
|
5896
|
5896
|
|
5897
|
|
-void set_current_position_from_planner() {
|
5898
|
|
- stepper.synchronize();
|
5899
|
|
- #if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
5900
|
|
- vector_3 pos = planner.adjusted_position(); // values directly from steppers...
|
5901
|
|
- current_position[X_AXIS] = pos.x;
|
5902
|
|
- current_position[Y_AXIS] = pos.y;
|
5903
|
|
- current_position[Z_AXIS] = pos.z;
|
5904
|
|
- #else
|
5905
|
|
- current_position[X_AXIS] = stepper.get_axis_position_mm(X_AXIS);
|
5906
|
|
- current_position[Y_AXIS] = stepper.get_axis_position_mm(Y_AXIS);
|
5907
|
|
- current_position[Z_AXIS] = stepper.get_axis_position_mm(Z_AXIS);
|
5908
|
|
- #endif
|
5909
|
|
- sync_plan_position(); // ...re-apply to planner position
|
5910
|
|
-}
|
|
5897
|
+#if DISABLED(DELTA) && DISABLED(SCARA)
|
|
5898
|
+ void set_current_position_from_planner() {
|
|
5899
|
+ stepper.synchronize();
|
|
5900
|
+ #if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
|
5901
|
+ vector_3 pos = planner.adjusted_position(); // values directly from steppers...
|
|
5902
|
+ current_position[X_AXIS] = pos.x;
|
|
5903
|
+ current_position[Y_AXIS] = pos.y;
|
|
5904
|
+ current_position[Z_AXIS] = pos.z;
|
|
5905
|
+ #else
|
|
5906
|
+ current_position[X_AXIS] = stepper.get_axis_position_mm(X_AXIS);
|
|
5907
|
+ current_position[Y_AXIS] = stepper.get_axis_position_mm(Y_AXIS);
|
|
5908
|
+ current_position[Z_AXIS] = stepper.get_axis_position_mm(Z_AXIS);
|
|
5909
|
+ #endif
|
|
5910
|
+ sync_plan_position(); // ...re-apply to planner position
|
|
5911
|
+ }
|
|
5912
|
+#endif
|
5911
|
5913
|
|
5912
|
5914
|
/**
|
5913
|
5915
|
* M410: Quickstop - Abort all planned moves
|
|
@@ -5917,7 +5919,9 @@ void set_current_position_from_planner() {
|
5917
|
5919
|
*/
|
5918
|
5920
|
inline void gcode_M410() {
|
5919
|
5921
|
stepper.quick_stop();
|
5920
|
|
- set_current_position_from_planner();
|
|
5922
|
+ #if DISABLED(DELTA) && DISABLED(SCARA)
|
|
5923
|
+ set_current_position_from_planner();
|
|
5924
|
+ #endif
|
5921
|
5925
|
}
|
5922
|
5926
|
|
5923
|
5927
|
|