add M190 power on, M191 power off

This commit is contained in:
Michael Moon 2010-10-10 12:28:40 +11:00
parent 9b894de669
commit 0d7020bf5b
1 changed files with 20 additions and 0 deletions

20
gcode.c
View File

@ -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: