AP_OSD: allow for compilation without AP_RTC_ENABLED

This commit is contained in:
Peter Barker 2023-10-05 18:40:35 +11:00 committed by Andrew Tridgell
parent 0e0f50b661
commit 6c80b28685
1 changed files with 4 additions and 0 deletions

View File

@ -2149,6 +2149,7 @@ void AP_OSD_Screen::draw_aspd2(uint8_t x, uint8_t y)
#endif #endif
} }
#if AP_RTC_ENABLED
void AP_OSD_Screen::draw_clk(uint8_t x, uint8_t y) void AP_OSD_Screen::draw_clk(uint8_t x, uint8_t y)
{ {
AP_RTC &rtc = AP::rtc(); AP_RTC &rtc = AP::rtc();
@ -2160,6 +2161,7 @@ void AP_OSD_Screen::draw_clk(uint8_t x, uint8_t y)
backend->write(x, y, false, "%c%02u:%02u", SYMBOL(SYM_CLK), hour, min); backend->write(x, y, false, "%c%02u:%02u", SYMBOL(SYM_CLK), hour, min);
} }
} }
#endif
#if HAL_PLUSCODE_ENABLE #if HAL_PLUSCODE_ENABLE
void AP_OSD_Screen::draw_pluscode(uint8_t x, uint8_t y) void AP_OSD_Screen::draw_pluscode(uint8_t x, uint8_t y)
@ -2329,7 +2331,9 @@ void AP_OSD_Screen::draw(void)
DRAW_SETTING(atemp); DRAW_SETTING(atemp);
DRAW_SETTING(hdop); DRAW_SETTING(hdop);
DRAW_SETTING(flightime); DRAW_SETTING(flightime);
#if AP_RTC_ENABLED
DRAW_SETTING(clk); DRAW_SETTING(clk);
#endif
#if AP_VIDEOTX_ENABLED #if AP_VIDEOTX_ENABLED
DRAW_SETTING(vtx_power); DRAW_SETTING(vtx_power);
#endif #endif