From a38c90ee84a1045320759708742942e10f873f64 Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Sat, 15 Mar 2014 15:56:15 +0000 Subject: [PATCH] Added estop handling --- Marlin/Marlin_main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index f9bb1c6e15..f27add1576 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -658,6 +658,12 @@ void get_command() } } + + if(strcmp(cmdbuffer[bufindw], "M112") == 0) + { + kill(); + } + bufindw = (bufindw + 1)%BUFSIZE; buflen += 1; } @@ -3340,6 +3346,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();