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:
@ -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
|
||||
|
Reference in New Issue
Block a user