Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented M112 #851

Merged
merged 3 commits into from
May 19, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,11 @@ void get_command()
}

}

//If command was e-stop process now
if(strcmp(cmdbuffer[bufindw], "M112") == 0)
kill();

bufindw = (bufindw + 1)%BUFSIZE;
buflen += 1;
}
Expand Down Expand Up @@ -1808,6 +1813,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;
Expand Down Expand Up @@ -3337,6 +3345,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();
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ M Codes
* M107 - Fan off
* M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
* Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
* M112 - Emergency stop
* M114 - Output current position to serial port
* M115 - Capabilities string
* M117 - display message
Expand Down