Fix NaN for Limiting Rotation Rates #872
@ -79,6 +79,7 @@ CoreController::CoreController(object_id_t objectId, bool enableHkSet)
|
|||||||
} catch (const std::filesystem::filesystem_error &e) {
|
} catch (const std::filesystem::filesystem_error &e) {
|
||||||
sif::error << "CoreController::CoreController: Failed with exception " << e.what() << std::endl;
|
sif::error << "CoreController::CoreController: Failed with exception " << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
|
initLeapSeconds();
|
||||||
|
|||||||
// Add script folder to path
|
// Add script folder to path
|
||||||
char *currentEnvPath = getenv("PATH");
|
char *currentEnvPath = getenv("PATH");
|
||||||
std::string updatedEnvPath = std::string(currentEnvPath) + ":/home/root/scripts:/usr/local/bin";
|
std::string updatedEnvPath = std::string(currentEnvPath) + ":/home/root/scripts:/usr/local/bin";
|
||||||
@ -2109,6 +2110,9 @@ ReturnValue_t CoreController::initLeapSecondsFromFile() {
|
|||||||
Clock::setLeapSeconds(leapSeconds);
|
Clock::setLeapSeconds(leapSeconds);
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
sif::error
|
||||||
|
<< "CoreController::leapSecondsFileHandler: Initalization of leap seconds from file failed"
|
||||||
|
<< std::endl;
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2119,7 +2123,7 @@ ReturnValue_t CoreController::writeLeapSecondsToFile(const uint16_t leapSeconds)
|
|||||||
}
|
}
|
||||||
std::ofstream leapSecondsFile(fileName.c_str(), std::ofstream::out | std::ofstream::trunc);
|
std::ofstream leapSecondsFile(fileName.c_str(), std::ofstream::out | std::ofstream::trunc);
|
||||||
if (not leapSecondsFile.good()) {
|
if (not leapSecondsFile.good()) {
|
||||||
sif::error << "CoreController::leapSecondsFileHandler: Error opening time file: "
|
sif::error << "CoreController::leapSecondsFileHandler: Error opening leap seconds file: "
|
||||||
<< strerror(errno) << std::endl;
|
<< strerror(errno) << std::endl;
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user
shouldn't this be inside the function above? If this is done, the default value setting needs to be moved to constructor/initialize function so it is always executed..
the function will initialize the leap seconds, no matter what. it could be up there yes, but a try catch for a function that will definitely do what it needs to be doing seemed unnecessary