From 88ae9b9279fabafc839ef7ca8500de042750966d Mon Sep 17 00:00:00 2001 From: Henry Wurzburg Date: Mon, 23 Sep 2024 06:35:58 -0500 Subject: [PATCH] Tools:remove BATTERY_SUM from <1K builds --- libraries/AP_BattMonitor/AP_BattMonitor_config.h | 2 +- libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_config.h b/libraries/AP_BattMonitor/AP_BattMonitor_config.h index e15909c1435794..14a1fa7d281e12 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_config.h +++ b/libraries/AP_BattMonitor/AP_BattMonitor_config.h @@ -83,7 +83,7 @@ #endif #ifndef AP_BATTERY_SUM_ENABLED -#define AP_BATTERY_SUM_ENABLED AP_BATTERY_BACKEND_DEFAULT_ENABLED +#define AP_BATTERY_SUM_ENABLED AP_BATTERY_BACKEND_DEFAULT_ENABLED && (BOARD_FLASH_SIZE > 1024) #endif #ifndef AP_BATTERY_TORQEEDO_ENABLED diff --git a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc index 71dafdf4a2c7de..6ba53ec7a234d3 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc +++ b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc @@ -32,3 +32,5 @@ define HAL_CRSF_TELEM_TEXT_SELECTION_ENABLED OSD_ENABLED && OSD_PARAM_ENABLED && # disable SMBUS battery monitors to save flash undef AP_BATTERY_SMBUS_ENABLED define AP_BATTERY_SMBUS_ENABLED 0 +undef AP_BATTERY_SUM +define AP_BATTERY_SUM 0