Fix: M112 calling kill from interrupt (#9923)

Fix #9906
This commit is contained in:
Scott Lahteine
2018-03-03 23:14:01 -06:00
committed by GitHub
parent c37b3f995a
commit 649f375494
5 changed files with 18 additions and 2 deletions

View File

@ -81,6 +81,8 @@
#if ENABLED(EMERGENCY_PARSER)
bool killed_by_M112; // = false
#include "../../module/stepper.h"
// Currently looking for: M108, M112, M410
@ -155,7 +157,7 @@
wait_for_user = wait_for_heatup = false;
break;
case state_M112:
kill(PSTR(MSG_KILLED));
killed_by_M112 = true;
break;
case state_M410:
quickstop_stepper();

View File

@ -94,6 +94,10 @@
extern ring_buffer_pos_t rx_max_enqueued;
#endif
#if ENABLED(EMERGENCY_PARSER)
extern bool killed_by_M112;
#endif
class MarlinSerial { //: public Stream
public: