Move M108, M112, M410 to cpp
This commit is contained in:
		| @@ -374,12 +374,6 @@ bool pin_is_protected(const int8_t pin) { | ||||
|   return false; | ||||
| } | ||||
|  | ||||
| #if DISABLED(EMERGENCY_PARSER) | ||||
|   #include "gcode/control/M108.h" | ||||
|   #include "gcode/control/M112.h" | ||||
|   #include "gcode/control/M410.h" | ||||
| #endif | ||||
|  | ||||
| #if HAS_TEMP_BED | ||||
|   #include "gcode/temperature/M190.h" | ||||
| #endif | ||||
|   | ||||
| @@ -20,11 +20,20 @@ | ||||
|  * | ||||
|  */ | ||||
| 
 | ||||
| #include "../../inc/MarlinConfig.h" | ||||
| 
 | ||||
| #if DISABLED(EMERGENCY_PARSER) | ||||
| 
 | ||||
| #include "../gcode.h" | ||||
| #include "../../Marlin.h" // for wait_for_heatup
 | ||||
| 
 | ||||
| /**
 | ||||
|  * M108: Stop the waiting for heaters in M109, M190, M303. Does not affect the target temperature. | ||||
|  */ | ||||
| void gcode_M108() { | ||||
| void GcodeSuite::M108() { | ||||
| 
 | ||||
|   wait_for_heatup = false; | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| #endif // !EMERGENCY_PARSER
 | ||||
| @@ -20,11 +20,20 @@ | ||||
|  * | ||||
|  */ | ||||
| 
 | ||||
| #include "../../inc/MarlinConfig.h" | ||||
| 
 | ||||
| #if DISABLED(EMERGENCY_PARSER) | ||||
| 
 | ||||
| #include "../gcode.h" | ||||
| #include "../../Marlin.h" // for kill
 | ||||
| 
 | ||||
| /**
 | ||||
|  * M112: Emergency Stop | ||||
|  */ | ||||
| void gcode_M112() { | ||||
| void GcodeSuite::M112() { | ||||
| 
 | ||||
|   kill(PSTR(MSG_KILLED)); | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| #endif // !EMERGENCY_PARSER
 | ||||
| @@ -20,14 +20,23 @@ | ||||
|  * | ||||
|  */ | ||||
| 
 | ||||
| #include "../../inc/MarlinConfig.h" | ||||
| 
 | ||||
| #if DISABLED(EMERGENCY_PARSER) | ||||
| 
 | ||||
| #include "../gcode.h" | ||||
| #include "../../Marlin.h" // for quickstop_stepper
 | ||||
| 
 | ||||
| /**
 | ||||
|  * 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. | ||||
|  */ | ||||
| void gcode_M410() { | ||||
| void GcodeSuite::M410() { | ||||
| 
 | ||||
|   quickstop_stepper(); | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| #endif // !EMERGENCY_PARSER
 | ||||
| @@ -124,10 +124,8 @@ extern void gcode_M83(); | ||||
| extern void gcode_M85(); | ||||
| extern void gcode_M92(); | ||||
| extern void gcode_M100(); | ||||
| extern void gcode_M108(); | ||||
| extern void gcode_M110(); | ||||
| extern void gcode_M111(); | ||||
| extern void gcode_M112(); | ||||
| extern void gcode_M113(); | ||||
| extern void gcode_M114(); | ||||
| extern void gcode_M115(); | ||||
| @@ -178,7 +176,6 @@ extern void gcode_M381(); | ||||
| extern void gcode_M400(); | ||||
| extern void gcode_M401(); | ||||
| extern void gcode_M402(); | ||||
| extern void gcode_M410(); | ||||
| extern void gcode_M428(); | ||||
| extern void gcode_M500(); | ||||
| extern void gcode_M501(); | ||||
| @@ -462,19 +459,9 @@ void GcodeSuite::process_next_command() { | ||||
|         break; | ||||
|  | ||||
|       #if DISABLED(EMERGENCY_PARSER) | ||||
|  | ||||
|         case 108: // M108: Cancel Waiting | ||||
|           gcode_M108(); | ||||
|           break; | ||||
|  | ||||
|         case 112: // M112: Emergency Stop | ||||
|           gcode_M112(); | ||||
|           break; | ||||
|  | ||||
|         case 410: // M410 quickstop - Abort all the planned moves. | ||||
|           gcode_M410(); | ||||
|           break; | ||||
|  | ||||
|         case 108: M108(); break;  // M108: Cancel Waiting | ||||
|         case 112: M112(); break;  // M112: Emergency Stop | ||||
|         case 410: M410(); break;  // M410: Quickstop - Abort all the planned moves. | ||||
|       #endif | ||||
|  | ||||
|       #if ENABLED(HOST_KEEPALIVE_FEATURE) | ||||
|   | ||||
| @@ -466,6 +466,8 @@ private: | ||||
|  | ||||
|   #if DISABLED(EMERGENCY_PARSER) | ||||
|     static void M108(); | ||||
|     static void M112(); | ||||
|     static void M410(); | ||||
|   #endif | ||||
|  | ||||
|   static void M109(); | ||||
| @@ -473,10 +475,6 @@ private: | ||||
|   static void M110(); | ||||
|   static void M111(); | ||||
|  | ||||
|   #if DISABLED(EMERGENCY_PARSER) | ||||
|     static void M112(); | ||||
|   #endif | ||||
|  | ||||
|   #if ENABLED(HOST_KEEPALIVE_FEATURE) | ||||
|     static void M113(); | ||||
|   #endif | ||||
| @@ -638,10 +636,6 @@ private: | ||||
|     static void M407(); | ||||
|   #endif | ||||
|  | ||||
|   #if DISABLED(EMERGENCY_PARSER) | ||||
|     static void M410(); | ||||
|   #endif | ||||
|  | ||||
|   #if HAS_LEVELING | ||||
|     static void M420(); | ||||
|     static void M421(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user