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

@ -57,10 +57,12 @@ uint8_t spindle_get_state();
#else
// Called by g-code parser when setting spindle state and requires a buffer sync.
void spindle_sync(uint8_t state);
#define spindle_sync(state, rpm) _spindle_sync(state)
void _spindle_sync(uint8_t state);
// Sets spindle running state with direction and enable.
void spindle_set_state(uint8_t state);
#define spindle_set_state(state, rpm) _spindle_set_state(state)
void _spindle_set_state(uint8_t state);
#endif