From 529a3a9122b8f2f2b8a194e1db27bc31f616a9a2 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Mon, 6 Sep 2021 18:14:48 +0100 Subject: [PATCH] AP_HAL_ChibiOS: convert back to full range on IOMCU ONESHOT125 read --- libraries/AP_HAL_ChibiOS/RCOutput.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/RCOutput.cpp b/libraries/AP_HAL_ChibiOS/RCOutput.cpp index 3f7300b33c..c0ffa23c94 100644 --- a/libraries/AP_HAL_ChibiOS/RCOutput.cpp +++ b/libraries/AP_HAL_ChibiOS/RCOutput.cpp @@ -620,7 +620,12 @@ uint16_t RCOutput::read(uint8_t chan) } #if HAL_WITH_IO_MCU if (chan < chan_offset) { - return iomcu.read_channel(chan); + uint16_t period_us = iomcu.read_channel(chan); + if ((iomcu_mode == MODE_PWM_ONESHOT125) && ((1U<