more useful printout
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
2022-04-08 11:40:35 +02:00
parent 351920aa7b
commit 6ae9e539a6
2 changed files with 13 additions and 1 deletions

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);
}