diff --git a/libraries/AP_HAL_ChibiOS/RCInput.cpp b/libraries/AP_HAL_ChibiOS/RCInput.cpp index 6ea3436d9c..8eebf702ed 100644 --- a/libraries/AP_HAL_ChibiOS/RCInput.cpp +++ b/libraries/AP_HAL_ChibiOS/RCInput.cpp @@ -176,11 +176,15 @@ void RCInput::_timer_tick(void) } #endif +#if HAL_WITH_IO_MCU uint32_t now = AP_HAL::millis(); const bool have_iocmu_rc = (_rcin_last_iomcu_ms != 0 && now - _rcin_last_iomcu_ms < 400); if (!have_iocmu_rc) { _rcin_last_iomcu_ms = 0; } +#else + const bool have_iocmu_rc = false; +#endif if (rcprot.new_input() && !have_iocmu_rc) { WITH_SEMAPHORE(rcin_mutex); diff --git a/libraries/AP_HAL_ChibiOS/RCInput.h b/libraries/AP_HAL_ChibiOS/RCInput.h index 08ba46d58c..0b3ec8ea5a 100644 --- a/libraries/AP_HAL_ChibiOS/RCInput.h +++ b/libraries/AP_HAL_ChibiOS/RCInput.h @@ -69,7 +69,9 @@ private: int16_t _rssi = -1; int16_t _rx_link_quality = -1; uint32_t _rcin_timestamp_last_signal; +#if HAL_WITH_IO_MCU uint32_t _rcin_last_iomcu_ms; +#endif bool _init; const char *last_protocol;