Allow M310 to bypass the Stopped state for recovery
Since M310 cannot change the heaters, allowing M310 S0 (and changing parameters) allows to recover a usb-controlled printer which has been locked-out due to bad model settings.
This commit is contained in:
parent
42125b4bb2
commit
5ab0dcb4c5
1 changed files with 6 additions and 1 deletions
|
@ -438,11 +438,16 @@ void get_command()
|
|||
if(strcmp_P(cmd_start, PSTR("M112")) == 0)
|
||||
kill(MSG_M112_KILL, 2);
|
||||
|
||||
// Bypass Stopped for some commands
|
||||
bool allow_when_stopped = false;
|
||||
if(strncmp_P(cmd_start, PSTR("M310"), 4) == 0)
|
||||
allow_when_stopped = true;
|
||||
|
||||
// Handle the USB timer
|
||||
if ((*cmd_start == 'G') && !IS_SD_PRINTING)
|
||||
usb_timer.start();
|
||||
|
||||
if (Stopped == true) {
|
||||
if (allow_when_stopped == false && Stopped == true) {
|
||||
// Stopped can be set either during error states (thermal error: cannot continue), or
|
||||
// when a printer-initiated action is processed. In such case the printer will send to
|
||||
// the host an action, but cannot know if the action has been processed while new
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue