AP_ESC_Telem: neaten definition of HAL_WITH_ESC_TELEM

This commit is contained in:
Peter Barker 2023-01-25 10:11:36 +11:00 committed by Peter Barker
parent 0f326b338e
commit bd91294337
1 changed files with 2 additions and 4 deletions

View File

@ -3,10 +3,8 @@
#include <AP_HAL/AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include <SRV_Channel/SRV_Channel_config.h> #include <SRV_Channel/SRV_Channel_config.h>
#if defined(NUM_SERVO_CHANNELS) && NUM_SERVO_CHANNELS == 0 #ifndef HAL_WITH_ESC_TELEM
#define HAL_WITH_ESC_TELEM 0 #define HAL_WITH_ESC_TELEM ((NUM_SERVO_CHANNELS > 0) && ((HAL_SUPPORT_RCOUT_SERIAL || HAL_MAX_CAN_PROTOCOL_DRIVERS) && !defined(HAL_BUILD_AP_PERIPH)))
#elif !defined(HAL_WITH_ESC_TELEM)
#define HAL_WITH_ESC_TELEM (HAL_SUPPORT_RCOUT_SERIAL || HAL_MAX_CAN_PROTOCOL_DRIVERS) && !defined(HAL_BUILD_AP_PERIPH)
#endif #endif
#if HAL_WITH_ESC_TELEM #if HAL_WITH_ESC_TELEM