logger: don't use system time for log file name if system time obviously wrong

This commit is contained in:
Beat Küng
2016-06-06 23:27:16 +02:00
committed by Lorenz Meier
parent f5310ca51e
commit c64b0d4573
+4
View File
@@ -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 */