mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
fix(prefs): bump schema sentinel for keyboard_type field (PR #21)
keyboard_type was inserted into the append-only NodePrefs layout without bumping SCHEMA_SENTINEL, leaving it at 0xC0DE0019 — the same value plain main already uses without this field. A device already on that schema would silently misalign every field read after alarm_min once updated to a build containing this change. Bump to 0xC0DE001A and fix the migration comment's stale version label (it said 0xC0DE0018, which was already taken by the MAP home-page migration). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user