v1.10.0 #220

Merged
meierj merged 592 commits from develop into main 2022-04-22 07:42:20 +02:00
2 changed files with 54 additions and 54 deletions
Showing only changes of commit be8734dd59 - Show all commits

View File

@ -107,6 +107,59 @@ ReturnValue_t CoreController::initializeAfterTaskCreation() {
return result;
}
ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t *data, size_t size) {
switch (actionId) {
case (LIST_DIRECTORY_INTO_FILE): {
return actionListDirectoryIntoFile(actionId, commandedBy, data, size);
}
case (SWITCH_REBOOT_FILE_HANDLING): {
if (size < 1) {
return HasActionsIF::INVALID_PARAMETERS;
}
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.pref) + REBOOT_FILE;
// Disable the reboot file mechanism
parseRebootFile(path, rebootFile);
if (data[0] == 0) {
rebootFile.enabled = false;
rewriteRebootFile(rebootFile);
} else if (data[0] == 1) {
rebootFile.enabled = true;
rewriteRebootFile(rebootFile);
} else {
return HasActionsIF::INVALID_PARAMETERS;
}
return HasActionsIF::EXECUTION_FINISHED;
}
case (RESET_ALL_REBOOT_COUNTERS): {
resetRebootCount(xsc::ALL_CHIP, xsc::ALL_COPY);
return HasActionsIF::EXECUTION_FINISHED;
}
case (RESET_REBOOT_COUNTER_00): {
resetRebootCount(xsc::CHIP_0, xsc::COPY_0);
return HasActionsIF::EXECUTION_FINISHED;
}
case (RESET_REBOOT_COUNTER_01): {
resetRebootCount(xsc::CHIP_0, xsc::COPY_1);
return HasActionsIF::EXECUTION_FINISHED;
}
case (RESET_REBOOT_COUNTER_10): {
resetRebootCount(xsc::CHIP_1, xsc::COPY_0);
return HasActionsIF::EXECUTION_FINISHED;
}
case (RESET_REBOOT_COUNTER_11): {
resetRebootCount(xsc::CHIP_1, xsc::COPY_1);
return HasActionsIF::EXECUTION_FINISHED;
}
case (REBOOT_OBC): {
return actionPerformReboot(data, size);
}
default: {
return HasActionsIF::INVALID_ACTION_ID;
}
}
}
ReturnValue_t CoreController::checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t *msToReachTheMode) {
return HasReturnvaluesIF::RETURN_OK;
@ -505,59 +558,6 @@ ReturnValue_t CoreController::sdCardSetup(sd::SdCard sdCard, sd::SdState targetS
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t *data, size_t size) {
switch (actionId) {
case (LIST_DIRECTORY_INTO_FILE): {
return actionListDirectoryIntoFile(actionId, commandedBy, data, size);
}
case (SWITCH_REBOOT_FILE_HANDLING): {
if (size < 1) {
return HasActionsIF::INVALID_PARAMETERS;
}
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.pref) + REBOOT_FILE;
// Disable the reboot file mechanism
parseRebootFile(path, rebootFile);
if (data[0] == 0) {
rebootFile.enabled = false;
rewriteRebootFile(rebootFile);
} else if (data[0] == 1) {
rebootFile.enabled = true;
rewriteRebootFile(rebootFile);
} else {
return HasActionsIF::INVALID_PARAMETERS;
}
return HasActionsIF::EXECUTION_FINISHED;
}
case (RESET_ALL_REBOOT_COUNTERS): {
resetRebootCount(xsc::ALL_CHIP, xsc::ALL_COPY);
return HasActionsIF::EXECUTION_FINISHED;
}
case (RESET_REBOOT_COUNTER_00): {
resetRebootCount(xsc::CHIP_0, xsc::COPY_0);
return HasActionsIF::EXECUTION_FINISHED;
}
case (RESET_REBOOT_COUNTER_01): {
resetRebootCount(xsc::CHIP_0, xsc::COPY_1);
return HasActionsIF::EXECUTION_FINISHED;
}
case (RESET_REBOOT_COUNTER_10): {
resetRebootCount(xsc::CHIP_1, xsc::COPY_0);
return HasActionsIF::EXECUTION_FINISHED;
}
case (RESET_REBOOT_COUNTER_11): {
resetRebootCount(xsc::CHIP_1, xsc::COPY_1);
return HasActionsIF::EXECUTION_FINISHED;
}
case (REBOOT_OBC): {
return actionPerformReboot(data, size);
}
default: {
return HasActionsIF::INVALID_ACTION_ID;
}
}
}
ReturnValue_t CoreController::sdColdRedundantBlockingInit() {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;

2
tmtc

@ -1 +1 @@
Subproject commit a671e86400152d8480c1efde29d69848ca6b6066
Subproject commit 7e24589184bb7bbd427c66ed55b3c29bbeba927f