1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-30 17:49:56 +02:00

Added spindle speed override to PWM calculationh

- It was not being applied the pwm calculation
- Note "ENABLE_PIECEWISE_LINEAR_SPINDLE"  has not been implemented yet.
This commit is contained in:
bdring
2018-09-11 15:53:53 -05:00
parent 77542d5313
commit 5bfeae4724

View File

@@ -78,6 +78,9 @@ void spindle_set_speed(uint8_t pwm_value)
uint8_t spindle_compute_pwm_value(float rpm)
{
uint8_t pwm_value;
rpm *= (0.010*sys.spindle_speed_ovr);
pwm_value = map(rpm, settings.rpm_min, settings.rpm_max, SPINDLE_PWM_OFF_VALUE, SPINDLE_PWM_MAX_VALUE);
// TODO_ESP32 .. make it 16 bit