Fixed spindle/coolant/dwell state check.

This commit is contained in:
Sonny Jeon 2014-05-29 15:41:53 -06:00
parent 532c359a11
commit 9439e43975
4 changed files with 4 additions and 4 deletions

View File

@ -45,7 +45,7 @@ void coolant_stop()
void coolant_run(uint8_t mode)
{
if (sys.state != STATE_CHECK_MODE) { return; }
if (sys.state == STATE_CHECK_MODE) { return; }
protocol_buffer_synchronize(); // Ensure coolant turns on when specified in program.
if (mode == COOLANT_FLOOD_ENABLE) {

View File

@ -214,7 +214,7 @@ void mc_arc(float *position, float *target, float *offset, float radius, float f
// Execute dwell in seconds.
void mc_dwell(float seconds)
{
if (sys.state != STATE_CHECK_MODE) { return; }
if (sys.state == STATE_CHECK_MODE) { return; }
uint16_t i = floor(1000/DWELL_TIME_STEP*seconds);
protocol_buffer_synchronize();

View File

@ -26,7 +26,7 @@
#define GRBL_VERSION "0.9e"
#define GRBL_VERSION_BUILD "20140525"
#define GRBL_VERSION_BUILD "20140529"
// Version of the EEPROM data. Will be used to migrate existing data from older versions of Grbl
// when firmware is upgraded. Always stored in byte 0 of eeprom

View File

@ -57,7 +57,7 @@ void spindle_stop()
void spindle_run(uint8_t direction, float rpm)
{
if (sys.state != STATE_CHECK_MODE) { return; }
if (sys.state == STATE_CHECK_MODE) { return; }
// Empty planner buffer to ensure spindle is set when programmed.
protocol_buffer_synchronize();