From 0d7020bf5bb0e69b742a972ec3fe24f1530d8380 Mon Sep 17 00:00:00 2001 From: Michael Moon Date: Sun, 10 Oct 2010 12:28:40 +1100 Subject: [PATCH] add M190 power on, M191 power off --- gcode.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gcode.c b/gcode.c index 40f257c..9b47164 100644 --- a/gcode.c +++ b/gcode.c @@ -646,6 +646,26 @@ void process_gcode_command(GCODE_COMMAND *gcmd) { break; #endif /* HEATER_PIN */ + // M190- power on + case 190: + power_on(); + #ifdef GEN3 + WRITE(X_ENABLE_PIN, 0); + WRITE(Y_ENABLE_PIN, 0); + WRITE(Z_ENABLE_PIN, 0); + steptimeout = 0; + #endif + break; + // M191- power off + case 191: + #ifdef GEN3 + WRITE(X_ENABLE_PIN, 1); + WRITE(Y_ENABLE_PIN, 1); + WRITE(Z_ENABLE_PIN, 1); + #endif + power_off(); + break; + #ifdef DEBUG // M140- echo off case 140: