diff --git a/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7/hwdef.dat index 4cd11ef079..5ae33ca8d5 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/KakuteF7/hwdef.dat @@ -144,15 +144,13 @@ define STM32_PWM_USE_ADVANCED TRUE define HAL_PARACHUTE_ENABLED 0 # save FLASH, but leave above when flash issue is fixed -include ../include/minimize_features.inc +include ../include/minimize_fpv_osd.inc # disable SMBUS battery monitors to save flash undef AP_BATTERY_SMBUS_ENABLED define AP_BATTERY_SMBUS_ENABLED 0 # 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 b0f5caad59..d22ae701fd 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/OMNIBUSF7V2/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/OMNIBUSF7V2/hwdef.dat @@ -127,7 +127,7 @@ define HAL_COMPASS_AUTO_ROT_DEFAULT 2 define HAL_PARACHUTE_ENABLED 0 # save FLASH, but leave above when flash issue is fixed -include ../include/minimize_features.inc +include ../include/minimize_fpv_osd.inc # disable SMBUS monitors to save flash undef AP_BATTERY_SMBUS_ENABLED @@ -136,7 +136,5 @@ define AP_BATTERY_SMBUS_ENABLED 0 # 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_common.inc b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_common.inc index faebef7de1..22bddb0aa4 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_common.inc +++ b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_common.inc @@ -50,12 +50,6 @@ define HAL_SPEKTRUM_TELEM_ENABLED 0 # various structures increase the flash size when using >16 servos: 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 - # no Winch if minimized: define AP_WINCH_ENABLED 0 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc index b66ee165fa..bc6b1bc457 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc +++ b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_features.inc @@ -1 +1,7 @@ include minimize_common.inc + +# 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 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc new file mode 100644 index 0000000000..b66ee165fa --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/include/minimize_fpv_osd.inc @@ -0,0 +1 @@ +include minimize_common.inc