diff --git a/libraries/AP_HAL_ChibiOS/RCInput.cpp b/libraries/AP_HAL_ChibiOS/RCInput.cpp index 2c7bbdfc525..6d60cf33909 100644 --- a/libraries/AP_HAL_ChibiOS/RCInput.cpp +++ b/libraries/AP_HAL_ChibiOS/RCInput.cpp @@ -116,6 +116,14 @@ uint8_t RCInput::read(uint16_t* periods, uint8_t len) return len; } +// there is no point enabling the thread if you're not using the +// RCProtocol library - this catches regressions in our hwdefs. It +// can be removed in the future when the chance of there being +// outstanding work with regressions in is negigible +#if HAL_RCIN_THREAD_ENABLED && !AP_RCPROTOCOL_ENABLED +#error Do not enable the RCIN thread when not doing AP_RCPROTOCOL_ENABLED +#endif + void RCInput::_timer_tick(void) { if (!_init) { diff --git a/libraries/AP_HAL_ChibiOS/Scheduler.cpp b/libraries/AP_HAL_ChibiOS/Scheduler.cpp index 85dbd07db9a..29b27179b9c 100644 --- a/libraries/AP_HAL_ChibiOS/Scheduler.cpp +++ b/libraries/AP_HAL_ChibiOS/Scheduler.cpp @@ -60,10 +60,6 @@ extern AP_IOMCU iomcu; using namespace ChibiOS; -#ifndef HAL_RCIN_THREAD_ENABLED -#define HAL_RCIN_THREAD_ENABLED 1 -#endif - #ifndef HAL_MONITOR_THREAD_ENABLED #define HAL_MONITOR_THREAD_ENABLED 1 #endif