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:
Jakub
2026-06-09 15:09:57 +02:00
parent 5c86b85ec3
commit e6f8fb99c7
8 changed files with 91 additions and 43 deletions

View File

@@ -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()) {