Fix header not reappearing after menu exit

This commit is contained in:
2026-08-15 22:29:44 +02:00
parent aae8890942
commit b807b51f1f

View File

@@ -344,7 +344,7 @@ void drawHeader() {
tft.setTextColor(TFT_WHITE, TFT_BLACK); tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.setTextSize(1); tft.setTextSize(1);
tft.setCursor(6, 10); tft.setCursor(6, 10);
tft.println("Leos FR"); tft.println("Leos Radar");
drawMenuButton(); drawMenuButton();
updateWifiIcon(); updateWifiIcon();
drawWeatherIcon(); drawWeatherIcon();
@@ -685,10 +685,8 @@ void loop() {
} }
if (tapped) { if (tapped) {
if (menuBtn.contains(tap.x, tap.y)) { if (menuBtn.contains(tap.x, tap.y)) {
MenuScreen::run(tft); MenuScreen::run(tft);
drawHeader();
updateStatusLine();
forceRedraw = true; forceRedraw = true;
} else if (weatherIconRect.contains(tap.x, tap.y)) { } else if (weatherIconRect.contains(tap.x, tap.y)) {
showWeatherInfo(tft); showWeatherInfo(tft);
@@ -716,8 +714,10 @@ void loop() {
uint32_t currentVersion = AircraftTable::version(); uint32_t currentVersion = AircraftTable::version();
if (forceRedraw || currentVersion != lastRenderedVersion) { if (forceRedraw || currentVersion != lastRenderedVersion) {
lastRenderedVersion = currentVersion; lastRenderedVersion = currentVersion;
forceRedraw = false; forceRedraw = false;
RadarScreen::render(tft, CONTENT_TOP); RadarScreen::render(tft, CONTENT_TOP);
drawHeader();
updateStatusLine();
lastSweepMs = millis(); lastSweepMs = millis();
} }
} }