Fix NaN for Limiting Rotation Rates #872
@ -79,7 +79,6 @@ 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";
|
||||||
@ -1422,6 +1421,9 @@ void CoreController::performMountedSdCardOperations() {
|
|||||||
if (not timeFileInitDone) {
|
if (not timeFileInitDone) {
|
||||||
initClockFromTimeFile();
|
initClockFromTimeFile();
|
||||||
}
|
}
|
||||||
|
if (not leapSecondsInitDone) {
|
||||||
|
initLeapSeconds();
|
||||||
|
}
|
||||||
performRebootWatchdogHandling(false);
|
performRebootWatchdogHandling(false);
|
||||||
performRebootCountersHandling(false);
|
performRebootCountersHandling(false);
|
||||||
}
|
}
|
||||||
@ -2083,6 +2085,7 @@ void CoreController::initLeapSeconds() {
|
|||||||
Clock::setLeapSeconds(config::LEAP_SECONDS);
|
Clock::setLeapSeconds(config::LEAP_SECONDS);
|
||||||
writeLeapSecondsToFile(config::LEAP_SECONDS);
|
writeLeapSecondsToFile(config::LEAP_SECONDS);
|
||||||
}
|
}
|
||||||
|
leapSecondsInitDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::initLeapSecondsFromFile() {
|
ReturnValue_t CoreController::initLeapSecondsFromFile() {
|
||||||
|
@ -298,6 +298,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||||||
|
|
||||||
std::string currMntPrefix;
|
std::string currMntPrefix;
|
||||||
bool timeFileInitDone = false;
|
bool timeFileInitDone = false;
|
||||||
|
bool leapSecondsInitDone = false;
|
||||||
bool performOneShotSdCardOpsSwitch = false;
|
bool performOneShotSdCardOpsSwitch = false;
|
||||||
uint8_t shortSdCardCdCounter = 0;
|
uint8_t shortSdCardCdCounter = 0;
|
||||||
#if OBSW_THREAD_TRACING == 1
|
#if OBSW_THREAD_TRACING == 1
|
||||||
|
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