diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 64d3d1f35..0b6fa211f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -184,6 +184,7 @@ * M405 - Turn on Filament Sensor extrusion control. Optional D to set delay in centimeters between sensor and extruder * M406 - Turn off Filament Sensor extrusion control * M407 - Display measured filament diameter + * M410 - Quickstop - Abort all the planned moves * M500 - Store parameters in EEPROM * M501 - Read parameters from EEPROM (if you need reset them after you changed them temporarily). * M502 - Revert to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. @@ -4376,6 +4377,14 @@ inline void gcode_M400() { st_synchronize(); } #endif // FILAMENT_SENSOR +/** + * M410: quickstop - Abort all planned moves + * + * This will stop the carriages mid-move, so most likely they + * will be out of sync with the stepper position after this. + */ +inline void gcode_M410() { quickStop(); } + /** * M500: Store settings in EEPROM */ @@ -5195,6 +5204,10 @@ void process_commands() { break; #endif // FILAMENT_SENSOR + case 410: // M410 quickstop - Abort all the planned moves. + gcode_M410(); + break; + case 500: // M500 Store settings in EEPROM gcode_M500(); break;