AP_GPS: correct placement of voiding clause

should be voided when no logging, not just on periph...
This commit is contained in:
Peter Barker 2023-10-05 17:57:33 +11:00 committed by Randy Mackay
parent e2531a93f2
commit 88dd8130f6
1 changed files with 2 additions and 2 deletions

View File

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