From e13566695b8e4a275165ef33acb04b37f08d1bbf Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 5 Oct 2023 18:40:35 +1100 Subject: [PATCH] ArduPlane: allow for compilation without AP_RTC_ENABLED --- ArduPlane/commands_logic.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArduPlane/commands_logic.cpp b/ArduPlane/commands_logic.cpp index 9d603addea..9ad4f95313 100644 --- a/ArduPlane/commands_logic.cpp +++ b/ArduPlane/commands_logic.cpp @@ -542,7 +542,11 @@ void ModeAuto::do_nav_delay(const AP_Mission::Mission_Command& cmd) nav_delay.time_max_ms = cmd.content.nav_delay.seconds * 1000; // convert seconds to milliseconds } else { // absolute delay to utc time +#if AP_RTC_ENABLED nav_delay.time_max_ms = AP::rtc().get_time_utc(cmd.content.nav_delay.hour_utc, cmd.content.nav_delay.min_utc, cmd.content.nav_delay.sec_utc, 0); +#else + nav_delay.time_max_ms = 0; +#endif } gcs().send_text(MAV_SEVERITY_INFO, "Delaying %u sec", (unsigned)(nav_delay.time_max_ms/1000)); }