From acd1f48ed366e3eea4c22e7cbd16a5e487f593b4 Mon Sep 17 00:00:00 2001 From: David Buzz Date: Tue, 2 May 2023 09:29:44 +1000 Subject: [PATCH] AP_HAL: doesn't need these subsystems ESP32: disabled can on esp32 for now ESP32: disable airspeed sensors on esp32buzz ESP32: disable a bunch of compasss types and subsystems so it doesn't try to probe for all of the compases on boot, as its super slow. turned off a bunch of Plane stuff that an esp32 user isn't likely to need compass scr comp a c --- libraries/AP_HAL/board/esp32.h | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/libraries/AP_HAL/board/esp32.h b/libraries/AP_HAL/board/esp32.h index 960a4d12a7..ee73fca795 100644 --- a/libraries/AP_HAL/board/esp32.h +++ b/libraries/AP_HAL/board/esp32.h @@ -16,6 +16,8 @@ #define HAL_BOARD_NAME "ESP32" #define HAL_CPU_CLASS HAL_CPU_CLASS_150 #define HAL_WITH_DRONECAN 0 +#define HAL_WITH_UAVCAN 0 +#define HAL_MAX_CAN_PROTOCOL_DRIVERS 0 #define HAL_HAVE_SAFETY_SWITCH 0 #define HAL_HAVE_BOARD_VOLTAGE 0 #define HAL_HAVE_SERVO_VOLTAGE 0 @@ -34,6 +36,9 @@ #define HAL_NUM_CAN_IFACES 0 #define HAL_MEM_CLASS HAL_MEM_CLASS_192 +// disable uncommon stuff that we'd otherwise get +#define HAL_EXTERNAL_AHRS_ENABLED 0 +#define HAL_GENERATOR_ENABLED 0 #define __LITTLE_ENDIAN 1234 #define __BYTE_ORDER __LITTLE_ENDIAN @@ -65,3 +70,37 @@ #define CONFIG_ESP32_WIFI_TX_BA_WIN 0 #define CONFIG_ESP32_WIFI_RX_BA_WIN 0 + +// turn off all the compasses by default.. +#ifndef AP_COMPASS_BACKEND_DEFAULT_ENABLED +#define AP_COMPASS_BACKEND_DEFAULT_ENABLED 0 +#endif + +// disble temp cal of gyros by default +#define HAL_INS_TEMPERATURE_CAL_ENABLE 0 + +//turn off a bunch of advanced plane scheduler table things. see ArduPlane.cpp +#define AP_ADVANCEDFAILSAFE_ENABLED 0 +#define AP_ICENGINE_ENABLED 0 +#define AP_OPTICALFLOW_ENABLED 0 +#define AP_RPM_ENABLED 0 +#define AP_AIRSPEED_AUTOCAL_ENABLE 0 +#define HAL_MOUNT_ENABLED 0 +#define AP_CAMERA_ENABLED 0 +#define HAL_SOARING_ENABLED 0 +#define AP_TERRAIN_AVAILABLE 0 +#define HAL_ADSB_ENABLED 0 +#define HAL_BUTTON_ENABLED 0 +#define AP_GRIPPER_ENABLED 0 +#define AP_LANDINGGEAR_ENABLED 0 + +// disable avoid-fence-follow in copter, these all kinda need each other, so its all or none. +#define AC_AVOID_ENABLED 0 +#define AP_FENCE_ENABLED 0 +#define MODE_FOLLOW_ENABLED 0 +#define AC_OAPATHPLANNER_ENABLED 0 + + +// other big things.. +#define HAL_QUADPLANE_ENABLED 0 +#define HAL_GYROFFT_ENABLED 0 \ No newline at end of file