diff --git a/examples/companion_radio/DataStore.cpp b/examples/companion_radio/DataStore.cpp index da249942..818523b4 100644 --- a/examples/companion_radio/DataStore.cpp +++ b/examples/companion_radio/DataStore.cpp @@ -428,7 +428,8 @@ void DataStore::loadPrefsInt(const char *filename, NodePrefs& _prefs, double& no if (_prefs.alarm_on > 1) _prefs.alarm_on = 0; if (_prefs.alarm_hour > 23) _prefs.alarm_hour = 0; if (_prefs.alarm_min > 59) _prefs.alarm_min = 0; - // → 0xC0DE0018: keyboard type (QWERTY/T9). + // → 0xC0DE001A: keyboard type (QWERTY/T9). Pre-0x1A files leave stray sentinel + // tail bytes here; clamp back to the QWERTY default (0). rd(&_prefs.keyboard_type, sizeof(_prefs.keyboard_type)); if (_prefs.keyboard_type > 1) _prefs.keyboard_type = 0; // Pre-0x10 files leave stray sentinel bytes here, same as a never-configured diff --git a/examples/companion_radio/NodePrefs.h b/examples/companion_radio/NodePrefs.h index 9dd559d7..e89a4605 100644 --- a/examples/companion_radio/NodePrefs.h +++ b/examples/companion_radio/NodePrefs.h @@ -351,7 +351,7 @@ struct NodePrefs { // persisted to file // adding/removing/reordering fields in DataStore::savePrefs/loadPrefsInt so // older saves are detected on load and skipped (zero-init defaults kept). // High 24 bits identify the file format; low byte is the schema revision. - static const uint32_t SCHEMA_SENTINEL = 0xC0DE0019; + static const uint32_t SCHEMA_SENTINEL = 0xC0DE001A; // Bit-index for each home page. Used by page_order (entries store bit+1) and // by home_pages_mask. Single source of truth — both HomeScreen::pageBit/bitToPage