From e486671bb20ff7d0641ecbe4abb30a1005881966 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 12 Mar 2022 17:57:48 +1100 Subject: [PATCH] AP_HAL_ChibiOS: correct #ifndef nesting in periph defaults --- .../AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index 226e874f1d..16441d28f9 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -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 ''')