From 2656bcf5fa473314934c9eac459bd5106b0622f6 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 20 Jan 2023 00:00:16 +1100 Subject: [PATCH] AP_OSD: add and use AP_VIDEOTX_ENABLED --- libraries/AP_OSD/AP_OSD_Screen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_OSD/AP_OSD_Screen.cpp b/libraries/AP_OSD/AP_OSD_Screen.cpp index adaf2b5521..9d375af7a2 100644 --- a/libraries/AP_OSD/AP_OSD_Screen.cpp +++ b/libraries/AP_OSD/AP_OSD_Screen.cpp @@ -2113,6 +2113,7 @@ void AP_OSD_Screen::draw_current2(uint8_t x, uint8_t y) void AP_OSD_Screen::draw_vtx_power(uint8_t x, uint8_t y) { +#if AP_VIDEOTX_ENABLED AP_VideoTX *vtx = AP_VideoTX::get_singleton(); if (!vtx) { return; @@ -2123,6 +2124,7 @@ void AP_OSD_Screen::draw_vtx_power(uint8_t x, uint8_t y) powr = vtx->get_power_mw(); } backend->write(x, y, !vtx->is_configuration_finished(), "%4hu%c", powr, SYMBOL(SYM_MW)); +#endif // AP_VIDEOTX_ENABLED } #if AP_TERRAIN_AVAILABLE void AP_OSD_Screen::draw_hgt_abvterr(uint8_t x, uint8_t y)