From a4e0e2607686db699ed5c8556067a80f91c3fa6e Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Wed, 21 Feb 2024 10:43:50 +0100 Subject: [PATCH] add more settings --- src/settings.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/settings.h b/src/settings.h index cd0f786..de7154e 100644 --- a/src/settings.h +++ b/src/settings.h @@ -2,15 +2,17 @@ #include "pico/flash.h" -const uint16_t MAGIC_NUMBER = 2; +const uint16_t MAGIC_NUMBER = 3; enum class Mode : uint8_t { IambicA = 0, IambicB, Straight }; struct Settings { uint16_t magic_number {MAGIC_NUMBER}; // Bytes: 2 Mode mode {Mode::IambicB}; // Bytes: 1 - uint8_t wpm {18}; // Bytes: 1 - uint8_t dummy[FLASH_PAGE_SIZE - 4] {0}; // Sum : 4 + uint8_t wpm {0}; // Bytes: 1 + uint8_t wpmPotiMin {5}; // Bytes: 1 + uint8_t wpmPotiMax {55}; // Bytes: 1 + uint8_t dummy[FLASH_PAGE_SIZE - 6] {0}; // Sum : 6 }; void store_settings(Settings &settings);