From f90093b628f4bc24c801b9d9058d651608ad67b5 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 5 Oct 2023 18:40:34 +1100 Subject: [PATCH] AP_Hott_Telem: allow for compilation without AP_RTC_ENABLED --- libraries/AP_Hott_Telem/AP_Hott_Telem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_Hott_Telem/AP_Hott_Telem.cpp b/libraries/AP_Hott_Telem/AP_Hott_Telem.cpp index 05911a67e4..98bff2d86e 100644 --- a/libraries/AP_Hott_Telem/AP_Hott_Telem.cpp +++ b/libraries/AP_Hott_Telem/AP_Hott_Telem.cpp @@ -289,12 +289,14 @@ void AP_Hott_Telem::send_GPS(void) msg.home_direction = degrees(atan2f(home_vec.y, home_vec.x)) * 0.5 + 0.5; +#if AP_RTC_ENABLED AP_RTC &rtc = AP::rtc(); { WITH_SEMAPHORE(rtc.get_semaphore()); uint16_t ms; rtc.get_system_clock_utc(msg.gps_time_h, msg.gps_time_m, msg.gps_time_s, ms); } +#endif send_packet((const uint8_t *)&msg, sizeof(msg)); }