1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-22 22:25:16 +02:00

Fixed spindle_get_state()

It was not returning a value
This commit is contained in:
bdring
2018-08-18 19:22:32 -05:00
parent 11364110dd
commit 315dc7a7a7

View File

@@ -38,8 +38,11 @@ void spindle_stop()
uint8_t spindle_get_state()
{
// TODO Update this when direction and enable pin are added
if (ledcRead(SPINDLE_PWM_CHANNEL) == 0) // Check the PWM value
return(SPINDLE_STATE_DISABLE);
else
return(SPINDLE_STATE_CW); // only CW is supported right now.
}
void spindle_set_speed(uint8_t pwm_value)