Fix NaN for Limiting Rotation Rates #872
@ -2114,13 +2114,17 @@ ReturnValue_t CoreController::initLeapSecondsFromFile() {
|
||||
|
||||
ReturnValue_t CoreController::writeLeapSecondsToFile(const uint16_t leapSeconds) {
|
||||
std::string fileName = currMntPrefix + LEAP_SECONDS_FILE;
|
||||
if (sdcMan->isSdCardUsable(std::nullopt)) {
|
||||
std::ofstream leapSecondsFile(fileName.c_str(), std::ofstream::out | std::ofstream::trunc);
|
||||
if (leapSecondsFile.is_open()) {
|
||||
leapSecondsFile << "LEAP SECONDS: " << leapSeconds << std::endl;
|
||||
}
|
||||
if (not sdcMan->isSdCardUsable(std::nullopt)) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return returnvalue::FAILED;
|
||||
std::ofstream leapSecondsFile(fileName.c_str(), std::ofstream::out | std::ofstream::trunc);
|
||||
if (not leapSecondsFile.good()) {
|
||||
sif::error << "CoreController::leapSecondsFileHandler: Error opening time file: "
|
||||
<< strerror(errno) << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
leapSecondsFile << "LEAP SECONDS: " << leapSeconds << std::endl;
|
||||
return returnvalue::OK;
|
||||
};
|
||||
|
||||
ReturnValue_t CoreController::actionUpdateLeapSeconds(const uint8_t *data) {
|
||||
|
Loading…
Reference in New Issue
Block a user