refactor(prefs): 2.0 settings layout -- fields in their sections, rc1 conversion and dead font flag gone

PREFS_VERSION 2: settings saved by 2.0-rc1..rc3 are not read, the device
starts from the defaults (v1.x /new_prefs is still imported as before).
The fields appended at the end during the rc cycle move into their
sections (BLE off, battery curve, text/icon size, message alert, advert
position precision, lock screen look). ch_scope_follow and its rc1
conversion and the unused use_lemon_font are removed. Stale comments in
NodePrefs.h and Trail.h fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-12 20:36:42 +02:00
co-authored by Claude Opus 5.5
parent b9735b089e
commit a7b1c3417b
3 changed files with 30 additions and 54 deletions
-6
View File
@@ -308,7 +308,6 @@ static void sanitize(NodePrefs& p) {
flag(p.bot_room_enabled, 0);
if (p.bot_quiet_start > 23) p.bot_quiet_start = 0;
if (p.bot_quiet_end > 23) p.bot_quiet_end = 0;
flag(p.use_lemon_font, 0);
flag(p.units_imperial, 0);
flag(p.trail_show_pace, 0);
if (p.advert_sound_scope > 1) p.advert_sound_scope = ADVERT_SOUND_SCOPE_ALL;
@@ -340,11 +339,6 @@ static void sanitize(NodePrefs& p) {
if (p.ui_text_scale == 0) p.ui_text_scale = EINK_FONT_SCALE;
#endif
if (p.ui_icon_scale > NodePrefs::UI_ICON_SCALE_MAX) p.ui_icon_scale = 0;
if (!p.ch_scope_follow) {
for (uint8_t i = 0; i < NodePrefs::MAX_SCOPED_CHANNELS; i++)
if (p.ch_scope_idx[i] == 0) p.ch_scope_idx[i] = NodePrefs::CH_SCOPE_DEFAULT;
p.ch_scope_follow = 1;
}
}
// The settings a firmware before 2.0 kept in /new_prefs that still matter