Update for new yocto rootfs #217
@ -1693,15 +1693,23 @@ void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::C
|
|||||||
|
|
||||||
ReturnValue_t CoreController::timeFileHandler() {
|
ReturnValue_t CoreController::timeFileHandler() {
|
||||||
if (gpsFix == GpsHyperion::FixMode::FIX_2D or gpsFix == GpsHyperion::FixMode::FIX_3D) {
|
if (gpsFix == GpsHyperion::FixMode::FIX_2D or gpsFix == GpsHyperion::FixMode::FIX_3D) {
|
||||||
|
if(opDivider.check()) {
|
||||||
// It is assumed that the system time is set from the GPS time
|
// It is assumed that the system time is set from the GPS time
|
||||||
timeval currentTime = {};
|
timeval currentTime = {};
|
||||||
ReturnValue_t result = Clock::getClock_timeval(¤tTime);
|
ReturnValue_t result = Clock::getClock_timeval(¤tTime);
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::ofstream timeFile(currMntPrefix + TIME_FILE);
|
std::string fileName = currMntPrefix + TIME_FILE;
|
||||||
|
std::ofstream timeFile(fileName);
|
||||||
|
if (not timeFile.good()) {
|
||||||
|
sif::error << "CoreController::timeFileHandler: Error opening time file: " <<
|
||||||
|
strerror(errno) << std::endl;
|
||||||
|
return RETURN_FAILED;
|
||||||
|
}
|
||||||
timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl;
|
timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
tmtc
2
tmtc
Submodule tmtc updated: 9055281da4...19768cb1b1
Reference in New Issue
Block a user