From 88dd8130f62b1956f60c85aed09091b83f8b8164 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 5 Oct 2023 17:57:33 +1100 Subject: [PATCH] AP_GPS: correct placement of voiding clause should be voided when no logging, not just on periph... --- libraries/AP_GPS/AP_GPS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index ca2b518df9e0e..954f12be9a52e 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -1055,6 +1055,8 @@ void AP_GPS::update_instance(uint8_t instance) if (data_should_be_logged && should_log()) { Write_GPS(instance); } +#else + (void)data_should_be_logged; #endif #ifndef HAL_BUILD_AP_PERIPH @@ -1064,8 +1066,6 @@ void AP_GPS::update_instance(uint8_t instance) AP::rtc().set_utc_usec(now, AP_RTC::SOURCE_GPS); } } -#else - (void)data_should_be_logged; #endif }