mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 23:08:11 +00:00
Settings: add Home Pages visibility control
New "Home Pages" section in Settings lets the user toggle which pages appear in the home screen carousel. Settings and Messages are always shown; Clock, Recent, Radio, Bluetooth, Advert, GPS, Sensors, Tools and Shutdown can each be hidden individually. - NodePrefs: home_pages_mask uint16_t (bit per page, 0=all visible) - HomeScreen: isPageVisible/navPage skip hidden pages; dots indicator counts only visible pages; enforces visible page on re-entry - SettingsScreen: SECTION_HOME_PAGES with per-page ON/OFF toggles - DataStore: persisted at offset 1598 - Default: all pages visible (0x01FF) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -251,6 +251,9 @@ void DataStore::loadPrefsInt(const char *filename, NodePrefs& _prefs, double& no
|
||||
file.read((uint8_t *)&_prefs.ringtone_len, sizeof(_prefs.ringtone_len)); // 1564
|
||||
if (_prefs.ringtone_len > 32) _prefs.ringtone_len = 0;
|
||||
file.read((uint8_t *)_prefs.ringtone_notes, sizeof(_prefs.ringtone_notes)); // 1565
|
||||
if (file.available()) {
|
||||
file.read((uint8_t *)&_prefs.home_pages_mask, sizeof(_prefs.home_pages_mask)); // 1598
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -308,6 +311,7 @@ void DataStore::savePrefs(const NodePrefs& _prefs, double node_lat, double node_
|
||||
file.write((uint8_t *)&_prefs.ringtone_bpm_idx, sizeof(_prefs.ringtone_bpm_idx)); // 1563
|
||||
file.write((uint8_t *)&_prefs.ringtone_len, sizeof(_prefs.ringtone_len)); // 1564
|
||||
file.write((uint8_t *)_prefs.ringtone_notes, sizeof(_prefs.ringtone_notes)); // 1565
|
||||
file.write((uint8_t *)&_prefs.home_pages_mask, sizeof(_prefs.home_pages_mask)); // 1598
|
||||
|
||||
file.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user