diff --git a/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp b/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp index ce38edef09..a5ebfea68c 100644 --- a/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp +++ b/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp @@ -514,6 +514,7 @@ void AP_ADSB_Sagetech::send_msg_GPS() hemisphere |= (AP::gps().status() < AP_GPS::GPS_OK_FIX_2D) ? 0x80 : 0; // isInvalid pkt.payload[35] = hemisphere; +#if AP_RTC_ENABLED // time uint64_t time_usec; if (AP::rtc().get_utc_usec(time_usec)) { @@ -526,6 +527,9 @@ void AP_ADSB_Sagetech::send_msg_GPS() } else { memset(&pkt.payload[36],' ', 10); } +#else + memset(&pkt.payload[36],' ', 10); +#endif send_msg(pkt); } diff --git a/libraries/AP_ADSB/AP_ADSB_Sagetech_MXS.cpp b/libraries/AP_ADSB/AP_ADSB_Sagetech_MXS.cpp index a2df7e7e4e..fdd8431e3e 100644 --- a/libraries/AP_ADSB/AP_ADSB_Sagetech_MXS.cpp +++ b/libraries/AP_ADSB/AP_ADSB_Sagetech_MXS.cpp @@ -681,6 +681,7 @@ void AP_ADSB_Sagetech_MXS::send_gps_msg() gps.gpsValid = (AP::gps().status() < AP_GPS::GPS_OK_FIX_2D) ? false : true; // If the status is not OK, gpsValid is false. +#if AP_RTC_ENABLED uint64_t time_usec; if (AP::rtc().get_utc_usec(time_usec)) { const time_t time_sec = time_usec * 1E-6; @@ -690,6 +691,9 @@ void AP_ADSB_Sagetech_MXS::send_gps_msg() } else { strncpy(gps.timeOfFix, " . ", 11); } +#else + strncpy(gps.timeOfFix, " . ", 11); +#endif int32_t height; if (_frontend._my_loc.initialised() && _frontend._my_loc.get_alt_cm(Location::AltFrame::ABOVE_TERRAIN, height)) {