Browse Source

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
zr-v5.1
Andy Piper 4 years ago committed by Andrew Tridgell
parent
commit
04b3b1f4c2
  1. 4
      libraries/AP_OSD/AP_OSD.cpp
  2. 2
      libraries/AP_OSD/AP_OSD.h

4
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 // 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 // using the MSP OSD system on boards that don't have a MAX7456
#if HAL_WITH_OSD_BITMAP #if HAL_WITH_OSD_BITMAP
#if OSD_PARAM_ENABLED
get_screen(current_screen).draw(); get_screen(current_screen).draw();
#else
((AP_OSD_Screen&)get_screen(current_screen)).draw();
#endif
#endif #endif
} }

2
libraries/AP_OSD/AP_OSD.h

@ -33,7 +33,7 @@
#endif #endif
#ifndef OSD_PARAM_ENABLED #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 #endif
class AP_OSD_Backend; class AP_OSD_Backend;

Loading…
Cancel
Save