From 66dc36ef88679f99c5cc09956b1a732da655e243 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Jul 2019 09:39:49 +1000 Subject: [PATCH] AP_Logger: ifdef out _need_rtc_update --- libraries/AP_Logger/AP_Logger_File.cpp | 2 ++ libraries/AP_Logger/AP_Logger_File.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libraries/AP_Logger/AP_Logger_File.cpp b/libraries/AP_Logger/AP_Logger_File.cpp index 732d612586..36a787cd7c 100644 --- a/libraries/AP_Logger/AP_Logger_File.cpp +++ b/libraries/AP_Logger/AP_Logger_File.cpp @@ -884,9 +884,11 @@ uint16_t AP_Logger_File::start_new_log(void) return 0xFFFF; } +#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS // remember if we had utc time when we opened the file uint64_t utc_usec; _need_rtc_update = !AP::rtc().get_utc_usec(utc_usec); +#endif EXPECT_DELAY_MS(3000); #if HAL_OS_POSIX_IO diff --git a/libraries/AP_Logger/AP_Logger_File.h b/libraries/AP_Logger/AP_Logger_File.h index c8797baeb5..7d6c5ae52a 100644 --- a/libraries/AP_Logger/AP_Logger_File.h +++ b/libraries/AP_Logger/AP_Logger_File.h @@ -67,7 +67,9 @@ private: int _write_fd; char *_write_filename; uint32_t _last_write_ms; +#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS bool _need_rtc_update; +#endif int _read_fd; uint16_t _read_fd_log_num;