v1.10.0 #220

Merged
meierj merged 592 commits from develop into main 2022-04-22 07:42:20 +02:00
2 changed files with 13 additions and 1 deletions
Showing only changes of commit 6ae9e539a6 - Show all commits

View File

@ -16,6 +16,7 @@
#endif
#include <fcntl.h>
#include <unistd.h>
#include <algorithm>
#include <filesystem>
@ -1730,6 +1731,12 @@ ReturnValue_t CoreController::initClockFromTimeFile() {
if (iss.bad() or *checkPtr) {
return RETURN_FAILED;
}
#if OBSW_VERBOSE_LEVEL >= 1
time_t timeRaw = currentTime.tv_sec;
std::tm *time = std::gmtime(&timeRaw);
sif::info << "Setting system time from time files: " << std::put_time(time, "%c %Z")
<< std::endl;
#endif
return Clock::setClock(&currentTime);
}
return RETURN_OK;

View File

@ -192,7 +192,12 @@ void GPSHyperionLinuxController::readGpsDataFromGpsd() {
}
if (timeInit and validFix) {
if (not utility::timeSanityCheck()) {
sif::info << "Setting init clock in gps ctrl" << std::endl;
#if OBSW_VERBOSE_LEVEL >= 1
time_t timeRaw = time.tv_sec;
std::tm *time = std::gmtime(&timeRaw);
sif::info << "Setting invalid system time from GPS data directly: "
<< std::put_time(time, "%c %Z") << std::endl;
#endif
// For some reason, the clock needs to be somewhat correct for NTP to work. Really dumb..
Clock::setClock(&time);
}