HAL_ChibiOS: fixed reset for oneshot

after a BLHeli connection we need to go back to 1Hz on timer
This commit is contained in:
Andrew Tridgell 2018-04-01 07:55:01 +10:00
parent b0442d1c5c
commit 756c0d4b0b
1 changed files with 1 additions and 0 deletions

View File

@ -547,6 +547,7 @@ void RCOutput::set_group_mode(pwm_group &group)
case MODE_PWM_ONESHOT:
// for oneshot we force 1Hz output and then trigger on each loop
group.pwm_cfg.period = group.pwm_cfg.frequency;
group.rc_frequency = 1;
if (group.pwm_started) {
pwmChangePeriod(group.pwm_drv, group.pwm_cfg.period);
}