Merge pull request #851 from DanNixon/estop

Implemented M112
This commit is contained in:
nothinman
2014-05-19 17:55:34 +01:00
2 changed files with 12 additions and 0 deletions

View File

@ -673,6 +673,11 @@ void get_command()
}
}
//If command was e-stop process now
if(strcmp(cmdbuffer[bufindw], "M112") == 0)
kill();
bufindw = (bufindw + 1)%BUFSIZE;
buflen += 1;
}
@ -1830,6 +1835,9 @@ void process_commands()
#endif
setWatch();
break;
case 112: // M112 -Emergency Stop
kill();
break;
case 140: // M140 set bed temp
if (code_seen('S')) setTargetBed(code_value());
break;
@ -3426,6 +3434,9 @@ void handle_status_leds(void) {
void manage_inactivity()
{
if(buflen < (BUFSIZE-1))
get_command();
if( (millis() - previous_millis_cmd) > max_inactive_time )
if(max_inactive_time)
kill();