Reboot File Handling #154

Merged
meierj merged 27 commits from mueller/reboot-file-handling into develop 2022-03-01 17:24:27 +01:00
3 changed files with 3 additions and 3 deletions
Showing only changes of commit 84367f8424 - Show all commits

View File

@ -23,7 +23,7 @@ enum Copy : int { COPY_0, COPY_1, NO_COPY, SELF_COPY, ALL_COPY };
struct RebootFile {
static constexpr uint8_t DEFAULT_MAX_BOOT_CNT = 10;
bool enabled = false;
bool enabled = true;
size_t maxCount = DEFAULT_MAX_BOOT_CNT;
uint32_t img00Cnt = 0;
uint32_t img01Cnt = 0;

View File

@ -18,7 +18,7 @@ enum Copy : int { COPY_0, COPY_1, NO_COPY, SELF_COPY, ALL_COPY };
struct RebootFile {
static constexpr uint8_t DEFAULT_MAX_BOOT_CNT = 10;
bool enabled = false;
bool enabled = true;
size_t maxCount = DEFAULT_MAX_BOOT_CNT;
uint32_t img00Cnt = 0;
uint32_t img01Cnt = 0;

View File

@ -32,7 +32,7 @@ TEST_CASE( "Core Controller Reboot File Handling", "[reboot-file]" ) {
xsc_libnor_copy_t copy;
RebootFile rf = {};
ctrl.rewriteRebootFile(rf);
REQUIRE(rf.enabled == 0);
REQUIRE(rf.enabled == 1);
REQUIRE(rf.maxCount == RebootFile::DEFAULT_MAX_BOOT_CNT);
REQUIRE(rf.img00Cnt == 0);
REQUIRE(rf.img01Cnt == 0);