Minor VARIABLE_SPINDLE feature toggle refactoring (#16)

* Modify code CSV format.

- Wrap value in quotes to avoid issue with embedded commas. This occurs
  in one of the alarm codes.

- Change header row format to allow same parsing code as data rows.

* VARIABLE_SPINDLE feature flag experiment.

- Use a macro for 'spindle_set_speed' and 'spindle_sync' to reduce the
  number of required VARIABLE_SPINDLE checks.
This commit is contained in:
Will Winder
2016-10-22 12:28:05 -07:00
committed by Sonny Jeon
parent 8b76a39d5d
commit 8e638f0054
4 changed files with 12 additions and 22 deletions

View File

@ -170,7 +170,7 @@ void spindle_stop()
#ifdef VARIABLE_SPINDLE
void spindle_set_state(uint8_t state, float rpm)
#else
void spindle_set_state(uint8_t state)
void _spindle_set_state(uint8_t state)
#endif
{
if (sys.abort) { return; } // Block during abort.
@ -219,10 +219,10 @@ void spindle_stop()
spindle_set_state(state,rpm);
}
#else
void spindle_sync(uint8_t state)
void _spindle_sync(uint8_t state)
{
if (sys.state == STATE_CHECK_MODE) { return; }
protocol_buffer_synchronize(); // Empty planner buffer to ensure spindle is set when programmed.
spindle_set_state(state);
_spindle_set_state(state);
}
#endif
#endif