From a6c22eed09941c8d78d8b5f6c35dbbb73b275802 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Thu, 1 Sep 2011 02:04:57 +0200 Subject: [PATCH] gcode_process.c: turn heaters off for M0/M2 This ensures heaters don't spring back to life in case power is turned back on for something else. --- gcode_process.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcode_process.c b/gcode_process.c index 76a4df5..e0d17c0 100644 --- a/gcode_process.c +++ b/gcode_process.c @@ -341,6 +341,8 @@ void process_gcode_command() { #endif } else if (next_target.seen_M) { + uint8_t i; + switch (next_target.M) { case 0: //? --- M0: machine stop --- @@ -359,6 +361,8 @@ void process_gcode_command() { //? http://linuxcnc.org/handbook/RS274NGC_3/RS274NGC_33a.html#1002379 //? queue_wait(); + for (i = 0; i < NUM_HEATERS; i++) + temp_set(i, 0); power_off(); break;