mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
The prefs schema-migration block runs on every SCHEMA_SENTINEL mismatch, and the "turn Favourites on" step was ungated. Since each firmware release bumps the sentinel, every update re-applied `home_pages_mask |= HP_FAVOURITES`, clobbering a user who had hidden it. Gate it to the transition that added Favourites (sentinel < 0xC0DE0002), matching the trail_units_idx migration. The Map/Trail carousel page shipped with no visibility toggle: pageBit(MAP) returned -1 so it was always visible with no Settings row. Add a proper "Map" toggle (new HPB_MAP/HP_MAP bit, pageBit/bitToPage cases, HOME_MAP settings row) plus a gated one-time migration (sentinel < 0xC0DE0018) that keeps it visible for upgraders. Bump SCHEMA_SENTINEL to 0xC0DE0018; page_order[] stays a literal 11 so the persisted layout is unchanged. Also fix the fresh-install seed, which used a stale 0x01FF literal that left Favourites hidden on new installs despite its "all pages visible" comment; seed NodePrefs::HP_ALL so fresh installs match upgraders (Favourites + Map). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>