From 756c0d4b0b6cf57f32255193d90125b9988b72e1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 1 Apr 2018 07:55:01 +1000 Subject: [PATCH] HAL_ChibiOS: fixed reset for oneshot after a BLHeli connection we need to go back to 1Hz on timer --- libraries/AP_HAL_ChibiOS/RCOutput.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_HAL_ChibiOS/RCOutput.cpp b/libraries/AP_HAL_ChibiOS/RCOutput.cpp index b471af118f..587ff1e29a 100644 --- a/libraries/AP_HAL_ChibiOS/RCOutput.cpp +++ b/libraries/AP_HAL_ChibiOS/RCOutput.cpp @@ -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); }