this is annoying to test..
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-06-24 18:52:29 +02:00
parent 6040cd2d1e
commit 5420e322f7
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -2135,18 +2135,20 @@ void CoreController::rewriteRebootWatchdogFile(RebootWatchdogFile file) {
using namespace std::filesystem; using namespace std::filesystem;
std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE; std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE;
std::string legacyPath = currMntPrefix + LEGACY_REBOOT_WATCHDOG_FILE; std::string legacyPath = currMntPrefix + LEGACY_REBOOT_WATCHDOG_FILE;
std::ofstream rebootFile(path); {
if (rebootFile.is_open()) { std::ofstream rebootFile(path);
// Initiate reboot file first. Reboot handling will be on on initialization if (rebootFile.is_open()) {
rebootFile << "on: " << file.enabled << "\nmaxcnt: " << file.maxCount // Initiate reboot file first. Reboot handling will be on on initialization
<< "\nimg00: " << file.img00Cnt << "\nimg01: " << file.img01Cnt rebootFile << "on: " << file.enabled << "\nmaxcnt: " << file.maxCount
<< "\nimg10: " << file.img10Cnt << "\nimg11: " << file.img11Cnt << "\nimg00: " << file.img00Cnt << "\nimg01: " << file.img01Cnt
<< "\nimg00lock: " << file.img00Lock << "\nimg01lock: " << file.img01Lock << "\nimg10: " << file.img10Cnt << "\nimg11: " << file.img11Cnt
<< "\nimg10lock: " << file.img10Lock << "\nimg11lock: " << file.img11Lock << "\nimg00lock: " << file.img00Lock << "\nimg01lock: " << file.img01Lock
<< "\nbootflag: " << file.bootFlag << "\nlast: " << static_cast<int>(file.lastChip) << "\nimg10lock: " << file.img10Lock << "\nimg11lock: " << file.img11Lock
<< " " << static_cast<int>(file.lastCopy) << "\nbootflag: " << file.bootFlag << "\nlast: " << static_cast<int>(file.lastChip)
<< "\nnext: " << static_cast<int>(file.mechanismNextChip) << " " << " " << static_cast<int>(file.lastCopy)
<< static_cast<int>(file.mechanismNextCopy) << "\n"; << "\nnext: " << static_cast<int>(file.mechanismNextChip) << " "
<< static_cast<int>(file.mechanismNextCopy) << "\n";
}
} }
std::error_code e; std::error_code e;
// TODO: Remove at some point in the future when all images have been updated. // TODO: Remove at some point in the future when all images have been updated.