AP_OSD: add define AP_AIRSPEED_ENABLED

This commit is contained in:
Joshua Henderson 2022-01-01 19:42:16 -05:00 committed by Andrew Tridgell
parent 56a30617e2
commit 3ff13733ea
1 changed files with 6 additions and 0 deletions

View File

@ -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)