From 8d85e318a75ff90a2df8a0b6c2e0de3c91599697 Mon Sep 17 00:00:00 2001 From: Sjef Verhoeven PE5PVB Date: Sat, 28 Oct 2023 23:37:50 +0200 Subject: [PATCH] More fixes and added eeprom space for BW and MS --- src/constants.h | 8 +++++--- src/gui.cpp | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/constants.h b/src/constants.h index 9674b25..2b3f30c 100644 --- a/src/constants.h +++ b/src/constants.h @@ -107,9 +107,9 @@ // EEPROM index defines #define EE_PRESETS_CNT 99 -#define EE_CHECKBYTE_VALUE 36 // 0 ~ 255,add new entry, change for new value +#define EE_CHECKBYTE_VALUE 37 // 0 ~ 255,add new entry, change for new value -#define EE_TOTAL_CNT 618 +#define EE_TOTAL_CNT 818 #define EE_UINT16_FREQUENCY_FM 0 #define EE_BYTE_VOLSET 4 #define EE_BYTE_STEREO 5 @@ -184,7 +184,9 @@ #define EE_BYTE_FASTPS 118 #define EE_BYTE_TOT 119 #define EE_PRESETS_BAND_START 120 -#define EE_PRESETS_START 220 +#define EE_PRESET_BW_START 220 +#define EE_PRESET_MS_START 320 +#define EE_PRESETS_START 420 #define EE_PRESETS_FREQUENCY 8750 // End of EEPROM index defines diff --git a/src/gui.cpp b/src/gui.cpp index 79b224a..de8227c 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -4,6 +4,7 @@ #include #include #include +#include byte menuitem; byte items[8] = {8, 3, 6, 10, 9, 10, 8, 5}; @@ -352,7 +353,9 @@ void BuildAFScreen() { PSold = " "; for (byte i = 0; i < 20; i++) eonpsold[i] = ""; for (byte i = 0; i < 20; i++) mappedfreqold[i] = 0; - for (byte i = 0; i < 20; i++) eonpicodeold[0][i] = '\0'; + for (byte i = 0; i < 20; i++) { + std::memset(eonpicodeold[i], '\0', sizeof(eonpicodeold[i])); + } } }