AP_HAL_ChibiOS: correct #ifndef nesting in periph defaults

This commit is contained in:
Peter Barker 2022-03-12 17:57:48 +11:00 committed by Peter Barker
parent 7c99268541
commit e486671bb2
1 changed files with 10 additions and 1 deletions

View File

@ -2701,12 +2701,15 @@ def add_apperiph_defaults(f):
#ifndef HAL_SCHEDULER_ENABLED
#define HAL_SCHEDULER_ENABLED 0
#endif
#ifndef HAL_LOGGING_ENABLED
#define HAL_LOGGING_ENABLED 0
#endif
#ifndef HAL_GCS_ENABLED
#define HAL_GCS_ENABLED 0
#endif
// default to no protocols, AP_Periph enables with params
#define HAL_SERIAL1_PROTOCOL -1
#define HAL_SERIAL2_PROTOCOL -1
@ -2716,17 +2719,22 @@ def add_apperiph_defaults(f):
#ifndef HAL_LOGGING_MAVLINK_ENABLED
#define HAL_LOGGING_MAVLINK_ENABLED 0
#endif
#ifndef HAL_MISSION_ENABLED
#define HAL_MISSION_ENABLED 0
#endif
#ifndef HAL_RALLY_ENABLED
#define HAL_RALLY_ENABLED 0
#endif
#ifndef HAL_CAN_DEFAULT_NODE_ID
#define HAL_CAN_DEFAULT_NODE_ID 0
#endif
#define PERIPH_FW TRUE
#define HAL_BUILD_AP_PERIPH
#ifndef HAL_WATCHDOG_ENABLED_DEFAULT
#define HAL_WATCHDOG_ENABLED_DEFAULT true
#endif
@ -2734,14 +2742,15 @@ def add_apperiph_defaults(f):
#ifndef AP_FETTEC_ONEWIRE_ENABLED
#define AP_FETTEC_ONEWIRE_ENABLED 0
#endif
#ifndef HAL_BARO_WIND_COMP_ENABLED
#define HAL_BARO_WIND_COMP_ENABLED 0
#endif
#ifndef HAL_UART_STATS_ENABLED
#define HAL_UART_STATS_ENABLED (HAL_GCS_ENABLED || HAL_LOGGING_ENABLED)
#endif
#endif
''')