From de54bcbc212b1ef768ed873c3758c0a710e3874b Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 1 Jan 2023 13:36:26 +1100 Subject: [PATCH] AP_HAL_ChibiOS: define AP_INERTIALSENSOR_ENABLED in a new AP_InertialSensor_config.h --- .../hwdef/scripts/chibios_hwdef.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index 2d699de378..f99b4b4571 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -2968,6 +2968,12 @@ def add_apperiph_defaults(f): #ifndef RANGEFINDER_MAX_INSTANCES #define RANGEFINDER_MAX_INSTANCES 1 #endif + +// by default AP_Periphs don't use INS: +#ifndef AP_INERTIALSENSOR_ENABLED +#define AP_INERTIALSENSOR_ENABLED 0 +#endif + ''') def add_bootloader_defaults(f): @@ -2991,6 +2997,11 @@ def add_bootloader_defaults(f): #define HAL_GCS_ENABLED 0 #endif +// by default bootloaders don't use INS: +#ifndef AP_INERTIALSENSOR_ENABLED +#define AP_INERTIALSENSOR_ENABLED 0 +#endif + #define HAL_MAX_CAN_PROTOCOL_DRIVERS 0 ''') @@ -3010,6 +3021,11 @@ def add_iomcu_firmware_defaults(f): #ifndef HAL_GYROFFT_ENABLED #define HAL_GYROFFT_ENABLED 0 #endif + +// by default IOMCUs don't use INS: +#ifndef AP_INERTIALSENSOR_ENABLED +#define AP_INERTIALSENSOR_ENABLED 0 +#endif ''') def add_normal_firmware_defaults(f):