mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-30 08:48:12 +00:00
feat: NearbyScreen, configurable clock dashboard, memory optimizations
- Add NearbyScreen: GPS contact list with haversine distance sort, type filter (ALL/Chat/Rpt/Room/Snsr), detail view with ping (RTT via ACK poll), node scan via advert(), context menu - Add DashboardConfigScreen: configure up to 3 data fields on the clock page (Battery, Temp, Humidity, Pressure, GPS, Altitude, Lux, CO2, Contacts); entered via long-press ENTER on clock page - Rework HP_CLOCK layout: full-screen clock (size 2 at y=0), date at y=19, separator at y=28, three data field rows at y=31/41/51; hide node name/battery indicator on clock page - Persist dashboard_fields[3] in NodePrefs and DataStore - Add isAckPending() to MyMesh for NearbyScreen ping detection - Wire NearbyScreen into ToolsScreen and UITask - Reduce NearbyScreen entry buffer from MAX_CONTACTS(100) to 32, saving ~3.3 KB RAM - Switch haversine/bearing math from double to float (sinf/cosf/atan2f), eliminating double libm and saving ~5-10 KB flash Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -266,6 +266,9 @@ void DataStore::loadPrefsInt(const char *filename, NodePrefs& _prefs, double& no
|
||||
file.read((uint8_t *)&_prefs.buzzer_auto, sizeof(_prefs.buzzer_auto));
|
||||
if (file.available()) {
|
||||
file.read((uint8_t *)_prefs.dm_notif, sizeof(_prefs.dm_notif));
|
||||
if (file.available()) {
|
||||
file.read((uint8_t *)_prefs.dashboard_fields, sizeof(_prefs.dashboard_fields));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -338,6 +341,7 @@ void DataStore::savePrefs(const NodePrefs& _prefs, double node_lat, double node_
|
||||
file.write((uint8_t *)&_prefs.clock_hide_seconds, sizeof(_prefs.clock_hide_seconds));
|
||||
file.write((uint8_t *)&_prefs.buzzer_auto, sizeof(_prefs.buzzer_auto));
|
||||
file.write((uint8_t *)_prefs.dm_notif, sizeof(_prefs.dm_notif));
|
||||
file.write((uint8_t *)_prefs.dashboard_fields, sizeof(_prefs.dashboard_fields));
|
||||
|
||||
file.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user