mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 12:13:34 +08:00
logger: don't use system time for log file name if system time obviously wrong
This commit is contained in:
@@ -859,6 +859,10 @@ bool Logger::get_log_time(struct tm *tt, bool boot_time)
|
||||
struct timespec ts;
|
||||
px4_clock_gettime(CLOCK_REALTIME, &ts);
|
||||
utc_time_sec = ts.tv_sec + (ts.tv_nsec / 1e9);
|
||||
|
||||
if (utc_time_sec < GPS_EPOCH_SECS) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* strip the time elapsed since boot */
|
||||
|
||||
Reference in New Issue
Block a user