New total reboot counter handling #708

Merged
muellerr merged 16 commits from total-boot-counter-file into main 2023-06-26 15:33:22 +02:00
Showing only changes of commit 966faf51b5 - Show all commits

View File

@ -1226,6 +1226,10 @@ ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy co
sdcMan->markUnusable(); sdcMan->markUnusable();
// Wait two seconds to ensure no one uses the SD cards // Wait two seconds to ensure no one uses the SD cards
TaskFactory::delayTask(2000); TaskFactory::delayTask(2000);
// Ensure that all writes/reads do finish.
sync();
// Attempt graceful shutdown by unmounting and switching off SD cards // Attempt graceful shutdown by unmounting and switching off SD cards
sdcMan->switchOffSdCard(sd::SdCard::SLOT_0); sdcMan->switchOffSdCard(sd::SdCard::SLOT_0);
sdcMan->switchOffSdCard(sd::SdCard::SLOT_1); sdcMan->switchOffSdCard(sd::SdCard::SLOT_1);
@ -2027,6 +2031,7 @@ bool CoreController::parseRebootCountersFile(std::string path, RebootCountersFil
break; break;
} }
} }
lineIdx++;
} }
return true; return true;
} }