diff --git a/libraries/AP_HAL_ESP32/RCInput.cpp b/libraries/AP_HAL_ESP32/RCInput.cpp index 721e137bb0..2923872dbd 100644 --- a/libraries/AP_HAL_ESP32/RCInput.cpp +++ b/libraries/AP_HAL_ESP32/RCInput.cpp @@ -25,7 +25,7 @@ void RCInput::init() if (_init) { return; } -#ifndef HAL_BUILD_AP_PERIPH +#if AP_RCPROTOCOL_ENABLED AP::RC().init(); #endif