1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-30 09:39:49 +02:00

fixed M4 mode.

M4 is now Supported if SPINDLE_DIR_PIN is defined or laser mode is on.
This commit is contained in:
bdring
2018-12-08 14:08:37 -06:00
parent c98c9a5d72
commit eaad780820

View File

@@ -265,14 +265,18 @@ uint8_t gc_execute_line(char *line, uint8_t client)
case 3:
gc_block.modal.spindle = SPINDLE_ENABLE_CW;
break;
case 4:
#ifdef SPINDLE_DIR_PIN
gc_block.modal.spindle = SPINDLE_ENABLE_CCW;
#else
case 4: // Supported if SPINDLE_DIR_PIN is defined or laser mode is on.
#ifndef SPINDLE_DIR_PIN
// if laser mode is not on then this is an unsupported command
if bit_isfalse(settings.flags,BITFLAG_LASER_MODE) {
FAIL(STATUS_GCODE_UNSUPPORTED_COMMAND);
#endif
break;
case 5: gc_block.modal.spindle = SPINDLE_DISABLE; break;
}
#endif
gc_block.modal.spindle = SPINDLE_ENABLE_CCW;
break;
case 5:
gc_block.modal.spindle = SPINDLE_DISABLE; break;
}
break;
case 7: case 8: case 9: