AP_ESC_Telem: Add ifndef before defining ESC_TELEM_MAX_ESCS

This commit is contained in:
rishabsingh3003 2024-07-23 10:24:26 -04:00 committed by Peter Barker
parent 3e8b5ccee4
commit 3ab3388752
1 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,9 @@
#if HAL_WITH_ESC_TELEM #if HAL_WITH_ESC_TELEM
#define ESC_TELEM_MAX_ESCS NUM_SERVO_CHANNELS #ifndef ESC_TELEM_MAX_ESCS
#define ESC_TELEM_MAX_ESCS NUM_SERVO_CHANNELS
#endif
static_assert(ESC_TELEM_MAX_ESCS > 0, "Cannot have 0 ESC telemetry instances"); static_assert(ESC_TELEM_MAX_ESCS > 0, "Cannot have 0 ESC telemetry instances");
#define ESC_TELEM_DATA_TIMEOUT_MS 5000UL #define ESC_TELEM_DATA_TIMEOUT_MS 5000UL