bugfix: correct pwm duty cycle

This commit is contained in:
TallTechDude
2022-02-03 01:03:27 +00:00
parent 14623a3d0c
commit 67d6950bff

View File

@@ -291,7 +291,9 @@ void Channel_OnChanged(int ch) {
#else
// they are using 1kHz PWM
// See: https://www.elektroda.pl/rtvforum/topic3798114.html
bk_pwm_update_param(pwmIndex, 1000, g_channelValues[ch]);
float f;
f = g_channelValues[ch] * 0.01f;
bk_pwm_update_param(pwmIndex, 1000, f * 1000.0f);
#endif
}