From 8278d5ad76fb5c96556827c2c547d5cb415de526 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 19 Mar 2023 10:03:12 +1100 Subject: [PATCH] AP_HAL_ChibiOS: move OSD minimizement to minimize_features.inc --- libraries/AP_HAL_ChibiOS/hwdef/KakuteF7/hwdef.dat | 11 ++++++----- libraries/AP_HAL_ChibiOS/hwdef/KakuteH7/hwdef.dat | 1 + libraries/AP_HAL_ChibiOS/hwdef/OMNIBUSF7V2/hwdef.dat | 1 + .../hwdef/include/minimize_features.inc | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7/hwdef.dat index b3a4f7bdbd..6223a0b0b1 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7/hwdef.dat @@ -142,11 +142,6 @@ define HAL_OS_FATFS_IO 1 define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN" -# setup for OSD -define OSD_ENABLED 1 -define HAL_OSD_TYPE_DEFAULT 1 -ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin - define STM32_PWM_USE_ADVANCED TRUE # disable SMBUS battery monitors to save flash @@ -158,6 +153,12 @@ define HAL_PARACHUTE_ENABLED 0 # save FLASH, but leave above when flash issue is fixed include ../include/minimize_features.inc +# setup for OSD +undef OSD_ENABLED # minimize_features.inc removes this +define OSD_ENABLED 1 +define HAL_OSD_TYPE_DEFAULT 1 +ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin + # make sure MSP HD Goggle support remains undef HAL_WITH_MSP_DISPLAYPORT define HAL_WITH_MSP_DISPLAYPORT 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7/hwdef.dat index 7f82a2cb94..3e4425cc45 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7/hwdef.dat @@ -154,6 +154,7 @@ define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN" # setup for OSD +undef OSD_ENABLED # minimize_features.inc removes this define OSD_ENABLED 1 define HAL_OSD_TYPE_DEFAULT 1 ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin diff --git a/libraries/AP_HAL_ChibiOS/hwdef/OMNIBUSF7V2/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/OMNIBUSF7V2/hwdef.dat index 2fb20359f1..a5484c9cb1 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/OMNIBUSF7V2/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/OMNIBUSF7V2/hwdef.dat @@ -137,6 +137,7 @@ include ../include/minimize_features.inc # one baro BARO BMP280 SPI:bmp280 +undef OSD_ENABLED # minimize_features.inc removes this define OSD_ENABLED 1 define HAL_OSD_TYPE_DEFAULT 1 ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin diff --git a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc index 31e76c0e08..0bcda34f39 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc +++ b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc @@ -46,6 +46,7 @@ define AP_TRAMP_ENABLED 0 define NUM_SERVO_CHANNELS 16 # remove various OSD features by default: +define OSD_ENABLED 0 define HAL_PLUSCODE_ENABLE 0 define HAL_OSD_SIDEBAR_ENABLE 0 define OSD_PARAM_ENABLED 0