Merge pull request #318 from EliteEng/dev

PWM Spindle Control and Invert Spindle & Coolant Pins
This commit is contained in:
Sonny Jeon
2014-01-02 16:56:02 -08:00
6 changed files with 198 additions and 48 deletions

View File

@ -238,8 +238,7 @@ uint8_t gc_execute_line(char *line)
case 'R': gc.arc_radius = to_millimeters(value); break;
case 'S':
if (value < 0) { FAIL(STATUS_INVALID_STATEMENT); } // Cannot be negative
// TBD: Spindle speed not supported due to PWM issues, but may come back once resolved.
// gc.spindle_speed = value;
gc.spindle_speed = value;
break;
case 'T':
if (value < 0) { FAIL(STATUS_INVALID_STATEMENT); } // Cannot be negative
@ -266,7 +265,7 @@ uint8_t gc_execute_line(char *line)
// ([M6]: Tool change should be executed here.)
// [M3,M4,M5]: Update spindle state
spindle_run(gc.spindle_direction);
spindle_run(gc.spindle_direction, gc.spindle_speed);
// [*M7,M8,M9]: Update coolant state
coolant_run(gc.coolant_mode);