mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-14 23:26:38 +00:00
NodePrefs.h's field declaration order used to just be historical append order (on-disk format is defined solely by DataStore's explicit rd()/wr() sequence, not struct layout), making the file hard to navigate. Reordered fields into thematic groups (radio, repeater, bot, GPS/trail/location, display/keyboard, etc.) with no on-disk/schema change; fixed two comments that had gone stale (favourite_contacts/_kinds' [del→...] tags only named one of the two handlers that actually clear them; dashboard_fields was miscategorized under favourites). sizeof(NodePrefs) shifted twice as a side effect of packing (2760→2752→2760) — verified via real builds on all four canonical envs and re-checked against the serialization tripwire. Also replaced test_companion_node_prefs.cpp's dead body (a disabled test against a saveSerial/loadSerial API this struct never got) with real coverage of the pure helper functions NodePrefs.h already carries -- band bucketing, repeater-profile bounds, alarm-repeat round-trip, and every option-lookup table, including their inconsistent out-of-range fallback behaviour. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>