Add route filter screen with airport name lookup

This commit is contained in:
2026-08-15 22:09:09 +02:00
parent d89fba5200
commit aae8890942
12 changed files with 441 additions and 20 deletions

View File

@@ -12,6 +12,7 @@
#include "airline_filter_screen.h"
#include "aircraft_watchlist_screen.h"
#include "aircraft_list_screen.h"
#include "route_filter_screen.h"
#include "about_screen.h"
#include "brightness_screen.h"
#include "timeout_screen.h"
@@ -70,7 +71,7 @@ namespace {
// die normale rowRect()-Hoehe (22px) liess bei 13 Eintraegen schon keinen
// Platz mehr fuer einen weiteren - andere Seiten (Region/System) bleiben
// bei der normalen Hoehe unveraendert, um dort nichts zu verschieben.
constexpr int16_t FLIGHT_ROW_H = 20;
constexpr int16_t FLIGHT_ROW_H = 19;
Rect flightRowRect(uint8_t index) {
return {10, (int16_t)(ROW_START_Y + index * (FLIGHT_ROW_H + ROW_GAP)),
(int16_t)(Config::SCREEN_WIDTH - 20), FLIGHT_ROW_H};
@@ -821,14 +822,15 @@ void run(TFT_eSPI& tft) {
Rect logFilesBtn = flightRowRect(3);
Rect locationBtn = flightRowRect(4);
Rect airlineBtn = flightRowRect(5);
Rect watchlistBtn = flightRowRect(6);
Rect heartbeatBtn = flightRowRect(7);
Rect emergencyBtn = flightRowRect(8);
Rect proximityBtn = flightRowRect(9);
Rect logbookBtn = flightRowRect(10);
Rect watchlistAlertBtn = flightRowRect(11);
Rect groundBtn = flightRowRect(12);
Rect backBtn = flightRowRect(13);
Rect watchlistBtn = flightRowRect(6);
Rect routeFilterBtn = flightRowRect(7);
Rect heartbeatBtn = flightRowRect(8);
Rect emergencyBtn = flightRowRect(9);
Rect proximityBtn = flightRowRect(10);
Rect logbookBtn = flightRowRect(11);
Rect watchlistAlertBtn = flightRowRect(12);
Rect groundBtn = flightRowRect(13);
Rect backBtn = flightRowRect(14);
drawButton(tft, aircraftListBtn, I18n::t(StringId::MENU_AIRCRAFT_LIST));
drawButton(tft, statsBtn, I18n::t(StringId::MENU_STATISTICS));
@@ -836,7 +838,8 @@ void run(TFT_eSPI& tft) {
drawButton(tft, logFilesBtn, I18n::t(StringId::MENU_LOGBOOK_FILES));
drawButton(tft, locationBtn, I18n::t(StringId::MENU_LOCATION_PRESETS));
drawButton(tft, airlineBtn, I18n::t(StringId::MENU_AIRLINE_FILTER));
drawButton(tft, watchlistBtn, I18n::t(StringId::MENU_WATCHLIST));
drawButton(tft, watchlistBtn, I18n::t(StringId::MENU_WATCHLIST));
drawButton(tft, routeFilterBtn, I18n::t(StringId::MENU_ROUTE_FILTER));
drawButton(tft, heartbeatBtn, I18n::t(StringId::MENU_LED_HEARTBEAT) + onOff(SettingsStore::ledHeartbeatEnabled()));
drawButton(tft, emergencyBtn, I18n::t(StringId::MENU_EMERGENCY_ALERT) + onOff(SettingsStore::emergencyAlertEnabled()));
drawButton(tft, proximityBtn, I18n::t(StringId::MENU_PROXIMITY_LED) + onOff(SettingsStore::proximityAlertEnabled()));
@@ -869,8 +872,10 @@ void run(TFT_eSPI& tft) {
LocationPresetsScreen::run(tft);
} else if (airlineBtn.contains(tap.x, tap.y)) {
AirlineFilterScreen::run(tft);
} else if (watchlistBtn.contains(tap.x, tap.y)) {
} else if (watchlistBtn.contains(tap.x, tap.y)) {
AircraftWatchlistScreen::run(tft);
} else if (routeFilterBtn.contains(tap.x, tap.y)) {
RouteFilterScreen::run(tft);
} else if (heartbeatBtn.contains(tap.x, tap.y)) {
SettingsStore::setLedHeartbeatEnabled(!SettingsStore::ledHeartbeatEnabled());
} else if (emergencyBtn.contains(tap.x, tap.y)) {