From 3ff13733eab2d4423fac900677ec3936938f9575 Mon Sep 17 00:00:00 2001 From: Joshua Henderson Date: Sat, 1 Jan 2022 19:42:16 -0500 Subject: [PATCH] AP_OSD: add define AP_AIRSPEED_ENABLED --- libraries/AP_OSD/AP_OSD_Screen.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/AP_OSD/AP_OSD_Screen.cpp b/libraries/AP_OSD/AP_OSD_Screen.cpp index 03eb70b841..66798ee89d 100644 --- a/libraries/AP_OSD/AP_OSD_Screen.cpp +++ b/libraries/AP_OSD/AP_OSD_Screen.cpp @@ -1973,6 +1973,7 @@ void AP_OSD_Screen::draw_btemp(uint8_t x, uint8_t y) void AP_OSD_Screen::draw_atemp(uint8_t x, uint8_t y) { +#if AP_AIRSPEED_ENABLED AP_Airspeed *airspeed = AP_Airspeed::get_singleton(); if (!airspeed) { return; @@ -1984,6 +1985,7 @@ void AP_OSD_Screen::draw_atemp(uint8_t x, uint8_t y) } else { backend->write(x, y, false, "--%c", u_icon(TEMPERATURE)); } +#endif } void AP_OSD_Screen::draw_bat2_vlt(uint8_t x, uint8_t y) @@ -2007,6 +2009,7 @@ void AP_OSD_Screen::draw_bat2used(uint8_t x, uint8_t y) void AP_OSD_Screen::draw_aspd1(uint8_t x, uint8_t y) { +#if AP_AIRSPEED_ENABLED AP_Airspeed *airspeed = AP_Airspeed::get_singleton(); if (!airspeed) { return; @@ -2017,10 +2020,12 @@ void AP_OSD_Screen::draw_aspd1(uint8_t x, uint8_t y) } else { backend->write(x, y, false, "%c ---%c", SYMBOL(SYM_ASPD), u_icon(SPEED)); } +#endif } void AP_OSD_Screen::draw_aspd2(uint8_t x, uint8_t y) { +#if AP_AIRSPEED_ENABLED AP_Airspeed *airspeed = AP_Airspeed::get_singleton(); if (!airspeed) { return; @@ -2031,6 +2036,7 @@ void AP_OSD_Screen::draw_aspd2(uint8_t x, uint8_t y) } else { backend->write(x, y, false, "%c ---%c", SYMBOL(SYM_ASPD), u_icon(SPEED)); } +#endif } void AP_OSD_Screen::draw_clk(uint8_t x, uint8_t y)