Fix NaN for Limiting Rotation Rates #872
@ -481,7 +481,10 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (UPDATE_LEAP_SECONDS): {
|
case (UPDATE_LEAP_SECONDS): {
|
||||||
ReturnValue_t result = actionUpdateLeapSeconds();
|
if (size != 2) {
|
||||||
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
|
}
|
||||||
|
ReturnValue_t result = actionUpdateLeapSeconds(data);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -2101,7 +2104,7 @@ ReturnValue_t CoreController::initLeapSecondsFromFile() {
|
|||||||
uint16_t leapSeconds = 0;
|
uint16_t leapSeconds = 0;
|
||||||
size_t checkPtr;
|
size_t checkPtr;
|
||||||
leapSeconds = std::stoi(nextWord.c_str(), &checkPtr, 10);
|
leapSeconds = std::stoi(nextWord.c_str(), &checkPtr, 10);
|
||||||
if (iss.bad() or *checkPtr) {
|
if (iss.bad() or checkPtr) {
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
Clock::setLeapSeconds(leapSeconds);
|
Clock::setLeapSeconds(leapSeconds);
|
||||||
@ -2121,7 +2124,15 @@ ReturnValue_t CoreController::writeLeapSecondsToFile(const uint16_t leapSeconds)
|
|||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
};
|
};
|
||||||
|
|
||||||
ReturnValue_t CoreController::actionUpdateLeapSeconds() { ; }
|
ReturnValue_t CoreController::actionUpdateLeapSeconds(const uint8_t *data) {
|
||||||
|
uint16_t leapSeconds = data[1] | (data[0] << 8);
|
||||||
|
ReturnValue_t result = writeLeapSecondsToFile(leapSeconds);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
Clock::setLeapSeconds(leapSeconds);
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::initClockFromTimeFile() {
|
ReturnValue_t CoreController::initClockFromTimeFile() {
|
||||||
using namespace GpsHyperion;
|
using namespace GpsHyperion;
|
||||||
|
@ -340,7 +340,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||||||
void initLeapSeconds();
|
void initLeapSeconds();
|
||||||
ReturnValue_t initLeapSecondsFromFile();
|
ReturnValue_t initLeapSecondsFromFile();
|
||||||
ReturnValue_t initClockFromTimeFile();
|
ReturnValue_t initClockFromTimeFile();
|
||||||
ReturnValue_t actionUpdateLeapSeconds();
|
ReturnValue_t actionUpdateLeapSeconds(const uint8_t* data);
|
||||||
ReturnValue_t writeLeapSecondsToFile(const uint16_t leapSeconds);
|
ReturnValue_t writeLeapSecondsToFile(const uint16_t leapSeconds);
|
||||||
ReturnValue_t performSdCardCheck();
|
ReturnValue_t performSdCardCheck();
|
||||||
ReturnValue_t backupTimeFileHandler();
|
ReturnValue_t backupTimeFileHandler();
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 73a4260f337aa39475baef999466b200c9123e62
|
Subproject commit 811786fd78d5953956a8abba1c10c18c6e494422
|
Loading…
Reference in New Issue
Block a user