diff --git a/CHANGELOG.md b/CHANGELOG.md index 6016aeb..0052d51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Änderungen +## v0.5.1-dev + +- **Ortsname bei Fahrtzielen:** Der Ort einer Haltestelle kommt jetzt aus der VVO-Suche und wird gespeichert. Bisher galt das erste Wort des Haltestellennamens als Ort; bei „S-Bahnhof Reick“ wurde so „S-Bahnhof“ als Ort angenommen, „Dresden Flughafen“ blieb ungekürzt und der Titel lautete nur „Reick“. Ohne gespeicherten Ort gilt weiter Dresden. Wer die Haltestelle vor v0.5.1 gewählt hat, sucht sie einmal neu aus, damit auch Haltestellen außerhalb Dresdens den richtigen Ort bekommen. +- **3-Tage-Vorhersage:** Die Wetteransicht wechselt alle 8 Sekunden zwischen heute und den nächsten drei Tagen (Wochentag, Symbol, Höchst-/Tiefstwert, Regen). Abschaltbar im Wetter-Reiter. +- **Webinterface aufgeräumt:** Reiter in einer wischbaren Zeile, Rotation einzeilig mit Knopf ▶ „Jetzt anzeigen“, roter Punkt am Speichern-Knopf bei ungespeicherten Änderungen, Koordinaten und lange Hinweise eingeklappt, inaktive Countdowns eingeklappt, Links im Akzentgelb. +- **Arbeitsspeicher:** etwa 3 KB fester Texte und Tabellen (Webserver-Antworten, Airline- und Flugzeugtypnamen, deutsche Wetterbezeichnungen) liegen jetzt im Flash. + ## v0.5.0-dev - **Neuer Name: PixelStop.** Repository, Firmware-Name, Setup-WLAN (`PixelStop-Setup`), Standard-Hostname (`pixelstop`), User-Agent und Dateinamen. Gespeicherte Hostnamen bleiben erhalten. diff --git a/README.en.md b/README.en.md index b0cd8a5..f5abaa7 100644 --- a/README.en.md +++ b/README.en.md @@ -6,7 +6,7 @@ Bought as a small Wi-Fi cube with a rather modest stock firmware – and from day one with the plan to turn it into something of my own. [![Build](https://github.com/du13500/pixelstop/actions/workflows/build.yml/badge.svg)](https://github.com/du13500/pixelstop/actions/workflows/build.yml) -![Version](https://img.shields.io/badge/version-v0.5.0--dev-orange) +![Version](https://img.shields.io/badge/version-v0.5.1--dev-orange) ![Hardware](https://img.shields.io/badge/hardware-ESP8266%20%C2%B7%20SmallTV--Ultra-blue) ![Hardware test](https://img.shields.io/badge/hardware%20test-v0.5.0%20pending-yellow) ![Hobby project](https://img.shields.io/badge/hobby%20project-non--commercial-lightgrey) @@ -25,7 +25,7 @@ The cube shows, in rotation or permanently: | View | What you see | | --- | --- | | **Departures** | Live departures of a stop of Verkehrsverbund Oberelbe (VVO, Dresden region): line, destination, minutes, delays and cancellations; up to ten departures on two pages, filter by mode of transport | -| **Weather** | Current temperature, day/night weather icon, high and low, chance of rain, sunrise and sunset; °C or °F | +| **Weather** | Current temperature, day/night weather icon, high and low, chance of rain, sunrise and sunset, alternating with a 3-day forecast; °C or °F | | **Flight radar** | The nearest aircraft within the chosen radius: callsign, airline, route, type, registration, distance and altitude | | **Clock** | Time and date with a selectable time zone | | **Flight tracker** | One specific flight with scheduled and actual times and live altitude (your own aviationstack key required) | @@ -38,9 +38,9 @@ Plus night mode, brightness down to 1 %, place search with a map, Greek and Cyri | | | | | :---: | :---: | :---: | | Departures
Departures · Dresden Hauptbahnhof with a delay (yellow) and a cancellation (✕) | Weather
Weather · Brooklyn in °F | Flight radar
Flight radar · Emirates A380 from Dubai to Frankfurt | -| Flight tracker
Flight tracker · one flight with scheduled and actual times | Clock
Clock · with time zone | Countdown
Countdown · in days or as a timer | +| Flight tracker
Flight tracker · one flight with scheduled and actual times | 3-day forecast
Forecast · the next three days | Countdown
Countdown · in days or as a timer | -## Status: v0.5.0-dev +## Status: v0.5.1-dev | Area | Status | | --- | --- | @@ -48,8 +48,8 @@ Plus night mode, brightness down to 1 %, place search with a map, Greek and Cyri | Flight radar over HTTP/1.1, pauses on rejected requests | ✅ confirmed on hardware (v0.4.14.7) | | Radar only while visible, daily budget without a key | ✅ running on hardware (v0.4.14.8), long-term observation ongoing | | Backlight at 1 % without flashes | ✅ much improved (v0.4.14.6) | -| German/English language switch | ⏳ hardware test pending | -| Abbreviated destinations, omitting the town name | ⏳ hardware test pending | +| German/English language switch, abbreviated destinations | ✅ confirmed on hardware (v0.5.0) | +| 3-day forecast, tidier web interface, “Show now” | ⏳ hardware test pending | | Flight tracker with your own aviationstack key | ⏳ not fully tested on hardware | All changes are listed in [`CHANGELOG.md`](CHANGELOG.md) (German), open checks in [`ROADMAP.md`](ROADMAP.md). diff --git a/README.md b/README.md index b9b676d..db0f1fd 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Gekauft als kleiner WLAN-Würfel mit eher bescheidener Werksfirmware – und von Anfang an mit dem Plan, etwas Eigenes daraus zu machen. [![Build](https://github.com/du13500/pixelstop/actions/workflows/build.yml/badge.svg)](https://github.com/du13500/pixelstop/actions/workflows/build.yml) -![Version](https://img.shields.io/badge/version-v0.5.0--dev-orange) +![Version](https://img.shields.io/badge/version-v0.5.1--dev-orange) ![Hardware](https://img.shields.io/badge/hardware-ESP8266%20%C2%B7%20SmallTV--Ultra-blue) ![Hardwaretest](https://img.shields.io/badge/hardwaretest-v0.5.0%20offen-yellow) ![Hobbyprojekt](https://img.shields.io/badge/hobbyprojekt-nicht%20kommerziell-lightgrey) @@ -25,7 +25,7 @@ Der Würfel zeigt im Wechsel oder dauerhaft: | Ansicht | Was du siehst | | --- | --- | | **Abfahrten** | Live-Abfahrten einer Haltestelle des Verkehrsverbunds Oberelbe (VVO): Linie, Ziel, Minuten, Verspätungen und Ausfälle; bis zu zehn Abfahrten auf zwei Seiten, Filter nach Verkehrsmittel | -| **Wetter** | Aktuelle Temperatur, Wetterbild für Tag und Nacht, Höchst- und Tiefstwert, Regenwahrscheinlichkeit, Sonnenauf- und -untergang; °C oder °F | +| **Wetter** | Aktuelle Temperatur, Wetterbild für Tag und Nacht, Höchst- und Tiefstwert, Regenwahrscheinlichkeit, Sonnenauf- und -untergang, im Wechsel eine 3-Tage-Vorhersage; °C oder °F | | **Flugradar** | Das nächste Flugzeug im gewählten Umkreis: Callsign, Airline, Route, Typ, Kennzeichen, Entfernung und Höhe | | **Uhr** | Uhrzeit und Datum mit wählbarer Zeitzone | | **Flug-Tracker** | Ein bestimmter Flug mit Plan- und Ist-Zeiten und Live-Höhe (eigener aviationstack-Schlüssel nötig) | @@ -38,9 +38,9 @@ Dazu kommen Nachtmodus, Helligkeit ab 1 %, Ortssuche mit Karte, griechische und | | | | | :---: | :---: | :---: | | Abfahrten
Abfahrten · Dresden Hauptbahnhof, mit Verspätung (gelb) und Ausfall (✕) | Wetter
Wetter · Brooklyn in °F | Flugradar
Flugradar · Emirates A380 von Dubai nach Frankfurt | -| Flug-Tracker
Flug-Tracker · ein Flug mit Plan- und Ist-Zeiten | Uhr
Uhr · mit Zeitzone | Countdown
Countdown · in Tagen oder als Timer | +| Flug-Tracker
Flug-Tracker · ein Flug mit Plan- und Ist-Zeiten | 3-Tage-Vorhersage
Vorhersage · die nächsten drei Tage | Countdown
Countdown · in Tagen oder als Timer | -## Entwicklungsstand: v0.5.0-dev +## Entwicklungsstand: v0.5.1-dev | Bereich | Stand | | --- | --- | @@ -48,8 +48,8 @@ Dazu kommen Nachtmodus, Helligkeit ab 1 %, Ortssuche mit Karte, griechische und | Flugradar über HTTP/1.1, Pausen bei abgelehnten Anfragen | ✅ auf Hardware bestätigt (v0.4.14.7) | | Radar nur bei sichtbarer Ansicht, Tagesbudget ohne Schlüssel | ✅ läuft auf Hardware (v0.4.14.8), Langzeitbeobachtung läuft | | Hintergrundbeleuchtung bei 1 % ohne Aufblitzen | ✅ deutlich besser (v0.4.14.6) | -| Sprachumschaltung Deutsch/Englisch | ⏳ Hardwaretest offen | -| Abgekürzte Fahrtziele, Ortsname weglassen | ⏳ Hardwaretest offen | +| Sprachumschaltung Deutsch/Englisch, abgekürzte Fahrtziele | ✅ auf Hardware bestätigt (v0.5.0) | +| 3-Tage-Vorhersage, aufgeräumtes Webinterface, „Jetzt anzeigen“ | ⏳ Hardwaretest offen | | Flug-Tracker mit eigenem aviationstack-Schlüssel | ⏳ nicht vollständig auf Hardware getestet | Alle Änderungen stehen in [`CHANGELOG.md`](CHANGELOG.md), offene Prüfungen in [`ROADMAP.md`](ROADMAP.md). diff --git a/ROADMAP.md b/ROADMAP.md index 8fd535e..9b3d230 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -4,7 +4,7 @@ Stand: 06.11.2026. Erledigtes steht in [`CHANGELOG.md`](CHANGELOG.md). ## Nächste Prüfungen auf dem Gerät -- **v0.5.0-dev:** Sprachumschaltung (Display und Webinterface), abgekürzte Fahrtziele und Ortsname weglassen, Startbildschirm, Setup-WLAN „PixelStop-Setup“; Flash- und RAM-Belegung aus `build.log` notieren. +- **v0.5.1-dev:** 3-Tage-Vorhersage (Seitenwechsel, Wochentage, Fahrenheit), „Jetzt anzeigen“, ungespeichert-Hinweis, Haltestelle neu wählen und Ortsnamen prüfen (z. B. S-Bahnhof Reick). - **Flugradar:** Langzeittest über mehrere Tage mit Rotation; Anfragezähler „adsb.lol heute“ beobachten. Budgetwerte (`src/RadarBudget.h`) anpassen, sobald adsb.lol genaue Zahlen nennt (Limit, Reset-Zeitpunkt, Zählung von Fehlern und Routen). Freien Speicher während der Abfrage im Blick behalten (ca. 5 KB bei 4-KB-TLS-Puffer). - **Wetter:** Exception 29 beim Programmwechsel ist seit den Speicherkorrekturen nicht wieder aufgetreten; im Langzeittest weiter beobachten. - **Zeitzone, Sommerzeit, Nachtmodus:** gezielt prüfen, spätestens bei der Zeitumstellung Ende März. @@ -16,8 +16,8 @@ Stand: 06.11.2026. Erledigtes steht in [`CHANGELOG.md`](CHANGELOG.md). | Version | Inhalt | | --- | --- | -| **v0.5.0** | PixelStop, Deutsch/Englisch, Fahrtziele, neue README – nach dem Hardwaretest taggen | -| **v0.5.1** | Webinterface aufräumen: Rotation einzeilig, Reiterleiste in einer Zeile, Hinweis auf ungespeicherte Änderungen, Erklärtexte einklappbar, Countdowns kompakter, Koordinaten unter „Erweitert“; Knopf „Jetzt anzeigen“ je Programm; 3-Tage-Vorhersage | +| **v0.5.0** | PixelStop, Deutsch/Englisch, Fahrtziele, neue README – auf Hardware bestätigt | +| **v0.5.1** | Webinterface aufgeräumt, „Jetzt anzeigen“, 3-Tage-Vorhersage, Ort der Haltestelle aus der VVO-Suche, Texte im Flash – in Arbeit, nach dem Hardwaretest taggen | | **v0.5.2** | Warnungen: Bevölkerungsschutz (NINA) und DWD-Wetterwarnungen, einzeln aktivierbar, regional gefiltert, mehrere nacheinander; optional Unterbrechung der Rotation | | **v0.6.0** | Abfahrten über Anbieter: VVO, Transitous (deutschlandweit inkl. Bahn), danach weitere Verbünde; Haltestellensuche im Browser | | **v0.7.0** | Optionaler moderner Anzeigestil mit echten Schriften und neuem Layout, vorher als Entwurf mit `tools/render_screens.py` | @@ -28,6 +28,8 @@ Stand: 06.11.2026. Erledigtes steht in [`CHANGELOG.md`](CHANGELOG.md). - **Fotos** (einzelne JPGs aus dem Dateisystem), eventuell eigene Wetterbilder. - **Eigene Ersetzungen für Fahrtziele** im Webinterface. - **Englische Diagnosetexte.** +- **Variante „Wetter & Uhr“** aus demselben Code: ohne Abfahrten, Radar und Tracker, dafür eine moderne Wetterkachel mit Meteocons (MIT) losgelöst vom Pixel-Design. +- **Titelbild für README und GitHub-Vorschau** (KI-Motiv war technisch nicht stimmig, vorerst zurückgestellt). - **ESP32-Umbau** des SmallTV mit vorhandenem Display als Experiment (Pinbelegung, Stromversorgung, Platz, Portierung). ## Bewusst verworfen diff --git a/docs/screens/en/uebersicht.png b/docs/screens/en/uebersicht.png index 7f30808..7790e4f 100644 Binary files a/docs/screens/en/uebersicht.png and b/docs/screens/en/uebersicht.png differ diff --git a/docs/screens/en/vorhersage.png b/docs/screens/en/vorhersage.png new file mode 100644 index 0000000..664addf Binary files /dev/null and b/docs/screens/en/vorhersage.png differ diff --git a/docs/screens/uebersicht.png b/docs/screens/uebersicht.png index efc50bf..03a3037 100644 Binary files a/docs/screens/uebersicht.png and b/docs/screens/uebersicht.png differ diff --git a/docs/screens/vorhersage.png b/docs/screens/vorhersage.png new file mode 100644 index 0000000..906dfcc Binary files /dev/null and b/docs/screens/vorhersage.png differ diff --git a/package-lock.json b/package-lock.json index b7fa36f..c12bb2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pixelstop-checks", - "version": "0.5.0-dev", + "version": "0.5.1-dev", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pixelstop-checks", - "version": "0.5.0-dev", + "version": "0.5.1-dev", "devDependencies": { "playwright": "1.62.1" } diff --git a/package.json b/package.json index f585854..5fafbcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixelstop-checks", - "version": "0.5.0-dev", + "version": "0.5.1-dev", "private": true, "scripts": { "test:webui": "node tests/webui.cjs" diff --git a/src/Flight.cpp b/src/Flight.cpp index e7563cd..335ff35 100644 --- a/src/Flight.cpp +++ b/src/Flight.cpp @@ -71,37 +71,40 @@ static float distanceKm(float lat1, float lon1, float lat2, float lon2) { return sqrtf(dLat*dLat + dLon*dLon); } -static const char* airlineFor(const char* cs) { - if (!cs || strlen(cs) < 3) return ""; - struct M { const char* p; const char* n; }; - static const M map[] = { - {"EWG","Eurowings"},{"DLH","Lufthansa"},{"RYR","Ryanair"},{"EJU","easyJet"}, - {"EZY","easyJet"},{"CFG","Condor"},{"WZZ","Wizz Air"},{"TVS","Smartwings"}, - {"AUA","Austrian"},{"SWR","SWISS"},{"KLM","KLM"},{"AFR","Air France"}, - {"BAW","British Airways"},{"LOT","LOT"},{"SAS","SAS"},{"THY","Turkish Airlines"}, - {"BEL","Brussels Airlines"},{"UAE","Emirates"},{"QTR","Qatar Airways"},{"EXS","Jet2"}, - {"TUI","TUI"},{"ITY","ITA Airways"},{"IBE","Iberia"},{"VLG","Vueling"} - }; - for (const auto& m : map) if (!strncmp(cs, m.p, 3)) return m.n; - return ""; -} +// Fallback names for common airlines and aircraft types. The tables live in +// flash (PROGMEM) and the match is copied into the caller's buffer. +struct NameEntry4 { char key[5]; char name[20]; }; +static const NameEntry4 AIRLINE_NAMES[] PROGMEM = { + {"EWG","Eurowings"},{"DLH","Lufthansa"},{"RYR","Ryanair"},{"EJU","easyJet"}, + {"EZY","easyJet"},{"CFG","Condor"},{"WZZ","Wizz Air"},{"TVS","Smartwings"}, + {"AUA","Austrian"},{"SWR","SWISS"},{"KLM","KLM"},{"AFR","Air France"}, + {"BAW","British Airways"},{"LOT","LOT"},{"SAS","SAS"},{"THY","Turkish Airlines"}, + {"BEL","Brussels Airlines"},{"UAE","Emirates"},{"QTR","Qatar Airways"},{"EXS","Jet2"}, + {"TUI","TUI"},{"ITY","ITA Airways"},{"IBE","Iberia"},{"VLG","Vueling"} +}; +static const NameEntry4 TYPE_NAMES[] PROGMEM = { + {"A20N","Airbus A320neo"},{"A21N","Airbus A321neo"},{"A320","Airbus A320"}, + {"A321","Airbus A321"},{"A319","Airbus A319"},{"A318","Airbus A318"}, + {"A359","Airbus A350-900"},{"A35K","Airbus A350-1000"},{"A333","Airbus A330-300"}, + {"A332","Airbus A330-200"},{"B738","Boeing 737-800"},{"B737","Boeing 737-700"}, + {"B38M","Boeing 737 MAX 8"},{"B39M","Boeing 737 MAX 9"},{"B788","Boeing 787-8"}, + {"B789","Boeing 787-9"},{"B772","Boeing 777-200"},{"B77W","Boeing 777-300ER"}, + {"E190","Embraer E190"},{"E195","Embraer E195"},{"E290","Embraer E190-E2"}, + {"E295","Embraer E195-E2"},{"CRJ9","CRJ900"},{"BCS1","Airbus A220-100"}, + {"BCS3","Airbus A220-300"},{"AT76","ATR 72-600"},{"DH8D","Dash 8 Q400"} +}; -static const char* typeNameFor(const char* t) { - if (!t || !*t) return ""; - struct M { const char* c; const char* n; }; - static const M map[] = { - {"A20N","Airbus A320neo"},{"A21N","Airbus A321neo"},{"A320","Airbus A320"}, - {"A321","Airbus A321"},{"A319","Airbus A319"},{"A318","Airbus A318"}, - {"A359","Airbus A350-900"},{"A35K","Airbus A350-1000"},{"A333","Airbus A330-300"}, - {"A332","Airbus A330-200"},{"B738","Boeing 737-800"},{"B737","Boeing 737-700"}, - {"B38M","Boeing 737 MAX 8"},{"B39M","Boeing 737 MAX 9"},{"B788","Boeing 787-8"}, - {"B789","Boeing 787-9"},{"B772","Boeing 777-200"},{"B77W","Boeing 777-300ER"}, - {"E190","Embraer E190"},{"E195","Embraer E195"},{"E290","Embraer E190-E2"}, - {"E295","Embraer E195-E2"},{"CRJ9","CRJ900"},{"BCS1","Airbus A220-100"}, - {"BCS3","Airbus A220-300"},{"AT76","ATR 72-600"},{"DH8D","Dash 8 Q400"} - }; - for (const auto& m : map) if (!strcmp(t, m.c)) return m.n; - return t; +// Copies the name for `key` (first `keyLen` chars, 0 = whole key) or `fallback`. +static void nameFromTable(const NameEntry4* table, size_t count, const char* key, size_t keyLen, + const char* fallback, char* out, size_t cap) { + if (key && *key) { + for (size_t i = 0; i < count; i++) { + NameEntry4 e; memcpy_P(&e, &table[i], sizeof(e)); + bool hit = keyLen ? (strlen(key) >= keyLen && !strncmp(key, e.key, keyLen)) : !strcmp(key, e.key); + if (hit) { strlcpy(out, e.name, cap); return; } + } + } + strlcpy(out, fallback ? fallback : "", cap); } static RoutePoint jsonPoint(JsonObjectConst o,const char* latKey,const char* lonKey) { @@ -395,8 +398,8 @@ bool flightFetch(float homeLat, float homeLon, uint16_t radiusKm) { strlcpy(next.registration, a["r"] | "", sizeof(next.registration)); strlcpy(next.category,a["category"]|"",sizeof(next.category)); strlcpy(next.typeCode, a["t"] | "", sizeof(next.typeCode)); - strlcpy(next.typeName, typeNameFor(next.typeCode), sizeof(next.typeName)); - strlcpy(next.airline, airlineFor(next.callsign), sizeof(next.airline)); + nameFromTable(TYPE_NAMES, sizeof(TYPE_NAMES)/sizeof(TYPE_NAMES[0]), next.typeCode, 0, next.typeCode, next.typeName, sizeof(next.typeName)); + nameFromTable(AIRLINE_NAMES, sizeof(AIRLINE_NAMES)/sizeof(AIRLINE_NAMES[0]), next.callsign, 3, "", next.airline, sizeof(next.airline)); next.onGround=a["alt_baro"].is()&&!strcmp(a["alt_baro"].as(),"ground"); next.altitudeKnown=a["alt_baro"].is(); next.altitudeFt=next.altitudeKnown?(int32_t)lroundf(a["alt_baro"].as()):0; diff --git a/src/Version.h b/src/Version.h index a012cb6..76bb3ac 100644 --- a/src/Version.h +++ b/src/Version.h @@ -1,6 +1,6 @@ #pragma once // Single place for name and version; every User-Agent is built from it. #define FW_NAME "PixelStop" -#define FW_VERSION "0.5.0-dev" +#define FW_VERSION "0.5.1-dev" #define FW_REPO "github.com/du13500/pixelstop" #define FW_USER_AGENT FW_NAME "/" FW_VERSION " (+https://" FW_REPO ")" diff --git a/src/Weather.cpp b/src/Weather.cpp index a1c58a6..46dba42 100644 --- a/src/Weather.cpp +++ b/src/Weather.cpp @@ -71,9 +71,9 @@ bool weatherFetch(float lat, float lon, const char* timeZone) { url += F("&longitude="); url += String(lon, 4); url += F("¤t=temperature_2m,weather_code,is_day"); - url += F("&daily=temperature_2m_max,temperature_2m_min,precipitation_probability_max,sunrise,sunset"); + url += F("&daily=temperature_2m_max,temperature_2m_min,precipitation_probability_max,weather_code,sunrise,sunset"); String zone=timeZone;zone.replace("/","%2F"); - url += F("&timezone=");url += zone;url += F("&forecast_days=1"); + url += F("&timezone=");url += zone;url += F("&forecast_days=4"); if (!http.begin(client, url)) { g_w.error = true; return false; } http.addHeader("Accept", "application/json"); @@ -93,6 +93,7 @@ bool weatherFetch(float lat, float lon, const char* timeZone) { filter["daily"]["temperature_2m_max"][0] = true; filter["daily"]["temperature_2m_min"][0] = true; filter["daily"]["precipitation_probability_max"][0] = true; + filter["daily"]["weather_code"][0] = true; filter["daily"]["sunrise"][0] = true; filter["daily"]["sunset"][0] = true; @@ -119,6 +120,14 @@ bool weatherFetch(float lat, float lon, const char* timeZone) { next.rainPct = doc["daily"]["precipitation_probability_max"][0] | -1; hhmm(doc["daily"]["sunrise"][0] | (const char*)nullptr, next.sunrise); hhmm(doc["daily"]["sunset"][0] | (const char*)nullptr, next.sunset); + for (uint8_t i = 1; i <= 3; i++) { + JsonVariantConst hi = doc["daily"]["temperature_2m_max"][i], lo = doc["daily"]["temperature_2m_min"][i]; + if (hi.isNull() || lo.isNull()) break; + WeatherSnapshot::Day& d = next.day[next.days++]; + d.highC = hi.as(); d.lowC = lo.as(); + d.code = doc["daily"]["weather_code"][i] | 0; + d.rainPct = doc["daily"]["precipitation_probability_max"][i] | -1; + } g_w = next; g_lastOkMs = millis(); trace.finish(true); diff --git a/src/Weather.h b/src/Weather.h index 5f1cbf9..89e4d0e 100644 --- a/src/Weather.h +++ b/src/Weather.h @@ -12,6 +12,9 @@ struct WeatherSnapshot { bool isDay; char sunrise[6]; char sunset[6]; + // Next three days (tomorrow first); `days` says how many are filled. + uint8_t days; + struct Day { float highC; float lowC; int16_t code; int16_t rainPct; } day[3]; }; void weatherReset(); @@ -19,4 +22,4 @@ bool weatherPollDue(uint16_t pollSec); bool weatherFetch(float lat, float lon, const char* timeZone = "Europe/Berlin"); const WeatherSnapshot& weatherData(); uint32_t weatherLastOkMs(); -const char* weatherLabel(int code); +const char* weatherLabel(int code); // flash string: use FPSTR() diff --git a/src/WeatherVisual.h b/src/WeatherVisual.h index d8631fb..e0fa92b 100644 --- a/src/WeatherVisual.h +++ b/src/WeatherVisual.h @@ -1,5 +1,13 @@ #pragma once #include +// Labels are kept in flash on the device (PSTR): read them with FPSTR()/ +// String(FPSTR(...)), never as plain RAM strings. +#ifndef PSTR +#define PSTR(x) (x) +#endif +#ifndef PGM_P +#define PGM_P const char* +#endif enum WeatherMotif : uint8_t { WX_CLEAR, WX_PARTLY, WX_CLOUD, WX_FOG, WX_DRIZZLE, WX_RAIN, WX_FREEZING_DRIZZLE, WX_FREEZING_RAIN, WX_SNOW, WX_GRAINS, @@ -8,45 +16,39 @@ enum WeatherMotif : uint8_t { struct WeatherVisual { WeatherMotif motif; uint8_t intensity; const char* label; }; static inline WeatherVisual weatherVisual(int code) { switch (code) { - case 0: return {WX_CLEAR,0,"KLAR"}; - case 1: return {WX_CLEAR,0,"HEITER"}; - case 2: return {WX_PARTLY,0,"WOLKIG"}; - case 3: return {WX_CLOUD,0,"BEWÖLKT"}; - case 45: return {WX_FOG,0,"NEBEL"}; - case 48: return {WX_FOG,0,"REIFNEBEL"}; - case 51: return {WX_DRIZZLE,1,"LEICHTER NIESEL"}; - case 53: return {WX_DRIZZLE,2,"MÄSSIGER NIESEL"}; - case 55: return {WX_DRIZZLE,3,"DICHTER NIESEL"}; - case 56: return {WX_FREEZING_DRIZZLE,1,"GEFRIERENDER NIESEL"}; - case 57: return {WX_FREEZING_DRIZZLE,3,"GEFRIERENDER NIESEL"}; - case 61: return {WX_RAIN,1,"LEICHTER REGEN"}; - case 63: return {WX_RAIN,2,"MÄSSIGER REGEN"}; - case 65: return {WX_RAIN,3,"STARKER REGEN"}; - case 66: return {WX_FREEZING_RAIN,1,"GEFRIERENDER REGEN"}; - case 67: return {WX_FREEZING_RAIN,3,"GEFRIERENDER REGEN"}; - case 71: return {WX_SNOW,1,"LEICHTER SCHNEEFALL"}; - case 73: return {WX_SNOW,2,"MÄSSIGER SCHNEEFALL"}; - case 75: return {WX_SNOW,3,"STARKER SCHNEEFALL"}; - case 77: return {WX_GRAINS,1,"SCHNEEKÖRNER"}; - case 80: return {WX_RAIN_SHOWER,1,"LEICHTE SCHAUER"}; - case 81: return {WX_RAIN_SHOWER,2,"MÄSSIGE SCHAUER"}; - case 82: return {WX_RAIN_SHOWER,3,"HEFTIGE SCHAUER"}; - case 85: return {WX_SNOW_SHOWER,1,"LEICHTE SCHNEESCHAUER"}; - case 86: return {WX_SNOW_SHOWER,3,"STARKE SCHNEESCHAUER"}; - case 95: return {WX_THUNDER,2,"GEWITTER"}; - case 96: return {WX_THUNDER_HAIL,1,"GEWITTER MIT HAGEL"}; - case 99: return {WX_THUNDER_HAIL,3,"GEWITTER MIT HAGEL"}; - default: return {WX_CLOUD,0,"WETTER"}; + case 0: return {WX_CLEAR,0,PSTR("KLAR")}; + case 1: return {WX_CLEAR,0,PSTR("HEITER")}; + case 2: return {WX_PARTLY,0,PSTR("WOLKIG")}; + case 3: return {WX_CLOUD,0,PSTR("BEWÖLKT")}; + case 45: return {WX_FOG,0,PSTR("NEBEL")}; + case 48: return {WX_FOG,0,PSTR("REIFNEBEL")}; + case 51: return {WX_DRIZZLE,1,PSTR("LEICHTER NIESEL")}; + case 53: return {WX_DRIZZLE,2,PSTR("MÄSSIGER NIESEL")}; + case 55: return {WX_DRIZZLE,3,PSTR("DICHTER NIESEL")}; + case 56: return {WX_FREEZING_DRIZZLE,1,PSTR("GEFRIERENDER NIESEL")}; + case 57: return {WX_FREEZING_DRIZZLE,3,PSTR("GEFRIERENDER NIESEL")}; + case 61: return {WX_RAIN,1,PSTR("LEICHTER REGEN")}; + case 63: return {WX_RAIN,2,PSTR("MÄSSIGER REGEN")}; + case 65: return {WX_RAIN,3,PSTR("STARKER REGEN")}; + case 66: return {WX_FREEZING_RAIN,1,PSTR("GEFRIERENDER REGEN")}; + case 67: return {WX_FREEZING_RAIN,3,PSTR("GEFRIERENDER REGEN")}; + case 71: return {WX_SNOW,1,PSTR("LEICHTER SCHNEEFALL")}; + case 73: return {WX_SNOW,2,PSTR("MÄSSIGER SCHNEEFALL")}; + case 75: return {WX_SNOW,3,PSTR("STARKER SCHNEEFALL")}; + case 77: return {WX_GRAINS,1,PSTR("SCHNEEKÖRNER")}; + case 80: return {WX_RAIN_SHOWER,1,PSTR("LEICHTE SCHAUER")}; + case 81: return {WX_RAIN_SHOWER,2,PSTR("MÄSSIGE SCHAUER")}; + case 82: return {WX_RAIN_SHOWER,3,PSTR("HEFTIGE SCHAUER")}; + case 85: return {WX_SNOW_SHOWER,1,PSTR("LEICHTE SCHNEESCHAUER")}; + case 86: return {WX_SNOW_SHOWER,3,PSTR("STARKE SCHNEESCHAUER")}; + case 95: return {WX_THUNDER,2,PSTR("GEWITTER")}; + case 96: return {WX_THUNDER_HAIL,1,PSTR("GEWITTER MIT HAGEL")}; + case 99: return {WX_THUNDER_HAIL,3,PSTR("GEWITTER MIT HAGEL")}; + default: return {WX_CLOUD,0,PSTR("WETTER")}; } } -// English labels, kept in flash on the device (PSTR); German stays above. -#ifndef PSTR -#define PSTR(x) (x) -#endif -#ifndef PGM_P -#define PGM_P const char* -#endif +// English labels, also in flash. static inline PGM_P weatherLabelEn(int code) { switch (code) { case 0: return PSTR("CLEAR"); diff --git a/src/main.cpp b/src/main.cpp index b898415..a9d8070 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -106,6 +106,7 @@ struct Settings { uint8_t nightBrightness = 12; String stopName = "Pohlandplatz"; + String stopPlace = ""; // town of the stop, from the VVO search String stopId = ""; uint8_t departureCount = 4; uint16_t departurePoll = 30; @@ -113,6 +114,7 @@ struct Settings { bool departureCompactDestinations = false; bool departureAbbreviate = true; // Hbf, Str., Pl. ... bool departureDropTown = true; // "Dresden Bühlau" -> "Bühlau" + bool weatherForecast = true; // alternate with a three-day forecast page String weatherCity = "Dresden"; // selected real place / fallback title String weatherDisplayName = ""; // optional display-only title @@ -151,6 +153,8 @@ static uint8_t lastMinute = 255; static uint32_t lastModeSwitchMs = 0; static String lastCountdownRendered[4]; static uint8_t departurePage = 0; +static uint8_t weatherPage = 0; // 0 = today, 1 = three-day forecast +static uint32_t lastWeatherPageSwitchMs = 0; static bool departurePagingReady = false; static uint32_t lastDeparturePageSwitchMs = 0; static bool planePlacePhase = false; @@ -196,9 +200,9 @@ static const char WEBUI[] PROGMEM = R"HTML(

PixelStop

v)HTML" FW_VERSION R"HTML(
@@ -210,11 +214,11 @@ button.action,a.action{display:inline-block;border:0;border-radius:10px;backgrou

Nachtmodus

-

Abfahrtsmonitor

Live vom Verkehrsverbund Oberelbe (VVO). Haltestelle suchen, Treffer wählen und Verkehrsmittel auswählen.

Darstellung Fahrziel

Beispiel: „Dresden Bühlau“ wird zu „Bühlau“, wenn die Haltestelle in Dresden liegt.

+

Abfahrtsmonitor

Live vom Verkehrsverbund Oberelbe (VVO). Haltestelle suchen, Treffer wählen und Verkehrsmittel auswählen.

Darstellung Fahrziel

Beispiel: „Dresden Bühlau“ wird zu „Bühlau“, wenn die Haltestelle in Dresden liegt.

-

Wetter

Live von Open-Meteo. Ort suchen und den Beobachtungspunkt auf der Karte exakt setzen. Standort gilt nur für dieses Programm.

Ortsnamen
Farbige Darstellung
+

Wetter

Live von Open-Meteo. Ort suchen und den Beobachtungspunkt auf der Karte exakt setzen. Standort gilt nur für dieses Programm.

Ortsnamen
Koordinaten
Farbige Darstellung
-

Flugradar

Live von adsb.lol. Ort suchen und den Beobachtungspunkt auf der Karte exakt setzen. Standort gilt nur für dieses Programm.

Ortsnamen
Standortname Darstellung

Zeigt die Sekunden seit dem letzten erfolgreichen Positionsabruf.

Ohne Schlüssel erlaubt adsb.lol nur eine begrenzte Zahl von Anfragen pro Tag und Internetanschluss; für den Dauerbetrieb ohne Schlüssel 3 min wählen. Schlüssel gibt es über die Anfrageseite von adsb.lol. „-“ eintragen und speichern entfernt einen gespeicherten Schlüssel.

adsb.lol kann Abfragen je nach Serverauslastung vorübergehend begrenzen. Während einer Anbieterpause bleibt das zuletzt empfangene Flugzeug stehen. Nach einer Anbieterbegrenzung verlängert sich das Aktualisierungsintervall automatisch. Nach 10 Minuten ohne erneute Begrenzung gilt wieder das ausgewählte Intervall.

+

Flugradar

Live von adsb.lol. Ort suchen und den Beobachtungspunkt auf der Karte exakt setzen. Standort gilt nur für dieses Programm.

Ortsnamen
Standortname Darstellung
Koordinaten

Zeigt die Sekunden seit dem letzten erfolgreichen Positionsabruf.

ⓘ Mehr dazu

Ohne Schlüssel erlaubt adsb.lol nur eine begrenzte Zahl von Anfragen pro Tag und Internetanschluss; für den Dauerbetrieb ohne Schlüssel 3 min wählen. Schlüssel gibt es über die Anfrageseite von adsb.lol. „-“ eintragen und speichern entfernt einen gespeicherten Schlüssel.

adsb.lol kann Abfragen je nach Serverauslastung vorübergehend begrenzen. Während einer Anbieterpause bleibt das zuletzt empfangene Flugzeug stehen. Nach einer Anbieterbegrenzung verlängert sich das Aktualisierungsintervall automatisch. Nach 10 Minuten ohne erneute Begrenzung gilt wieder das ausgewählte Intervall.

Flug-Tracker

Verfolgt genau einen Flug. Plan-/Ist-Zeiten kommen von aviationstack; Höhe und Geschwindigkeit während des Fluges zusätzlich über adsb.lol.

Statusabfragen laufen sparsam und nur, wenn der Tracker tatsächlich angezeigt wird.

@@ -223,10 +227,11 @@ button.action,a.action{display:inline-block;border:0;border-radius:10px;backgrou

Sprache / Language

WLAN

Status

lade…

Diagnose

Noch nicht geladen.
Erweiterte Einstellungen

Ortsdienst

Ortsauswahl über die Internetverbindung dieses Browsers. © OpenStreetMap-Mitwirkende. Nutzungsregeln: nur manuelle Auswahl, höchstens eine Anfrage pro Sekunde für die Anwendung.

Nominatim-kompatibler Dienst. Gilt für diesen Browser.

Wartung

Firmware-Update

Dienste und Datenquellen

Für die verwendeten Dienste gelten die Bedingungen der jeweiligen Anbieter. Daten und Verfügbarkeit können eingeschränkt sein.

Nominatim: nur manuelle Ortssuche, höchstens eine Anfrage pro Sekunde für die Anwendung; Suchergebnisse werden zwischengespeichert. Open-Meteo: die kostenlose API ist für nichtkommerzielle Nutzung vorgesehen. aviationstack benötigt einen eigenen API-Schlüssel und unterliegt dessen Tarifgrenzen.

adsbdb nennt gesonderte Weiterverwendungsbedingungen für Routendaten. Links und Bedingungen zuletzt geprüft am 11.10.2026.

PixelStop · entwickelt von du13500 · GitHub
)HTML"; @@ -467,7 +472,7 @@ static bool saveConfig() { d["mode"] = cfg.mode; d["rotationMask"] = cfg.rotationMask; d["brightness"] = cfg.brightness; JsonArray rs = d["rotationSec"].to(); for(uint8_t i=0;i<9;i++) rs.add(cfg.rotationSec[i]); d["nightEnabled"] = cfg.nightEnabled; d["nightStart"] = cfg.nightStart; d["nightEnd"] = cfg.nightEnd; d["nightBrightness"] = cfg.nightBrightness; - d["stopName"] = cfg.stopName; d["stopId"] = cfg.stopId; d["departureCount"] = cfg.departureCount; d["departurePoll"] = cfg.departurePoll; d["vvoMotMask"] = cfg.vvoMotMask; d["lang"] = cfg.lang; d["departureCompactDestinations"] = cfg.departureCompactDestinations; d["departureAbbreviate"] = cfg.departureAbbreviate; d["departureDropTown"] = cfg.departureDropTown; + d["stopName"] = cfg.stopName; d["stopPlace"] = cfg.stopPlace; d["stopId"] = cfg.stopId; d["departureCount"] = cfg.departureCount; d["departurePoll"] = cfg.departurePoll; d["vvoMotMask"] = cfg.vvoMotMask; d["lang"] = cfg.lang; d["departureCompactDestinations"] = cfg.departureCompactDestinations; d["departureAbbreviate"] = cfg.departureAbbreviate; d["departureDropTown"] = cfg.departureDropTown; d["weatherForecast"] = cfg.weatherForecast; d["weatherCity"] = cfg.weatherCity; d["weatherDisplayName"] = cfg.weatherDisplayName; d["weatherLat"] = cfg.weatherLat; d["weatherLon"] = cfg.weatherLon; d["weatherPoll"] = cfg.weatherPoll; d["weatherTempColor"] = cfg.weatherTempColor; d["weatherFahrenheit"] = cfg.weatherFahrenheit; d["geoGermanNames"] = cfg.geoGermanNames; d["planePlace"] = cfg.planePlace; d["planeDisplayName"] = cfg.planeDisplayName; d["planeLat"] = cfg.planeLat; d["planeLon"] = cfg.planeLon; d["planeRadiusKm"] = cfg.planeRadiusKm; d["planePoll"] = cfg.planePoll; d["planeShowAge"] = cfg.planeShowAge; d["planeShowPlace"] = cfg.planeShowPlace; d["planePlaceToggleSec"] = cfg.planePlaceToggleSec; d["trackedFlightNo"] = cfg.trackedFlightNo; d["aviationstackKey"] = cfg.aviationstackKey; d["trackerStatusPollMin"] = cfg.trackerStatusPollMin; d["adsbLolKey"] = cfg.adsbLolKey; @@ -505,7 +510,7 @@ static void loadConfig() { JsonArrayConst rs=d["rotationSec"].as(); if(!rs.isNull()) for(uint8_t i=0;i<9&&i "Dresden". A one-word stop name ("Postplatz") falls back to Dresden, -// the VVO home town, until other providers deliver their own town. +// Town of the configured stop. The VVO search delivers it separately +// (stored as stopPlace when a result is picked). Stop names themselves carry +// no town ("S-Bahnhof Reick", "Postplatz"), so their first word is never +// taken as one. Without a stored place, a "Town, Stop" name still works; +// otherwise Dresden, the VVO home town, is assumed. static String stopTown() { - String n=cfg.stopName;int comma=n.indexOf(','); - if(comma>0)return n.substring(0,comma); - int space=n.indexOf(' '); - return space>0?n.substring(0,space):String("Dresden"); + if(cfg.stopPlace.length())return cfg.stopPlace; + int comma=cfg.stopName.indexOf(','); + return comma>0?cfg.stopName.substring(0,comma):String("Dresden"); } static String departureText(const char* raw,bool abbreviate) { char out[96];String town=stopTown(); @@ -784,11 +790,15 @@ static void drawDepartures(bool force=true) { if(paged&&force)drawFooterPageArrow(!departurePage); } -static void drawCloud(int cx, int cy, uint16_t color) { - gfx->fillCircle(cx-18, cy+4, 11, color); - gfx->fillCircle(cx, cy-5, 17, color); - gfx->fillCircle(cx+20, cy+4, 12, color); - gfx->fillRect(cx-27, cy+4, 56, 15, color); +// Weather icons are drawn for a 1.0 scale around (120,55); drawWeatherIconAt() +// places and scales the same motif, e.g. for the small forecast icons. +static int wxLen(int v, float s) { int r=(int)lroundf(v*s); return r<1?1:r; } + +static void drawCloud(int cx, int cy, uint16_t color, float s=1.0f) { + gfx->fillCircle(cx-wxLen(18,s), cy+wxLen(4,s), wxLen(11,s), color); + gfx->fillCircle(cx, cy-wxLen(5,s), wxLen(17,s), color); + gfx->fillCircle(cx+wxLen(20,s), cy+wxLen(4,s), wxLen(12,s), color); + gfx->fillRect(cx-wxLen(27,s), cy+wxLen(4,s), wxLen(56,s), wxLen(15,s), color); } static void drawSun(int cx, int cy, uint16_t color, int reach=30) { @@ -812,16 +822,19 @@ static void drawSnowflake(int x,int y,int radius,uint16_t color) { gfx->drawLine(x-radius+1,y+radius-1,x+radius-1,y-radius+1,color); } -static void drawWeatherIcon(int code, bool day) { +static void drawWeatherIconAt(int code, bool day, int ox, int oy, float s) { + auto X=[&](int x){return ox+(int)lroundf((x-120)*s);}; + auto Y=[&](int y){return oy+(int)lroundf((y-55)*s);}; + auto L=[&](int v){return wxLen(v,s);}; WeatherVisual w=weatherVisual(code); - if(w.motif==WX_CLEAR){if(day)drawSun(120,55,C_YELLOW);else drawMoon(120,55);return;} - if(w.motif==WX_PARTLY){if(day)drawSun(103,47,C_YELLOW,20);else drawMoon(103,47);drawCloud(125,58,C_WHITE);return;} + if(w.motif==WX_CLEAR){if(day)drawSun(X(120),Y(55),C_YELLOW,L(30));else drawMoon(X(120),Y(55),L(18));return;} + if(w.motif==WX_PARTLY){if(day)drawSun(X(103),Y(47),C_YELLOW,L(20));else drawMoon(X(103),Y(47),L(18));drawCloud(X(125),Y(58),C_WHITE,s);return;} if(w.motif==WX_FOG){ - for(int row=0;row<4;row++)gfx->fillRect(row%2?95:87,37+row*12,row%2?60:76,4,C_GRAY); - if(code==48)drawSnowflake(164,71,4,C_CYAN); + for(int row=0;row<4;row++)gfx->fillRect(X(row%2?95:87),Y(37+row*12),L(row%2?60:76),L(4),C_GRAY); + if(code==48)drawSnowflake(X(164),Y(71),L(4),C_CYAN); return; } - drawCloud(120,w.motif==WX_CLOUD?55:44,C_WHITE); + drawCloud(X(120),Y(w.motif==WX_CLOUD?55:44),C_WHITE,s); if(!w.intensity)return; int count=w.intensity==1?2:(w.intensity==2?4:6); bool drizzle=w.motif==WX_DRIZZLE||w.motif==WX_FREEZING_DRIZZLE; @@ -829,22 +842,58 @@ static void drawWeatherIcon(int code, bool day) { bool grains=w.motif==WX_GRAINS||w.motif==WX_THUNDER_HAIL; for(int i=0;ifillCircle(x,y+4,w.motif==WX_GRAINS?1:2,C_CYAN); - else gfx->drawLine(x,y,x-(drizzle?2:5),y+(drizzle?4:10),C_CYAN); + if(snow)drawSnowflake(X(x),Y(y+4),L(3),C_CYAN); + else if(grains)gfx->fillCircle(X(x),Y(y+4),L(w.motif==WX_GRAINS?1:2),C_CYAN); + else gfx->drawLine(X(x),Y(y),X(x-(drizzle?2:5)),Y(y+(drizzle?4:10)),C_CYAN); } - if(w.motif==WX_FREEZING_DRIZZLE||w.motif==WX_FREEZING_RAIN)drawSnowflake(166,78,5,C_CYAN); - if(w.motif==WX_RAIN_SHOWER||w.motif==WX_SNOW_SHOWER){if(day)drawSun(91,40,C_YELLOW,16);else drawMoon(91,40,12);drawCloud(120,44,C_WHITE);} - if(w.motif==WX_THUNDER||w.motif==WX_THUNDER_HAIL){gfx->drawLine(124,59,113,78,C_YELLOW);gfx->drawLine(113,78,125,75,C_YELLOW);gfx->drawLine(125,75,116,86,C_YELLOW);} + if(w.motif==WX_FREEZING_DRIZZLE||w.motif==WX_FREEZING_RAIN)drawSnowflake(X(166),Y(78),L(5),C_CYAN); + if(w.motif==WX_RAIN_SHOWER||w.motif==WX_SNOW_SHOWER){if(day)drawSun(X(91),Y(40),C_YELLOW,L(16));else drawMoon(X(91),Y(40),L(12));drawCloud(X(120),Y(44),C_WHITE,s);} + if(w.motif==WX_THUNDER||w.motif==WX_THUNDER_HAIL){gfx->drawLine(X(124),Y(59),X(113),Y(78),C_YELLOW);gfx->drawLine(X(113),Y(78),X(125),Y(75),C_YELLOW);gfx->drawLine(X(125),Y(75),X(116),Y(86),C_YELLOW);} } +static void drawWeatherIcon(int code, bool day) { drawWeatherIconAt(code, day, 120, 55, 1.0f); } + static uint16_t weatherTempColor565(float c); static void drawSunEventIcon(int x,int y,bool rise); static float displayTempValue(float c); static String weatherUnit(); +static void centerTextIn(const String& s, int cx, int y, uint8_t size, uint16_t color) { printDisplayTextAt(cx-textW(s,size)/2,y,s,size,color); } + +// Three columns: weekday, small icon, high, low, chance of rain. +static void drawForecast(bool force) { + const WeatherSnapshot& w=weatherData(); + static String shown; + String sig=String(cfg.lang)+String(cfg.weatherFahrenheit)+String(w.days); + for(uint8_t i=0;idrawFastVLine(i*80,34,170,C_DGRAY); + if(i>=w.days)continue; + const WeatherSnapshot::Day& d=w.day[i]; + String name=now>1609459200?String(cfg.lang==LANG_EN?wdEn[(t.tm_wday+1+i)%7]:wdDe[(t.tm_wday+1+i)%7]):String("+")+String(i+1); + centerTextIn(name,cx,38,2,C_WHITE); + drawWeatherIconAt(d.code,true,cx,92,0.52f); + centerTextIn(String((int)lroundf(displayTempValue(d.highC)))+"°",cx,124,3,C_WHITE); + centerTextIn(String((int)lroundf(displayTempValue(d.lowC)))+"°",cx,158,2,C_GRAY); + if(d.rainPct>=0)centerTextIn(String(d.rainPct)+"%",cx,186,2,C_CYAN); + } + drawFooter("OPEN-METEO LIVE"); +} + static void drawWeather(bool force=true) { const WeatherSnapshot& w=weatherData();static bool valid=false,error=false; + static uint8_t lastPage=0; + if(weatherPage==1&&w.valid&&w.days){bool f=force||lastPage!=1;lastPage=1;if(f)valid=false;drawForecast(f);return;} + if(lastPage!=0){lastPage=0;force=true;} force=force||valid!=w.valid||(!w.valid&&error!=w.error);beginView(force);valid=w.valid;error=w.error; String title=cfg.weatherDisplayName.length()?cfg.weatherDisplayName:(cfg.weatherCity.length()?cfg.weatherCity:String(TR("WETTER","WEATHER"))); visibleText(0,crop(displayAscii(title),18),8,7,2,C_YELLOW,0,0,240,22); @@ -855,7 +904,7 @@ static void drawWeather(bool force=true) { uint16_t color=cfg.weatherTempColor?weatherTempColor565(w.currentC):C_WHITE; bool tempChanged=visibleCenter(2,temp,88,6,color,88,48); visibleText(3,weatherUnit(),176,103,2,cfg.weatherTempColor?color:C_GRAY,176,103,36,16,tempChanged); - String label=cfg.lang==LANG_EN?String(FPSTR(weatherLabelEn(w.code))):String(weatherLabel(w.code));visibleCenter(4,label,142,textW(label,2)<=224?2:1,C_WHITE,140,19); + String label=cfg.lang==LANG_EN?String(FPSTR(weatherLabelEn(w.code))):String(FPSTR(weatherLabel(w.code)));visibleCenter(4,label,142,textW(label,2)<=224?2:1,C_WHITE,140,19); String hi="H "+String((int)lroundf(displayTempValue(w.highC)))+weatherUnit(); String lo=TR("T ","L ")+String((int)lroundf(displayTempValue(w.lowC)))+weatherUnit(); visibleText(5,hi,18,169,2,C_GRAY,8,166,112,24); @@ -1114,7 +1163,7 @@ static void drawActive() { int8_t slot=countdownSlotFromMode(cfg.mode); if(slot>=0){drawCountdown((uint8_t)slot);return;} switch (cfg.mode) { - case MODE_WEATHER: drawWeather(); break; + case MODE_WEATHER: weatherPage=0; lastWeatherPageSwitchMs=millis(); drawWeather(); break; case MODE_PLANE: planePlacePhase=false; lastPlanePlaceSwitchMs=millis(); drawPlane(); break; case MODE_CLOCK: drawClock(); break; case MODE_TRACKED_FLIGHT: drawTrackedFlight(); break; @@ -1185,7 +1234,7 @@ static void apiGetConfig() { d["ssid"]=cfg.ssid;d["hostname"]=cfg.hostname;d["mode"]=cfg.mode;d["rotationMask"]=cfg.rotationMask;d["brightness"]=cfg.brightness;d["timeZone"]=cfg.timeZone; JsonArray rs=d["rotationSec"].to();for(uint8_t i=0;i<9;i++)rs.add(cfg.rotationSec[i]); d["nightEnabled"]=cfg.nightEnabled;d["nightStart"]=cfg.nightStart;d["nightEnd"]=cfg.nightEnd;d["nightBrightness"]=cfg.nightBrightness; - d["stopName"]=cfg.stopName;d["stopId"]=cfg.stopId;d["departureCount"]=cfg.departureCount;d["departurePoll"]=cfg.departurePoll;d["vvoMotMask"]=cfg.vvoMotMask;d["lang"]=cfg.lang;d["departureCompactDestinations"]=cfg.departureCompactDestinations;d["departureAbbreviate"]=cfg.departureAbbreviate;d["departureDropTown"]=cfg.departureDropTown; + d["stopName"]=cfg.stopName;d["stopPlace"]=cfg.stopPlace;d["stopId"]=cfg.stopId;d["departureCount"]=cfg.departureCount;d["departurePoll"]=cfg.departurePoll;d["vvoMotMask"]=cfg.vvoMotMask;d["lang"]=cfg.lang;d["departureCompactDestinations"]=cfg.departureCompactDestinations;d["departureAbbreviate"]=cfg.departureAbbreviate;d["departureDropTown"]=cfg.departureDropTown;d["weatherForecast"]=cfg.weatherForecast; d["weatherCity"]=cfg.weatherCity;d["weatherDisplayName"]=cfg.weatherDisplayName;d["weatherLat"]=cfg.weatherLat;d["weatherLon"]=cfg.weatherLon;d["weatherPoll"]=cfg.weatherPoll;d["weatherTempColor"]=cfg.weatherTempColor;d["weatherFahrenheit"]=cfg.weatherFahrenheit;d["geoGermanNames"]=cfg.geoGermanNames; d["planePlace"]=cfg.planePlace;d["planeDisplayName"]=cfg.planeDisplayName;d["planeLat"]=cfg.planeLat;d["planeLon"]=cfg.planeLon;d["planeRadiusKm"]=cfg.planeRadiusKm;d["planePoll"]=cfg.planePoll;d["planeShowAge"]=cfg.planeShowAge;d["planeShowPlace"]=cfg.planeShowPlace;d["planePlaceToggleSec"]=cfg.planePlaceToggleSec; d["trackedFlightNo"]=cfg.trackedFlightNo;d["trackerStatusPollMin"]=cfg.trackerStatusPollMin;d["aviationstackKeySet"]=cfg.aviationstackKey.length()>0;d["adsbLolKeySet"]=cfg.adsbLolKey.length()>0; @@ -1194,9 +1243,9 @@ static void apiGetConfig() { } static void apiPostConfig() { - if(!server.hasArg("plain")){server.send(400,"application/json","{\"ok\":false,\"error\":\"Keine Daten empfangen.\"}");return;} - JsonDocument d;if(deserializeJson(d,server.arg("plain"))){server.send(400,"application/json","{\"ok\":false,\"error\":\"Einstellungen konnten nicht gelesen werden.\"}");return;} - if(d["timeZone"].is() && timeZoneIndex(d["timeZone"].as())<0){server.send(400,"application/json","{\"ok\":false,\"error\":\"Unbekannte Zeitzone.\"}");return;} + if(!server.hasArg("plain")){server.send_P(400,"application/json",PSTR("{\"ok\":false,\"error\":\"Keine Daten empfangen.\"}"));return;} + JsonDocument d;if(deserializeJson(d,server.arg("plain"))){server.send_P(400,"application/json",PSTR("{\"ok\":false,\"error\":\"Einstellungen konnten nicht gelesen werden.\"}"));return;} + if(d["timeZone"].is() && timeZoneIndex(d["timeZone"].as())<0){server.send_P(400,"application/json",PSTR("{\"ok\":false,\"error\":\"Unbekannte Zeitzone.\"}"));return;} Settings previous=cfg; String oldSsid=cfg.ssid,oldHost=cfg.hostname,oldTracked=cfg.trackedFlightNo,oldKey=cfg.aviationstackKey,oldAdsbKey=cfg.adsbLolKey; if(d["ssid"].is())cfg.ssid=d["ssid"].as(); if(d["pass"].is()){String x=d["pass"].as();if(x.length())cfg.pass=x;} @@ -1208,6 +1257,7 @@ static void apiPostConfig() { if(d["timeZone"].is())cfg.timeZone=d["timeZone"].as(); cfg.nightEnabled=d["nightEnabled"]|cfg.nightEnabled;cfg.nightStart=constrain((int)(d["nightStart"]|cfg.nightStart),0,1439);cfg.nightEnd=constrain((int)(d["nightEnd"]|cfg.nightEnd),0,1439);cfg.nightBrightness=constrain((int)(d["nightBrightness"]|cfg.nightBrightness),1,100); if(d["stopName"].is()) cfg.stopName=d["stopName"].as(); + if(d["stopPlace"].is()) cfg.stopPlace=d["stopPlace"].as(); if(d["stopId"].is()) cfg.stopId=d["stopId"].as(); {int dc=(int)(d["departureCount"]|cfg.departureCount);cfg.departureCount=(dc==10)?10:constrain(dc,3,5);} cfg.departurePoll=constrain((int)(d["departurePoll"]|cfg.departurePoll),10,300); @@ -1217,6 +1267,7 @@ static void apiPostConfig() { cfg.departureCompactDestinations=d["departureCompactDestinations"]|cfg.departureCompactDestinations; cfg.departureAbbreviate=d["departureAbbreviate"]|cfg.departureAbbreviate; cfg.departureDropTown=d["departureDropTown"]|cfg.departureDropTown; + cfg.weatherForecast=d["weatherForecast"]|cfg.weatherForecast; if(d["weatherCity"].is()) cfg.weatherCity=d["weatherCity"].as(); if(d["weatherDisplayName"].is()) cfg.weatherDisplayName=d["weatherDisplayName"].as(); cfg.weatherLat=d["weatherLat"]|cfg.weatherLat; cfg.weatherLon=d["weatherLon"]|cfg.weatherLon; @@ -1239,7 +1290,7 @@ static void apiPostConfig() { JsonArrayConst a=d["countdowns"].as();if(!a.isNull())for(uint8_t i=0;i<4&&i(),cfg.countdown[i]);if(cfg.countdown[i].active&&cfg.countdown[i].type==COUNTDOWN_DAYS){int32_t dd=0;if(countdownDayDifference(cfg.countdown[i].targetDate,dd)){uint32_t av=dd<0?(uint32_t)(-(int64_t)dd):(uint32_t)dd;cfg.countdown[i].dayDigits=max(cfg.countdown[i].dayDigits,max((uint8_t)3,decimalDigits(av)));}}} d.clear(); diagEvent(D_CONFIG,DS_BEGIN); - if(!saveConfig()){diagEvent(D_CONFIG,DS_FAILED);cfg=previous;server.send(500,"application/json","{\"ok\":false,\"error\":\"Einstellungen konnten nicht gespeichert werden.\"}");return;}diagEvent(D_CONFIG,DS_DONE);applyTimeZone();applyBrightness();if(oldAdsbKey!=cfg.adsbLolKey){adsbLolSetKey(cfg.adsbLolKey);serviceClear(SERVICE_ADSB_LOL);flightReset();} + if(!saveConfig()){diagEvent(D_CONFIG,DS_FAILED);cfg=previous;server.send_P(500,"application/json",PSTR("{\"ok\":false,\"error\":\"Einstellungen konnten nicht gespeichert werden.\"}"));return;}diagEvent(D_CONFIG,DS_DONE);applyTimeZone();applyBrightness();if(oldAdsbKey!=cfg.adsbLolKey){adsbLolSetKey(cfg.adsbLolKey);serviceClear(SERVICE_ADSB_LOL);flightReset();} uint16_t activated=cfg.rotationMask & ~previous.rotationMask; if(previous.stopId!=cfg.stopId||previous.departureCount!=cfg.departureCount||previous.vvoMotMask!=cfg.vvoMotMask||(activated&(1U<MODE_COUNTDOWN4){server.send_P(400,"application/json",PSTR("{\"ok\":false,\"error\":\"Unbekanntes Programm.\"}"));return;} + server.send_P(200,"application/json",PSTR("{\"ok\":true}")); + cfg.mode=(uint8_t)mode;lastModeSwitchMs=millis();drawActive(); +} + static void apiCountdown() { - if(!server.hasArg("plain")){server.send(400,"application/json","{\"ok\":false,\"error\":\"Keine Daten empfangen.\"}");return;} - JsonDocument d;if(deserializeJson(d,server.arg("plain"))){server.send(400,"application/json","{\"ok\":false,\"error\":\"Ungültige Daten.\"}");return;} - int slot=d["slot"]|-1;if(slot<0||slot>3){server.send(400,"application/json","{\"ok\":false,\"error\":\"Ungültiger Countdown-Slot.\"}");return;} + if(!server.hasArg("plain")){server.send_P(400,"application/json",PSTR("{\"ok\":false,\"error\":\"Keine Daten empfangen.\"}"));return;} + JsonDocument d;if(deserializeJson(d,server.arg("plain"))){server.send_P(400,"application/json",PSTR("{\"ok\":false,\"error\":\"Ungültige Daten.\"}"));return;} + int slot=d["slot"]|-1;if(slot<0||slot>3){server.send_P(400,"application/json",PSTR("{\"ok\":false,\"error\":\"Ungültiger Countdown-Slot.\"}"));return;} Settings previous=cfg; CountdownSlot& c=cfg.countdown[slot];updateCountdownSettings(d.as(),c);String action=d["action"]|""; if(action=="stop"){c.active=false;} else if(action=="start"){ if(c.type==COUNTDOWN_DAYS){ - int32_t diff=0;if(!countdownDayDifference(c.targetDate,diff)){server.send(409,"application/json","{\"ok\":false,\"error\":\"Zieltag fehlt oder Uhrzeit ist noch nicht synchronisiert\"}");return;} + int32_t diff=0;if(!countdownDayDifference(c.targetDate,diff)){server.send_P(409,"application/json",PSTR("{\"ok\":false,\"error\":\"Zieltag fehlt oder Uhrzeit ist noch nicht synchronisiert\"}"));return;} uint32_t a=diff<0?(uint32_t)(-(int64_t)diff):(uint32_t)diff;c.dayDigits=max((uint8_t)3,decimalDigits(a));c.active=true;c.targetEpoch=0; } else { - time_t now=time(nullptr);if(now<1609459200){server.send(409,"application/json","{\"ok\":false,\"error\":\"Uhrzeit ist noch nicht synchronisiert\"}");return;} - if(c.durationSec==0){server.send(400,"application/json","{\"ok\":false,\"error\":\"Dauer muss größer als 0 sein.\"}");return;} + time_t now=time(nullptr);if(now<1609459200){server.send_P(409,"application/json",PSTR("{\"ok\":false,\"error\":\"Uhrzeit ist noch nicht synchronisiert\"}"));return;} + if(c.durationSec==0){server.send_P(400,"application/json",PSTR("{\"ok\":false,\"error\":\"Dauer muss größer als 0 sein.\"}"));return;} c.targetEpoch=(uint32_t)now+c.durationSec;c.active=true; } - } else {server.send(400,"application/json","{\"ok\":false,\"error\":\"Unbekannte Aktion.\"}");return;} - if(!saveConfig()){cfg=previous;server.send(500,"application/json","{\"ok\":false,\"error\":\"Countdown konnte nicht gespeichert werden.\"}");return;}if(countdownSlotFromMode(cfg.mode)==slot)drawCountdown((uint8_t)slot);server.send(200,"application/json","{\"ok\":true}"); + } else {server.send_P(400,"application/json",PSTR("{\"ok\":false,\"error\":\"Unbekannte Aktion.\"}"));return;} + if(!saveConfig()){cfg=previous;server.send_P(500,"application/json",PSTR("{\"ok\":false,\"error\":\"Countdown konnte nicht gespeichert werden.\"}"));return;}if(countdownSlotFromMode(cfg.mode)==slot)drawCountdown((uint8_t)slot);server.send_P(200,"application/json",PSTR("{\"ok\":true}")); } static void apiStatus() { @@ -1273,36 +1334,36 @@ static void apiStatus() { } static void apiVvoSearch() { - if(apMode||WiFi.status()!=WL_CONNECTED){server.send(503,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"Kein Internetzugang.\"}");return;} - String q=server.arg("q");q.trim();if(q.length()<2){server.send(400,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"Suchbegriff zu kurz.\"}");return;} - String out;if(!vvoSearchStops(q,out)){server.send(502,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"VVO-Suche fehlgeschlagen.\"}");return;}server.send(200,"application/json; charset=utf-8",out); + if(apMode||WiFi.status()!=WL_CONNECTED){server.send_P(503,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"Kein Internetzugang.\"}"));return;} + String q=server.arg("q");q.trim();if(q.length()<2){server.send_P(400,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"Suchbegriff zu kurz.\"}"));return;} + String out;if(!vvoSearchStops(q,out)){server.send_P(502,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"VVO-Suche fehlgeschlagen.\"}"));return;}server.send(200,"application/json; charset=utf-8",out); } static void apiGeoSearch() { - if(apMode||WiFi.status()!=WL_CONNECTED){server.send(503,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"Kein Internetzugang.\"}");return;} + if(apMode||WiFi.status()!=WL_CONNECTED){server.send_P(503,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"Kein Internetzugang.\"}"));return;} String q=server.arg("q");q.trim(); - if(q.length()<2){server.send(400,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"Suchbegriff zu kurz.\"}");return;} - if(serviceWaitMs(SERVICE_GEO)){server.send(429,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"Ortsdienst pausiert nach zu vielen Anfragen. Bitte später erneut versuchen.\"}");return;} + if(q.length()<2){server.send_P(400,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"Suchbegriff zu kurz.\"}"));return;} + if(serviceWaitMs(SERVICE_GEO)){server.send_P(429,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"Ortsdienst pausiert nach zu vielen Anfragen. Bitte später erneut versuchen.\"}"));return;} String out; bool german=server.arg("german")=="1"; - if(!geoSearchPlaces(q,german,out)){server.send(502,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"Ortssuche fehlgeschlagen.\"}");return;} + if(!geoSearchPlaces(q,german,out)){server.send_P(502,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"Ortssuche fehlgeschlagen.\"}"));return;} server.send(200,"application/json; charset=utf-8",out); } static void apiGeoReverse() { - if(apMode||WiFi.status()!=WL_CONNECTED){server.send(503,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"Kein Internetzugang.\"}");return;} + if(apMode||WiFi.status()!=WL_CONNECTED){server.send_P(503,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"Kein Internetzugang.\"}"));return;} float lat=server.arg("lat").toFloat(),lon=server.arg("lon").toFloat(); - if(lat<-90||lat>90||lon<-180||lon>180){server.send(400,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"Ungültige Koordinaten.\"}");return;} - if(serviceWaitMs(SERVICE_GEO)){server.send(429,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"Ortsdienst pausiert nach zu vielen Anfragen. Bitte später erneut versuchen.\"}");return;} + if(lat<-90||lat>90||lon<-180||lon>180){server.send_P(400,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"Ungültige Koordinaten.\"}"));return;} + if(serviceWaitMs(SERVICE_GEO)){server.send_P(429,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"Ortsdienst pausiert nach zu vielen Anfragen. Bitte später erneut versuchen.\"}"));return;} String out; bool german=server.arg("german")=="1"; - if(!geoReversePlace(lat,lon,german,out)){server.send(502,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"Ortsname konnte nicht ermittelt werden.\"}");return;} + if(!geoReversePlace(lat,lon,german,out)){server.send_P(502,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"Ortsname konnte nicht ermittelt werden.\"}"));return;} server.send(200,"application/json; charset=utf-8",out); } static void apiWifiScan() { int n=WiFi.scanNetworks(false,false); - if(n<0){server.send(500,"application/json; charset=utf-8","{\"ok\":false,\"error\":\"WLAN-Suche fehlgeschlagen.\"}");return;} + if(n<0){server.send_P(500,"application/json; charset=utf-8",PSTR("{\"ok\":false,\"error\":\"WLAN-Suche fehlgeschlagen.\"}"));return;} JsonDocument d; d["ok"]=true; JsonArray a=d["networks"].to(); for(int i=0;i=8000UL){weatherPage^=1;lastWeatherPageSwitchMs=nowMs;drawWeather(false);} + }else if(weatherPage){weatherPage=0;lastWeatherPageSwitchMs=nowMs;if(cfg.mode==MODE_WEATHER)drawWeather(true);} + if(cfg.departureCount==10&&vvoCount()>5){ if(!departurePagingReady){departurePagingReady=true;departurePage=0;lastDeparturePageSwitchMs=nowMs;} else if((uint32_t)(nowMs-lastDeparturePageSwitchMs)>=5000UL){departurePage^=1;lastDeparturePageSwitchMs=nowMs;if(cfg.mode==MODE_DEPARTURES)drawDepartures(false);} diff --git a/src/webui_en.h b/src/webui_en.h index b0543ff..1571dbe 100644 --- a/src/webui_en.h +++ b/src/webui_en.h @@ -1,3 +1,3 @@ // Generated by tools/webui_en.py. English texts for the web interface. #pragma once -static const char WEBUI_EN[] PROGMEM = R"EN({"exact":{"Abfahrten":"Departures","Wetter":"Weather","Flugradar":"Flight radar","Uhr":"Clock","Flug-Tracker":"Flight tracker","Countdown":"Countdown","Anzeige":"Display","System":"System","Abfahrtsmonitor":"Departure board","Anzeigerotation":"Display rotation","Diagnose":"Diagnostics","Wartung":"Maintenance","Status":"Status","WLAN":"Wi-Fi","Dienste und Datenquellen":"Services and data sources","Erweiterte Einstellungen":"Advanced settings","Ortsdienst":"Place search service","Einstellungen speichern":"Save settings","Sprache / Language":"Sprache / Language","Programme anhaken und je Ansicht die Anzeigedauer festlegen. Mit nur einem Haken bleibt die Ansicht dauerhaft stehen.":"Tick the views to show and set how long each one stays. With only one ticked, that view stays permanently.","Helligkeit:":"Brightness:","Nacht-Helligkeit:":"Night brightness:","Nachtmodus":"Night mode","nachts dimmen":"dim at night","Beginn":"Start","Ende":"End","Zeitzone":"Time zone","Lokale Zeit":"Local time","Uhrzeit":"Time","Gilt für Uhr, Footer, Nachtmodus, Wetter-Zeitangaben und Tages-Countdowns. Sommer- und Winterzeit werden nach den Regeln der ausgewählten Zone umgestellt.":"Used for the clock, footer, night mode, weather times and day countdowns. Daylight saving time follows the rules of the selected zone.","Live vom Verkehrsverbund Oberelbe (VVO). Haltestelle suchen, Treffer wählen und Verkehrsmittel auswählen.":"Live from Verkehrsverbund Oberelbe (VVO). Search for a stop, pick a result and choose the modes of transport.","Haltestelle suchen":"Search stop","Haltestelle":"Stop","VVO-Haltestellen-ID":"VVO stop ID","Anzahl Abfahrten":"Number of departures","Aktualisierung":"Refresh","Verkehrsmittel":"Modes of transport","Zug":"Train","S-Bahn":"S-Bahn","Straßenbahn":"Tram","Bus":"Bus","Seil-/Schwebebahn":"Cable car / suspension railway","Fähre":"Ferry","AST / Rufbus":"On-demand bus","Darstellung Fahrziel":"Destination display","Lange Ziele kompakt darstellen":"Show long destinations in small type","Ziele abkürzen (Hbf, Bf, Str., Pl., St.)":"Abbreviate destinations (Hbf, Bf, Str., Pl., St.)","Ortsnamen der Haltestelle weglassen":"Omit the town name of the stop","Beispiel: „Dresden Bühlau“ wird zu „Bühlau“, wenn die Haltestelle in Dresden liegt.":"Example: “Dresden Bühlau” becomes “Bühlau” when the stop itself is in Dresden.","Suchen":"Search","noch keine Haltestelle gewählt":"no stop selected yet","z. B. Pohlandplatz":"e.g. Pohlandplatz","Keine Haltestelle gefunden.":"No stop found.","suche beim VVO…":"searching VVO…","Live von Open-Meteo. Ort suchen und den Beobachtungspunkt auf der Karte exakt setzen. Standort gilt nur für dieses Programm.":"Live from Open-Meteo. Search for a place and set the exact point on the map. The location applies to this view only.","Ort suchen":"Search place","Auf Karte auswählen":"Pick on map","Ausgewählter Standort":"Selected location","Anzeigename":"Display name","optional, leer = gefundener Ortsname":"optional, empty = found place name","Ortsnamen":"Place names","Auf Deutsch anzeigen, wenn verfügbar":"Show in German if available","Breitengrad":"Latitude","Längengrad":"Longitude","Temperatureinheit":"Temperature unit","Celsius (°C)":"Celsius (°C)","Fahrenheit (°F)":"Fahrenheit (°F)","Farbige Darstellung":"Colours","Aktuelle Temperatur farbig darstellen":"Colour the current temperature","z. B. Dresden oder 01237":"e.g. Dresden or 01237","z. B. ZUHAUSE":"e.g. HOME","z. B. Schönefeld":"e.g. Schönefeld","Kartenmaterial © OpenStreetMap-Mitwirkende. Auf die gewünschte Position tippen, um den Standort exakt zu setzen.":"Map data © OpenStreetMap contributors. Tap the desired position to set the exact location.","Live von adsb.lol. Ort suchen und den Beobachtungspunkt auf der Karte exakt setzen. Standort gilt nur für dieses Programm.":"Live from adsb.lol. Search for a place and set the exact point on the map. The location applies to this view only.","Standortname Darstellung":"Location name","Auf dem Display anzeigen":"Show on the display","Standortname Wechselintervall":"Location name interval","Kein Wechsel":"No switching","Radius":"Radius","Zeit seit letztem Abruf anzeigen":"Show time since last update","Zeigt die Sekunden seit dem letzten erfolgreichen Positionsabruf.":"Shows the seconds since the last successful position update.","adsb.lol API-Key":"adsb.lol API key","optional":"optional","Ohne Schlüssel erlaubt adsb.lol nur eine begrenzte Zahl von Anfragen pro Tag und Internetanschluss; für den Dauerbetrieb ohne Schlüssel 3 min wählen. Schlüssel gibt es über die Anfrageseite von adsb.lol. „-“ eintragen und speichern entfernt einen gespeicherten Schlüssel.":"Without a key adsb.lol only allows a limited number of requests per day and internet connection; for continuous use without a key choose 3 min. Keys are available via the adsb.lol request page. Enter “-” and save to remove a stored key.","adsb.lol kann Abfragen je nach Serverauslastung vorübergehend begrenzen. Während einer Anbieterpause bleibt das zuletzt empfangene Flugzeug stehen. Nach einer Anbieterbegrenzung verlängert sich das Aktualisierungsintervall automatisch. Nach 10 Minuten ohne erneute Begrenzung gilt wieder das ausgewählte Intervall.":"adsb.lol may temporarily limit requests depending on server load. During a provider pause the last received aircraft stays on screen. After a limit the refresh interval is extended automatically; after 10 minutes without another limit the selected interval applies again.","Verfolgt genau einen Flug. Plan-/Ist-Zeiten kommen von aviationstack; Höhe und Geschwindigkeit während des Fluges zusätzlich über adsb.lol.":"Follows exactly one flight. Scheduled and actual times come from aviationstack; altitude and speed in flight additionally from adsb.lol.","Flugnummer":"Flight number","aviationstack API-Key":"aviationstack API key","Status-Aktualisierung":"Status refresh","Statusabfragen laufen sparsam und nur, wenn der Tracker tatsächlich angezeigt wird.":"Status requests are sparing and only run while the tracker is actually shown.","z. B. AF1234":"e.g. AF1234","API-Key eintragen":"Enter API key","API-Key gespeichert, leer = behalten":"API key stored, empty = keep","Vier dauerhaft gespeicherte Slots. Tages-Countdowns sind reine Kalendertage; Zeit-Countdowns laufen nach Null automatisch mit Plus weiter.":"Four permanently stored slots. Day countdowns count calendar days; time countdowns continue with a plus sign after zero.","Optionaler Titel":"Optional title","Titelfarbe":"Title colour","Timer-Art":"Timer type","Tage":"Days","Stunden : Minuten : Sekunden":"Hours : Minutes : Seconds","Minuten : Sekunden":"Minutes : Seconds","Zieltag":"Target date","Stunden":"Hours","Minuten":"Minutes","Sekunden":"Seconds","Countdown-Farbe":"Countdown colour","Farbe":"Colour","inaktiv":"inactive","aktiv":"active","Start / aktivieren":"Start / activate","Stoppen":"Stop","z. B. URLAUB":"e.g. VACATION","Countdown gestartet":"Countdown started","Countdown gestoppt":"Countdown stopped","Netzwerke suchen":"Scan networks","SSID":"SSID","Passwort":"Password","Hostname":"Hostname","leer = gespeichertes Passwort behalten":"empty = keep stored password","Log laden":"Load log","Log kopieren":"Copy log","Noch nicht geladen.":"Not loaded yet.","lade…":"loading…","Firmware-Update":"Firmware update","Neustart":"Restart","Ortsauswahl über die Internetverbindung dieses Browsers. ©":"Place search via this browser's internet connection. ©","OpenStreetMap-Mitwirkende":"OpenStreetMap contributors","Nutzungsregeln":"Usage policy",": nur manuelle Auswahl, höchstens eine Anfrage pro Sekunde für die Anwendung.":": manual selection only, at most one request per second for the application.","Adresse des Ortsdienstes":"Place search service URL","Nominatim-kompatibler Dienst. Gilt für diesen Browser.":"Nominatim-compatible service. Applies to this browser.","Ortsdienst übernehmen":"Use this service","Für die verwendeten Dienste gelten die Bedingungen der jeweiligen Anbieter. Daten und Verfügbarkeit können eingeschränkt sein.":"The terms of each provider apply to the services used. Data and availability may be limited.","Verkehrsverbund Oberelbe (VVO) ·":"Verkehrsverbund Oberelbe (VVO) ·","Anbieterinformationen":"Provider information","Nutzungsbedingungen":"Terms of use","Radarpositionen und Routen":"Radar positions and routes","API und Datenlizenz":"API and data licence","Zusatzdaten und Routen":"Additional data and routes","Dokumentation und Datenbedingungen":"Documentation and data terms","Karten":"Maps","Copyright und Datenlizenz":"Copyright and data licence","Kartenkacheln":"Map tiles","OpenStreetMap-Kachelserver ·":"OpenStreetMap tile servers ·","Kartenbibliothek":"Map library","Projektinformationen":"Project information","Nutzungshinweise":"Usage notes","Nominatim: nur manuelle Ortssuche, höchstens eine Anfrage pro Sekunde für die Anwendung; Suchergebnisse werden zwischengespeichert. Open-Meteo: die kostenlose API ist für nichtkommerzielle Nutzung vorgesehen. aviationstack benötigt einen eigenen API-Schlüssel und unterliegt dessen Tarifgrenzen.":"Nominatim: manual place search only, at most one request per second for the application; results are cached. Open-Meteo: the free API is intended for non-commercial use. aviationstack requires your own API key and is subject to its plan limits.","adsbdb nennt gesonderte Weiterverwendungsbedingungen für Routendaten. Links und Bedingungen zuletzt geprüft am 11.10.2026.":"adsbdb states separate reuse terms for route data. Links and terms last checked on 11 Oct 2026.","PixelStop · entwickelt von du13500 ·":"PixelStop · developed by du13500 ·","Auf die gewünschte Position in der Karte tippen.":"Tap the desired position on the map.","Bitte die laufende Ortsauswahl abwarten.":"Please wait for the current place lookup.","Bitte eine gültige HTTPS-Adresse eingeben.":"Please enter a valid HTTPS address.","Bitte gültige Flugradar-Koordinaten eingeben.":"Please enter valid radar coordinates.","Bitte gültige Wetter-Koordinaten eingeben.":"Please enter valid weather coordinates.","Bitte mindestens ein Programm für die Anzeige auswählen.":"Please select at least one view.","Bitte mindestens ein Verkehrsmittel auswählen.":"Please select at least one mode of transport.","Bitte mindestens zwei Zeichen eingeben.":"Please enter at least two characters.","Daten vorhanden":"data available","Fehler":"error","bereit":"ready","Der Ortsdienst bittet um eine Pause. Bitte später erneut versuchen.":"The place service asks for a pause. Please try again later.","Gespeichert · PixelStop startet neu":"Saved · PixelStop restarts","Internetverbindung erforderlich":"Internet connection required","Karte konnte nicht geladen werden. Bitte Internetverbindung prüfen oder Koordinaten manuell eingeben.":"The map could not be loaded. Check the internet connection or enter coordinates manually.","Karte wird geladen…":"Loading map…","Kein Ort gefunden.":"No place found.","Keine WLAN-Netze gefunden.":"No Wi-Fi networks found.","Leaflet konnte nicht geladen werden":"Leaflet could not be loaded","Log derzeit nicht erreichbar.":"Log currently unavailable.","Log kopiert":"Log copied","Log markiert · bitte Kopieren wählen":"Log selected · please choose Copy","Ortsdienst für diesen Browser gespeichert":"Place service saved for this browser","Ortsdienst nicht erreichbar. Internetverbindung des Browsers prüfen.":"Place service unreachable. Check the browser's internet connection.","Ortsname wird ermittelt…":"Looking up place name…","PixelStop startet neu…":"PixelStop restarts…","Position ausgewählt · kein Ortsname verfügbar. Optional einen Anzeigenamen eingeben.":"Position selected · no place name available. Optionally enter a display name.","PixelStop derzeit nicht erreichbar.":"PixelStop currently unreachable.","Unbekannter Fehler.":"Unknown error.","Verbindung zum Würfel fehlgeschlagen. Ist der Würfel eingeschaltet und mit dem WLAN verbunden?":"Connection to the cube failed. Is it switched on and connected to Wi-Fi?","Wird gespeichert…":"Saving…","suche Ort…":"searching place…","suche WLAN-Netze…":"scanning Wi-Fi…","✓ Einstellungen gespeichert":"✓ Settings saved","Countdown 1":"Countdown 1","Countdown 2":"Countdown 2","Countdown 3":"Countdown 3","Countdown 4":"Countdown 4"},"prefix":{"Anfrage fehlgeschlagen (":"Request failed (","Ausgewählt: ":"Selected: ","Kartenposition übernommen: ":"Map position applied: ","Ortsdaten © ":"Place data © ","Ortsdienst antwortet mit HTTP ":"Place service answered HTTP ","Position ausgewählt · ":"Position selected · "},"frag":{" · Marker auf Ortsmitte gesetzt":" · marker set to place centre"," · Ortsname wird ermittelt…":" · looking up place name…"," Optional einen Anzeigenamen eingeben.":" Optionally enter a display name."},"lines":{"Netz: ":"Network: ","Freier Heap: ":"Free heap: "," B größter Block)":" B largest block)","Flugradar: ":"Radar: ","Mindestintervall":"minimum interval","Radar-Route: ":"Radar route: ","adsb.lol heute: ":"adsb.lol today: "," Anfragen":" requests"," · mit Schlüssel":" · with key"," von 450 · Tagesbudget-Intervall ":" of 450 · daily budget interval ","Tracker: ":"Tracker: "}})EN"; +static const char WEBUI_EN[] PROGMEM = R"EN({"exact":{"Abfahrten":"Departures","Wetter":"Weather","Flugradar":"Flight radar","Uhr":"Clock","Flug-Tracker":"Flight tracker","Countdown":"Countdown","Anzeige":"Display","System":"System","Abfahrtsmonitor":"Departure board","Anzeigerotation":"Display rotation","Diagnose":"Diagnostics","Wartung":"Maintenance","Status":"Status","WLAN":"Wi-Fi","Dienste und Datenquellen":"Services and data sources","Erweiterte Einstellungen":"Advanced settings","Ortsdienst":"Place search service","Einstellungen speichern":"Save settings","Sprache / Language":"Sprache / Language","Programme anhaken und je Ansicht die Anzeigedauer festlegen. Mit nur einem Haken bleibt die Ansicht dauerhaft stehen.":"Tick the views to show and set how long each one stays. With only one ticked, that view stays permanently.","Helligkeit:":"Brightness:","Nacht-Helligkeit:":"Night brightness:","Nachtmodus":"Night mode","nachts dimmen":"dim at night","Beginn":"Start","Ende":"End","Zeitzone":"Time zone","Lokale Zeit":"Local time","Uhrzeit":"Time","Gilt für Uhr, Footer, Nachtmodus, Wetter-Zeitangaben und Tages-Countdowns. Sommer- und Winterzeit werden nach den Regeln der ausgewählten Zone umgestellt.":"Used for the clock, footer, night mode, weather times and day countdowns. Daylight saving time follows the rules of the selected zone.","Live vom Verkehrsverbund Oberelbe (VVO). Haltestelle suchen, Treffer wählen und Verkehrsmittel auswählen.":"Live from Verkehrsverbund Oberelbe (VVO). Search for a stop, pick a result and choose the modes of transport.","Haltestelle suchen":"Search stop","Haltestelle":"Stop","VVO-Haltestellen-ID":"VVO stop ID","Anzahl Abfahrten":"Number of departures","Aktualisierung":"Refresh","Verkehrsmittel":"Modes of transport","Zug":"Train","S-Bahn":"S-Bahn","Straßenbahn":"Tram","Bus":"Bus","Seil-/Schwebebahn":"Cable car / suspension railway","Fähre":"Ferry","AST / Rufbus":"On-demand bus","Darstellung Fahrziel":"Destination display","Lange Ziele kompakt darstellen":"Show long destinations in small type","Ziele abkürzen (Hbf, Bf, Str., Pl., St.)":"Abbreviate destinations (Hbf, Bf, Str., Pl., St.)","Ortsnamen der Haltestelle weglassen":"Omit the town name of the stop","Beispiel: „Dresden Bühlau“ wird zu „Bühlau“, wenn die Haltestelle in Dresden liegt.":"Example: “Dresden Bühlau” becomes “Bühlau” when the stop itself is in Dresden.","Suchen":"Search","noch keine Haltestelle gewählt":"no stop selected yet","z. B. Pohlandplatz":"e.g. Pohlandplatz","Keine Haltestelle gefunden.":"No stop found.","suche beim VVO…":"searching VVO…","Live von Open-Meteo. Ort suchen und den Beobachtungspunkt auf der Karte exakt setzen. Standort gilt nur für dieses Programm.":"Live from Open-Meteo. Search for a place and set the exact point on the map. The location applies to this view only.","Ort suchen":"Search place","Auf Karte auswählen":"Pick on map","Ausgewählter Standort":"Selected location","Anzeigename":"Display name","optional, leer = gefundener Ortsname":"optional, empty = found place name","Ortsnamen":"Place names","Auf Deutsch anzeigen, wenn verfügbar":"Show in German if available","Breitengrad":"Latitude","Längengrad":"Longitude","Temperatureinheit":"Temperature unit","Celsius (°C)":"Celsius (°C)","Fahrenheit (°F)":"Fahrenheit (°F)","Farbige Darstellung":"Colours","Aktuelle Temperatur farbig darstellen":"Colour the current temperature","3-Tage-Vorhersage im Wechsel anzeigen":"Alternate with a 3-day forecast","z. B. Dresden oder 01237":"e.g. Dresden or 01237","z. B. ZUHAUSE":"e.g. HOME","z. B. Schönefeld":"e.g. Schönefeld","Kartenmaterial © OpenStreetMap-Mitwirkende. Auf die gewünschte Position tippen, um den Standort exakt zu setzen.":"Map data © OpenStreetMap contributors. Tap the desired position to set the exact location.","Live von adsb.lol. Ort suchen und den Beobachtungspunkt auf der Karte exakt setzen. Standort gilt nur für dieses Programm.":"Live from adsb.lol. Search for a place and set the exact point on the map. The location applies to this view only.","Standortname Darstellung":"Location name","Auf dem Display anzeigen":"Show on the display","Standortname Wechselintervall":"Location name interval","Kein Wechsel":"No switching","Radius":"Radius","Zeit seit letztem Abruf anzeigen":"Show time since last update","Zeigt die Sekunden seit dem letzten erfolgreichen Positionsabruf.":"Shows the seconds since the last successful position update.","adsb.lol API-Key":"adsb.lol API key","optional":"optional","Ohne Schlüssel erlaubt adsb.lol nur eine begrenzte Zahl von Anfragen pro Tag und Internetanschluss; für den Dauerbetrieb ohne Schlüssel 3 min wählen. Schlüssel gibt es über die Anfrageseite von adsb.lol. „-“ eintragen und speichern entfernt einen gespeicherten Schlüssel.":"Without a key adsb.lol only allows a limited number of requests per day and internet connection; for continuous use without a key choose 3 min. Keys are available via the adsb.lol request page. Enter “-” and save to remove a stored key.","adsb.lol kann Abfragen je nach Serverauslastung vorübergehend begrenzen. Während einer Anbieterpause bleibt das zuletzt empfangene Flugzeug stehen. Nach einer Anbieterbegrenzung verlängert sich das Aktualisierungsintervall automatisch. Nach 10 Minuten ohne erneute Begrenzung gilt wieder das ausgewählte Intervall.":"adsb.lol may temporarily limit requests depending on server load. During a provider pause the last received aircraft stays on screen. After a limit the refresh interval is extended automatically; after 10 minutes without another limit the selected interval applies again.","Verfolgt genau einen Flug. Plan-/Ist-Zeiten kommen von aviationstack; Höhe und Geschwindigkeit während des Fluges zusätzlich über adsb.lol.":"Follows exactly one flight. Scheduled and actual times come from aviationstack; altitude and speed in flight additionally from adsb.lol.","Flugnummer":"Flight number","aviationstack API-Key":"aviationstack API key","Status-Aktualisierung":"Status refresh","Statusabfragen laufen sparsam und nur, wenn der Tracker tatsächlich angezeigt wird.":"Status requests are sparing and only run while the tracker is actually shown.","z. B. AF1234":"e.g. AF1234","API-Key eintragen":"Enter API key","API-Key gespeichert, leer = behalten":"API key stored, empty = keep","Vier dauerhaft gespeicherte Slots. Tages-Countdowns sind reine Kalendertage; Zeit-Countdowns laufen nach Null automatisch mit Plus weiter.":"Four permanently stored slots. Day countdowns count calendar days; time countdowns continue with a plus sign after zero.","Optionaler Titel":"Optional title","Titelfarbe":"Title colour","Timer-Art":"Timer type","Tage":"Days","Stunden : Minuten : Sekunden":"Hours : Minutes : Seconds","Minuten : Sekunden":"Minutes : Seconds","Zieltag":"Target date","Stunden":"Hours","Minuten":"Minutes","Sekunden":"Seconds","Countdown-Farbe":"Countdown colour","Farbe":"Colour","inaktiv":"inactive","aktiv":"active","Start / aktivieren":"Start / activate","Stoppen":"Stop","z. B. URLAUB":"e.g. VACATION","Countdown gestartet":"Countdown started","Jetzt anzeigen":"Show now","Wird jetzt angezeigt":"Showing now","Koordinaten":"Coordinates","ⓘ Mehr dazu":"ⓘ More info","Countdown gestoppt":"Countdown stopped","Netzwerke suchen":"Scan networks","SSID":"SSID","Passwort":"Password","Hostname":"Hostname","leer = gespeichertes Passwort behalten":"empty = keep stored password","Log laden":"Load log","Log kopieren":"Copy log","Noch nicht geladen.":"Not loaded yet.","lade…":"loading…","Firmware-Update":"Firmware update","Neustart":"Restart","Ortsauswahl über die Internetverbindung dieses Browsers. ©":"Place search via this browser's internet connection. ©","OpenStreetMap-Mitwirkende":"OpenStreetMap contributors","Nutzungsregeln":"Usage policy",": nur manuelle Auswahl, höchstens eine Anfrage pro Sekunde für die Anwendung.":": manual selection only, at most one request per second for the application.","Adresse des Ortsdienstes":"Place search service URL","Nominatim-kompatibler Dienst. Gilt für diesen Browser.":"Nominatim-compatible service. Applies to this browser.","Ortsdienst übernehmen":"Use this service","Für die verwendeten Dienste gelten die Bedingungen der jeweiligen Anbieter. Daten und Verfügbarkeit können eingeschränkt sein.":"The terms of each provider apply to the services used. Data and availability may be limited.","Verkehrsverbund Oberelbe (VVO) ·":"Verkehrsverbund Oberelbe (VVO) ·","Anbieterinformationen":"Provider information","Nutzungsbedingungen":"Terms of use","Radarpositionen und Routen":"Radar positions and routes","API und Datenlizenz":"API and data licence","Zusatzdaten und Routen":"Additional data and routes","Dokumentation und Datenbedingungen":"Documentation and data terms","Karten":"Maps","Copyright und Datenlizenz":"Copyright and data licence","Kartenkacheln":"Map tiles","OpenStreetMap-Kachelserver ·":"OpenStreetMap tile servers ·","Kartenbibliothek":"Map library","Projektinformationen":"Project information","Nutzungshinweise":"Usage notes","Nominatim: nur manuelle Ortssuche, höchstens eine Anfrage pro Sekunde für die Anwendung; Suchergebnisse werden zwischengespeichert. Open-Meteo: die kostenlose API ist für nichtkommerzielle Nutzung vorgesehen. aviationstack benötigt einen eigenen API-Schlüssel und unterliegt dessen Tarifgrenzen.":"Nominatim: manual place search only, at most one request per second for the application; results are cached. Open-Meteo: the free API is intended for non-commercial use. aviationstack requires your own API key and is subject to its plan limits.","adsbdb nennt gesonderte Weiterverwendungsbedingungen für Routendaten. Links und Bedingungen zuletzt geprüft am 11.10.2026.":"adsbdb states separate reuse terms for route data. Links and terms last checked on 11 Oct 2026.","PixelStop · entwickelt von du13500 ·":"PixelStop · developed by du13500 ·","Auf die gewünschte Position in der Karte tippen.":"Tap the desired position on the map.","Bitte die laufende Ortsauswahl abwarten.":"Please wait for the current place lookup.","Bitte eine gültige HTTPS-Adresse eingeben.":"Please enter a valid HTTPS address.","Bitte gültige Flugradar-Koordinaten eingeben.":"Please enter valid radar coordinates.","Bitte gültige Wetter-Koordinaten eingeben.":"Please enter valid weather coordinates.","Bitte mindestens ein Programm für die Anzeige auswählen.":"Please select at least one view.","Bitte mindestens ein Verkehrsmittel auswählen.":"Please select at least one mode of transport.","Bitte mindestens zwei Zeichen eingeben.":"Please enter at least two characters.","Daten vorhanden":"data available","Fehler":"error","bereit":"ready","Der Ortsdienst bittet um eine Pause. Bitte später erneut versuchen.":"The place service asks for a pause. Please try again later.","Gespeichert · PixelStop startet neu":"Saved · PixelStop restarts","Internetverbindung erforderlich":"Internet connection required","Karte konnte nicht geladen werden. Bitte Internetverbindung prüfen oder Koordinaten manuell eingeben.":"The map could not be loaded. Check the internet connection or enter coordinates manually.","Karte wird geladen…":"Loading map…","Kein Ort gefunden.":"No place found.","Keine WLAN-Netze gefunden.":"No Wi-Fi networks found.","Leaflet konnte nicht geladen werden":"Leaflet could not be loaded","Log derzeit nicht erreichbar.":"Log currently unavailable.","Log kopiert":"Log copied","Log markiert · bitte Kopieren wählen":"Log selected · please choose Copy","Ortsdienst für diesen Browser gespeichert":"Place service saved for this browser","Ortsdienst nicht erreichbar. Internetverbindung des Browsers prüfen.":"Place service unreachable. Check the browser's internet connection.","Ortsname wird ermittelt…":"Looking up place name…","PixelStop startet neu…":"PixelStop restarts…","Position ausgewählt · kein Ortsname verfügbar. Optional einen Anzeigenamen eingeben.":"Position selected · no place name available. Optionally enter a display name.","PixelStop derzeit nicht erreichbar.":"PixelStop currently unreachable.","Unbekannter Fehler.":"Unknown error.","Verbindung zum Würfel fehlgeschlagen. Ist der Würfel eingeschaltet und mit dem WLAN verbunden?":"Connection to the cube failed. Is it switched on and connected to Wi-Fi?","Wird gespeichert…":"Saving…","suche Ort…":"searching place…","suche WLAN-Netze…":"scanning Wi-Fi…","✓ Einstellungen gespeichert":"✓ Settings saved","Countdown 1":"Countdown 1","Countdown 2":"Countdown 2","Countdown 3":"Countdown 3","Countdown 4":"Countdown 4"},"prefix":{"Anfrage fehlgeschlagen (":"Request failed (","Ausgewählt: ":"Selected: ","Kartenposition übernommen: ":"Map position applied: ","Ortsdaten © ":"Place data © ","Ortsdienst antwortet mit HTTP ":"Place service answered HTTP ","Position ausgewählt · ":"Position selected · "},"frag":{" · Marker auf Ortsmitte gesetzt":" · marker set to place centre"," · Ortsname wird ermittelt…":" · looking up place name…"," Optional einen Anzeigenamen eingeben.":" Optionally enter a display name."},"lines":{"Netz: ":"Network: ","Freier Heap: ":"Free heap: "," B größter Block)":" B largest block)","Flugradar: ":"Radar: ","Mindestintervall":"minimum interval","Radar-Route: ":"Radar route: ","adsb.lol heute: ":"adsb.lol today: "," Anfragen":" requests"," · mit Schlüssel":" · with key"," von 450 · Tagesbudget-Intervall ":" of 450 · daily budget interval ","Tracker: ":"Tracker: "}})EN"; diff --git a/tools/check.py b/tools/check.py index 679ef6b..3890695 100644 --- a/tools/check.py +++ b/tools/check.py @@ -54,7 +54,7 @@ def handle_starttag(self,t,a): for t in re.findall(r'placeholder="([^"$]+)"',m):need.add(t) for l in re.findall(r"'((?:[^'\\\n]|\\.)*)'",js): if re.search(r'[A-Za-zÄÖÜäöüß]{3,}',l) and (' ' in l.strip() or re.search('[äöüÄÖÜß]',l)) and '<' not in l and 'http' not in l and '${' not in l:need.add(l) -neutral=re.compile(r'^(\d+ (s|min|km)|[A-Z][a-z]+/[A-Za-z_/]+|UTC|GitHub|PixelStop|v|[A-Za-z. /-]+ ·|Deutsch|English| show|hint |toast |SSID|Bus|Hostname)$') +neutral=re.compile(r'^(\d+ (s|min|km)|[A-Z][a-z]+/[A-Za-z_/]+|UTC|GitHub|PixelStop|v|[A-Za-z. /-]+ ·|Deutsch|English| show|hint |toast |SSID|Bus|Hostname|[.#][A-Za-z0-9_.\- #,>:]+)$') known=set(W.EXACT)|set(W.FRAGMENTS)|set(W.LINES) missing=[n for n in sorted(need) if n not in ui_zones and not neutral.match(n) and n not in known and not any(n.startswith(p) for p in W.PREFIX)] assert not missing, 'Missing English web texts: '+repr(missing) diff --git a/tools/render_screens.py b/tools/render_screens.py index 2f97ab8..f193ce9 100644 --- a/tools/render_screens.py +++ b/tools/render_screens.py @@ -255,6 +255,9 @@ def stub_scan(): wx.valid = true; wx.currentC = 8.9f; wx.highC = 11.7f; wx.lowC = 5.6f; wx.rainPct = 70; wx.code = 61; wx.isDay = true; strlcpy(wx.sunrise, "06:31", sizeof wx.sunrise); strlcpy(wx.sunset, "16:42", sizeof wx.sunset); drawWeather(); dump((out + "/wetter.ppm").c_str()); + wx.days = 3; + wx.day[0] = {13.4f, 6.1f, 3, 10}; wx.day[1] = {9.8f, 3.2f, 63, 80}; wx.day[2] = {6.2f, -1.4f, 71, 60}; + weatherPage = 1; drawWeather(true); dump((out + "/vorhersage.ppm").c_str()); weatherPage = 0; // Flugradar cfg.mode = MODE_PLANE; cfg.planePlace = "Dresden-Klotzsche"; cfg.planeShowAge = true; cfg.planeShowPlace = false; @@ -317,7 +320,7 @@ def stub_scan(): img.save(dest / (ppm.stem + '.png')) print(dest / (ppm.stem + '.png')) for sheet_dir in ([out, out / 'en'] if args.sheet else []): - order = ['abfahrten', 'wetter', 'flugradar', 'uhr', 'flugtracker', 'countdown-tage', 'countdown-timer'] + order = ['abfahrten', 'wetter', 'vorhersage', 'flugradar', 'uhr', 'flugtracker', 'countdown-tage', 'countdown-timer'] tiles = [Image.open(sheet_dir / (n + '.png')) for n in order] w, h, gap = tiles[0].width, tiles[0].height, 8 * args.scale cols = 4 diff --git a/tools/test_display.py b/tools/test_display.py index d258177..f9a4b5a 100644 --- a/tools/test_display.py +++ b/tools/test_display.py @@ -55,6 +55,7 @@ def struct(name,file): void drawLine(int x,int y,int x2,int y2,int c){lines.push_back({x,y,x2,y2,c});} void drawPixel(int x,int y,int c){fillRect(x,y,1,1,c);} void drawFastHLine(int x,int y,int w,int c){drawLine(x,y,x+w-1,y,c);} + void drawFastVLine(int x,int y,int h,int c){drawLine(x,y,x,y+h-1,c);} } display; Gfx* gfx=&display; const double PI=3.14159265358979323846; @@ -69,10 +70,10 @@ def struct(name,file): const int COUNTDOWN_DAYS=0; struct CountdownSlot{String title,titleColor="#ffffff",countColor="#ffffff";uint8_t type=1;}; enum Language:uint8_t{LANG_DE=0,LANG_EN=1}; -struct Settings{uint8_t lang=LANG_DE;String trackedFlightNo,aviationstackKey,planePlace,planeDisplayName,stopName,stopId,weatherDisplayName,weatherCity,timeZone;bool planeShowPlace=false,planeShowAge=true,departureCompactDestinations=false,departureAbbreviate=true,departureDropTown=true,weatherTempColor=false;uint16_t planePlaceToggleSec=10;uint8_t departureCount=5;CountdownSlot countdown[4];} cfg; +struct Settings{uint8_t lang=LANG_DE;String stopPlace;String trackedFlightNo,aviationstackKey,planePlace,planeDisplayName,stopName,stopId,weatherDisplayName,weatherCity,timeZone;bool planeShowPlace=false,planeShowAge=true,departureCompactDestinations=false,departureAbbreviate=true,departureDropTown=true,weatherForecast=true,weatherFahrenheit=false,weatherTempColor=false;uint16_t planePlaceToggleSec=10;uint8_t departureCount=5;CountdownSlot countdown[4];} cfg; static String tr(PGM_P de,PGM_P en){return String(cfg.lang==LANG_EN?en:de);} #define TR(de,en) tr(PSTR(de),PSTR(en)) -String lastCountdownRendered[4];uint8_t departurePage=0; +String lastCountdownRendered[4];uint8_t departurePage=0;uint8_t weatherPage=0; uint16_t color565(const String&){return C_WHITE;} String timerValue="00:01:09"; String countdownValue(const CountdownSlot&){return timerValue;} @@ -195,6 +196,12 @@ def struct(name,file): weather.rainPct=20;clearDraws();drawWeather(false);assert(fullScreens==0&&draws.size()==1&&draws[0].text=="REGEN 20%"); weather.error=true;clearDraws();drawWeather(false);assert(fullScreens==0&&footer=="LIVE / LETZTER STAND"); // Departures: unchanged response stays, minutes alone redraw one field. + cfg.stopName="S-Bahnhof Reick";cfg.stopPlace="Dresden"; + assert(departureText("Dresden Flughafen",true)=="Flughafen"); + assert(departureText(cfg.stopName.c_str(),false)=="S-Bahnhof Reick"); + cfg.stopPlace="";assert(departureText("Dresden Flughafen",true)=="Flughafen"); + cfg.stopPlace="Pirna";assert(departureText("Pirna Copitz",true)=="Copitz"&&departureText("Dresden Hauptbahnhof",true)=="Dresden Hbf"); + cfg.stopPlace="";cfg.stopName="Freital, Bahnhof";assert(departureText("Freital Deuben",true)=="Deuben"); cfg.stopId="123";cfg.stopName="Haltestelle";departureN=2; strcpy(departures[0].line,"4");strcpy(departures[0].direction,"Laubegast");departures[0].minutes=3; strcpy(departures[1].line,"65");strcpy(departures[1].direction,"Heidenau");departures[1].minutes=8; @@ -219,7 +226,7 @@ def struct(name,file): } ''' pre+='\nstatic bool lastPlanePauseRendered=false,lastPlaneAgeRendered=true;\n' -names=['nextCodepoint','glyphCount','drawSpecialGlyph','textW','crop','stopTown','departureText','beginView','visibleText','visibleCenter','planePlaceTitle','drawPlaneHeader','routePart','drawFlightRoute','samePlane','planeDistance','planeAltitude','compactType','planeFooterLabel','drawPlaneAge','drawPlaneFooter','drawPlane','drawTrackedFlight','drawCloud','drawSun','drawMoon','drawSnowflake','drawWeatherIcon','drawSunEventIcon','drawWeather','drawDepartures','segMask','drawSevenDigit','sevenUnit','sevenCharWidth','drawSevenString','drawCountdown','drawClock'] +names=['nextCodepoint','glyphCount','drawSpecialGlyph','textW','crop','stopTown','departureText','beginView','visibleText','visibleCenter','planePlaceTitle','drawPlaneHeader','routePart','drawFlightRoute','samePlane','planeDistance','planeAltitude','compactType','planeFooterLabel','drawPlaneAge','drawPlaneFooter','drawPlane','drawTrackedFlight','wxLen','drawCloud','drawSun','drawMoon','drawSnowflake','drawWeatherIconAt','drawWeatherIcon','drawSunEventIcon','centerTextIn','drawForecast','drawWeather','drawDepartures','segMask','drawSevenDigit','sevenUnit','sevenCharWidth','drawSevenString','drawCountdown','drawClock'] with tempfile.TemporaryDirectory() as t: p=Path(t);(p/'test.cpp').write_text(pre+'\n'+'\n'.join(fn(name) for name in names)+'\n'+post) subprocess.run(['g++','-std=c++11','-Wall','-Wextra','-Werror','-I'+str(root/'src'),str(p/'test.cpp'),'-o',str(p/'test')],check=True) diff --git a/tools/webui_en.py b/tools/webui_en.py index c1e580a..daadeba 100644 --- a/tools/webui_en.py +++ b/tools/webui_en.py @@ -51,6 +51,7 @@ "Breitengrad": "Latitude", "Längengrad": "Longitude", "Temperatureinheit": "Temperature unit", "Celsius (°C)": "Celsius (°C)", "Fahrenheit (°F)": "Fahrenheit (°F)", "Farbige Darstellung": "Colours", "Aktuelle Temperatur farbig darstellen": "Colour the current temperature", + "3-Tage-Vorhersage im Wechsel anzeigen": "Alternate with a 3-day forecast", "z. B. Dresden oder 01237": "e.g. Dresden or 01237", "z. B. ZUHAUSE": "e.g. HOME", "z. B. Schönefeld": "e.g. Schönefeld", "Kartenmaterial © OpenStreetMap-Mitwirkende. Auf die gewünschte Position tippen, um den Standort exakt zu setzen.": "Map data © OpenStreetMap contributors. Tap the desired position to set the exact location.", @@ -79,7 +80,8 @@ "Stunden : Minuten : Sekunden": "Hours : Minutes : Seconds", "Minuten : Sekunden": "Minutes : Seconds", "Zieltag": "Target date", "Stunden": "Hours", "Minuten": "Minutes", "Sekunden": "Seconds", "Countdown-Farbe": "Countdown colour", "Farbe": "Colour", "inaktiv": "inactive", "aktiv": "active", "Start / aktivieren": "Start / activate", "Stoppen": "Stop", "z. B. URLAUB": "e.g. VACATION", - "Countdown gestartet": "Countdown started", "Countdown gestoppt": "Countdown stopped", + "Countdown gestartet": "Countdown started", + "Jetzt anzeigen": "Show now", "Wird jetzt angezeigt": "Showing now", "Koordinaten": "Coordinates", "ⓘ Mehr dazu": "ⓘ More info", "Countdown gestoppt": "Countdown stopped", # System "Netzwerke suchen": "Scan networks", "SSID": "SSID", "Passwort": "Password", "Hostname": "Hostname", "leer = gespeichertes Passwort behalten": "empty = keep stored password", "Log laden": "Load log", "Log kopieren": "Copy log",