From 7382fc6316a61b2b713b33a69fbf4f0f2c17ff1d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 10 May 2019 11:56:11 +1000 Subject: [PATCH] HAL_ChibiOS: support DSM bind on IOMCU --- libraries/AP_HAL_ChibiOS/RCInput.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/RCInput.cpp b/libraries/AP_HAL_ChibiOS/RCInput.cpp index 79be9b47bf..9bb2b4586e 100644 --- a/libraries/AP_HAL_ChibiOS/RCInput.cpp +++ b/libraries/AP_HAL_ChibiOS/RCInput.cpp @@ -168,6 +168,14 @@ void RCInput::_timer_tick(void) */ bool RCInput::rc_bind(int dsmMode) { +#if HAL_WITH_IO_MCU + rcin_mutex.take(HAL_SEMAPHORE_BLOCK_FOREVER); + if (AP_BoardConfig::io_enabled()) { + iomcu.bind_dsm(dsmMode); + } + rcin_mutex.give(); +#endif + #if HAL_USE_ICU == TRUE // ask AP_RCProtocol to start a bind rcin_prot.start_bind();