From 04b3b1f4c2ac5d0ad294088e812077c7fd7ab9b8 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Wed, 9 Sep 2020 22:04:22 +0100 Subject: [PATCH] AP_OSD: re-enable OSD parameters on 1Mb boards since it wasn't doing anything Make sure OSD parameters can be disabled in hwdef.dat --- libraries/AP_OSD/AP_OSD.cpp | 4 ++++ libraries/AP_OSD/AP_OSD.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/AP_OSD/AP_OSD.cpp b/libraries/AP_OSD/AP_OSD.cpp index 9914ef3bb0..85e0ff8646 100644 --- a/libraries/AP_OSD/AP_OSD.cpp +++ b/libraries/AP_OSD/AP_OSD.cpp @@ -273,7 +273,11 @@ void AP_OSD::update_osd() // skip the drawing if we are not using a font based backend. This saves a lot of flash space when // using the MSP OSD system on boards that don't have a MAX7456 #if HAL_WITH_OSD_BITMAP +#if OSD_PARAM_ENABLED get_screen(current_screen).draw(); +#else + ((AP_OSD_Screen&)get_screen(current_screen)).draw(); +#endif #endif } diff --git a/libraries/AP_OSD/AP_OSD.h b/libraries/AP_OSD/AP_OSD.h index 31f94ce0f1..64725a7ea1 100644 --- a/libraries/AP_OSD/AP_OSD.h +++ b/libraries/AP_OSD/AP_OSD.h @@ -33,7 +33,7 @@ #endif #ifndef OSD_PARAM_ENABLED -#define OSD_PARAM_ENABLED HAL_WITH_OSD_BITMAP && !HAL_MINIMIZE_FEATURES && BOARD_FLASH_SIZE > 1024 +#define OSD_PARAM_ENABLED HAL_WITH_OSD_BITMAP && !HAL_MINIMIZE_FEATURES #endif class AP_OSD_Backend;