mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
feat(NearbyScreen): waypoint/navigate from list, TIME filter, addWaypoint helper
NearbyScreen: - Hold Enter on a list row now shows Navigate and Save waypoint directly, without entering the detail view first - TIME added as the last filter slot (LEFT/RIGHT cycles Fav→ALL→…→Snsr→TIME); time-sort shows age in right column and sorts by last-heard descending - Save waypoint also available from detail view Options menu UITask: - Extract addWaypoint() helper (two overloads: with/without explicit timestamp) consolidating the full()+add()+saveWaypoints()+alert pattern; TrailScreen and QuickMsgScreen updated to use it Fixes: - SoundNotifier.h: correct NodePrefs.h include path (../NodePrefs.h) - kbAddSensorPlaceholders: dereference _kb pointer in SettingsScreen, QuickMsgScreen and BotScreen (signature changed to KeyboardWidget&) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1964,6 +1964,21 @@ void UITask::saveWaypoints() {
|
||||
f.close();
|
||||
}
|
||||
|
||||
bool UITask::addWaypoint(int32_t lat, int32_t lon, uint32_t ts, const char* label) {
|
||||
if (_waypoints.full()) { showAlert("Waypoints full", 1000); return false; }
|
||||
if (_waypoints.add(lat, lon, ts, label)) {
|
||||
saveWaypoints();
|
||||
showAlert("Waypoint saved", 800);
|
||||
return true;
|
||||
}
|
||||
showAlert("Waypoints full", 1000);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool UITask::addWaypoint(int32_t lat, int32_t lon, const char* label) {
|
||||
return addWaypoint(lat, lon, (uint32_t)rtc_clock.getCurrentTime(), label);
|
||||
}
|
||||
|
||||
char UITask::checkDisplayOn(char c) {
|
||||
if (_display != NULL) {
|
||||
if (!_display->isOn()) {
|
||||
|
||||
Reference in New Issue
Block a user