Fix NaN for Limiting Rotation Rates #872

Merged
meggert merged 17 commits from limit-rot-rate-fix into main 2024-03-06 11:13:02 +01:00
Showing only changes of commit aa4bfa8d88 - Show all commits

View File

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