mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-29 09:10:03 +02:00
@@ -106,16 +106,10 @@ void spindle_set_speed(uint32_t pwm_value)
|
||||
#ifndef INVERT_SPINDLE_PWM
|
||||
grbl_analogWrite(SPINDLE_PWM_CHANNEL, pwm_value);
|
||||
#else
|
||||
if (pwm_value == 0) {
|
||||
grbl_analogWrite(SPINDLE_PWM_CHANNEL, (1<<SPINDLE_PWM_BIT_PRECISION));
|
||||
}
|
||||
else {
|
||||
grbl_analogWrite(SPINDLE_PWM_CHANNEL, (1<<SPINDLE_PWM_BIT_PRECISION) - pwm_value - 1);
|
||||
}
|
||||
grbl_analogWrite(SPINDLE_PWM_CHANNEL, (1<<SPINDLE_PWM_BIT_PRECISION) - pwm_value);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user