From 0ae1ac182a30d26502ef83805717cd697148dd7d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 27 Mar 2022 17:30:19 +1100 Subject: [PATCH] HAL_ChibiOS: switch between IOMCU and RCProt rapidly keep the RCProtocol decoder going when IOMCU being used, allowing for fast failover between IOMCU RC input and uart RC input --- libraries/AP_HAL_ChibiOS/RCInput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/RCInput.cpp b/libraries/AP_HAL_ChibiOS/RCInput.cpp index a82b3fdb1b..9e6cfeb813 100644 --- a/libraries/AP_HAL_ChibiOS/RCInput.cpp +++ b/libraries/AP_HAL_ChibiOS/RCInput.cpp @@ -181,7 +181,7 @@ void RCInput::_timer_tick(void) _rcin_last_iomcu_ms = 0; } - if (!have_iocmu_rc && rcprot.new_input()) { + if (rcprot.new_input() && !have_iocmu_rc) { WITH_SEMAPHORE(rcin_mutex); _rcin_timestamp_last_signal = AP_HAL::micros(); _num_channels = rcprot.num_channels();