|
@@ -1109,7 +1109,7 @@ inline void get_serial_commands() {
|
1109
|
1109
|
// If command was e-stop process now
|
1110
|
1110
|
if (strcmp(command, "M108") == 0) wait_for_heatup = false;
|
1111
|
1111
|
if (strcmp(command, "M112") == 0) kill(PSTR(MSG_KILLED));
|
1112
|
|
- if (strcmp(command, "M410") == 0) stepper.quick_stop();
|
|
1112
|
+ if (strcmp(command, "M410") == 0) { quickstop_stepper(); }
|
1113
|
1113
|
#endif
|
1114
|
1114
|
|
1115
|
1115
|
#if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0
|
|
@@ -4556,12 +4556,7 @@ inline void gcode_M105() {
|
4556
|
4556
|
* This will stop the carriages mid-move, so most likely they
|
4557
|
4557
|
* will be out of sync with the stepper position after this.
|
4558
|
4558
|
*/
|
4559
|
|
- inline void gcode_M410() {
|
4560
|
|
- stepper.quick_stop();
|
4561
|
|
- #if DISABLED(DELTA) && DISABLED(SCARA)
|
4562
|
|
- set_current_position_from_planner();
|
4563
|
|
- #endif
|
4564
|
|
- }
|
|
4559
|
+ inline void gcode_M410() { quickstop_stepper(); }
|
4565
|
4560
|
|
4566
|
4561
|
#endif
|
4567
|
4562
|
|
|
@@ -5990,8 +5985,9 @@ inline void gcode_M400() { stepper.synchronize(); }
|
5990
|
5985
|
|
5991
|
5986
|
#endif // FILAMENT_WIDTH_SENSOR
|
5992
|
5987
|
|
5993
|
|
-#if DISABLED(DELTA) && DISABLED(SCARA)
|
5994
|
|
- void set_current_position_from_planner() {
|
|
5988
|
+void quickstop_stepper() {
|
|
5989
|
+ stepper.quick_stop();
|
|
5990
|
+ #if DISABLED(DELTA) && DISABLED(SCARA)
|
5995
|
5991
|
stepper.synchronize();
|
5996
|
5992
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
5997
|
5993
|
vector_3 pos = planner.adjusted_position(); // values directly from steppers...
|
|
@@ -6004,8 +6000,8 @@ inline void gcode_M400() { stepper.synchronize(); }
|
6004
|
6000
|
current_position[Z_AXIS] = stepper.get_axis_position_mm(Z_AXIS);
|
6005
|
6001
|
#endif
|
6006
|
6002
|
sync_plan_position(); // ...re-apply to planner position
|
6007
|
|
- }
|
6008
|
|
-#endif
|
|
6003
|
+ #endif
|
|
6004
|
+}
|
6009
|
6005
|
|
6010
|
6006
|
#if ENABLED(MESH_BED_LEVELING)
|
6011
|
6007
|
|