AP_Hott_Telem: allow for compilation without AP_RTC_ENABLED

This commit is contained in:
Peter Barker 2023-10-05 18:40:34 +11:00 committed by Andrew Tridgell
parent 53f4709a78
commit f90093b628
1 changed files with 2 additions and 0 deletions

View File

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