DataFlash: fix for new AP_RTC API

This commit is contained in:
Andrew Tridgell 2018-06-14 15:30:54 +10:00
parent 312ac7dc73
commit 1283b92cb7
1 changed files with 5 additions and 1 deletions

View File

@ -661,7 +661,11 @@ uint32_t DataFlash_File::_get_log_time(const uint16_t log_num) const
// it is the file we are currently writing // it is the file we are currently writing
free(fname); free(fname);
write_fd_semaphore->give(); write_fd_semaphore->give();
return hal.util->get_system_clock_ms() / 1000U; uint64_t utc_usec;
if (!AP::rtc().get_utc_usec(utc_usec)) {
return 0;
}
return utc_usec / 1000000U;
} }
write_fd_semaphore->give(); write_fd_semaphore->give();
} }