bugfix and first reboot handler code
This commit is contained in:
parent
fa93ca4dc0
commit
dbba10185c
@ -1135,3 +1135,10 @@ void CoreController::performWatchdogControlOperation() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CoreController::performRebootFileHandling() {
|
||||
if(doPerformRebootFileHandling and sdcMan->isSdCardMounted(sdInfo.pref)) {
|
||||
auto mntPrefix = std::filesystem::path(sdcMan->getCurrentMountPrefix(sdInfo.pref));
|
||||
doPerformRebootFileHandling = false;
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class CoreController : public ExtendedControllerBase {
|
||||
static constexpr char CHIP_PROT_SCRIPT[] = "/home/root/scripts/get-chip-prot-status.sh";
|
||||
static constexpr char CHIP_STATE_FILE[] = "/tmp/chip_prot_status.txt";
|
||||
static constexpr char CURR_COPY_FILE[] = "/tmp/curr_copy.txt";
|
||||
static constexpr char VERSION_FILE[] = "/conf/sd_status";
|
||||
static constexpr char VERSION_FILE[] = "/conf/version.txt";
|
||||
|
||||
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
|
||||
static constexpr ActionId_t REBOOT_OBC = 32;
|
||||
@ -122,6 +122,7 @@ class CoreController : public ExtendedControllerBase {
|
||||
sd::SdState commandedState = sd::SdState::OFF;
|
||||
};
|
||||
SdInfo sdInfo;
|
||||
bool doPerformRebootFileHandling = true;
|
||||
|
||||
/**
|
||||
* Index 0: Chip 0 Copy 0
|
||||
@ -152,6 +153,7 @@ class CoreController : public ExtendedControllerBase {
|
||||
void determinePreferredSdCard();
|
||||
void executeNextExternalSdCommand();
|
||||
void checkExternalSdCommandStatus();
|
||||
void performRebootFileHandling();
|
||||
|
||||
ReturnValue_t actionListDirectoryIntoFile(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||
const uint8_t* data, size_t size);
|
||||
|
@ -183,7 +183,7 @@ class SdCardManager {
|
||||
/**
|
||||
* @brief Checks if an SD card is mounted
|
||||
*
|
||||
* @param sdCard The SD crad to check
|
||||
* @param sdCard The SD card to check
|
||||
*
|
||||
* @return true if mounted, otherwise false
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user