AP_OSD: skip backend drawing for boards without font backends

this saves a lot of flash space on boards that want the MSP OSD system
but not the MAX7456 backend
This commit is contained in:
Andrew Tridgell 2020-08-31 18:56:23 +10:00
parent 25746ef27e
commit 0e55a63be2

View File

@ -253,7 +253,13 @@ void AP_OSD::update_osd()
update_current_screen();
screen[current_screen].set_backend(backend);
// 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 defined(WITH_SITL_OSD) || defined(HAL_WITH_SPI_OSD)
screen[current_screen].draw();
#endif
}
backend->flush();