v2.1: Fix persistent radar screen flickering (header overlap, label backgrounds, orphaned trails)
This commit is contained in:
@@ -10,10 +10,7 @@ namespace {
|
||||
constexpr int16_t STATUS_START_Y = 260;
|
||||
constexpr uint8_t MAX_STATUS_LINES = 3;
|
||||
|
||||
// Dezente konzentrische Ringe + Fadenkreuz als "Zielfernrohr"-Hintergrund,
|
||||
// in gedaempftem Gruen (gleicher Ton wie die Sweep-Nachzieh-Linie im
|
||||
// Radar-Bildschirm), damit das Flugzeug wie ins Visier genommen wirkt.
|
||||
// UNVERAENDERT gegenueber vorher - nur das Flugzeug wurde verkleinert/gedreht.
|
||||
// Dezente konzentrische Ringe + Fadenkreuz als "Zielfernrohr"-Hintergrund
|
||||
void drawRadarReticle(TFT_eSPI& tft, int16_t cx, int16_t cy) {
|
||||
uint16_t dim = 0x0320;
|
||||
tft.drawCircle(cx, cy, 80, dim);
|
||||
@@ -23,10 +20,22 @@ namespace {
|
||||
tft.drawFastVLine(cx, cy - 80, 160, dim);
|
||||
}
|
||||
|
||||
// Flugzeug-Silhouette: 40% kleiner (Skalierung 0.6) und 25 Grad im
|
||||
// Uhrzeigersinn gedreht (Nase zeigt jetzt leicht nach rechts), um den
|
||||
// Reticle-Mittelpunkt (cx, 174) - der Radar-Kreis selbst bleibt exakt
|
||||
// gleich gross wie vorher.
|
||||
// Echte kleine Jet-Silhouette für den Hintergrund
|
||||
void drawMiniJet(TFT_eSPI& tft, int16_t x, int16_t y, uint16_t color) {
|
||||
tft.drawLine(x, y - 10, x, y + 12, color);
|
||||
tft.drawLine(x - 12, y + 2, x + 12, y + 2, color);
|
||||
tft.drawLine(x - 5, y + 10, x + 5, y + 10, color);
|
||||
}
|
||||
|
||||
// Echte kleine Helikopter-Silhouette für den Hintergrund
|
||||
void drawMiniHeli(TFT_eSPI& tft, int16_t x, int16_t y, uint16_t color) {
|
||||
tft.drawLine(x - 8, y - 6, x + 8, y - 6, color);
|
||||
tft.drawLine(x, y - 6, x, y + 4, color);
|
||||
tft.drawCircle(x, y + 2, 4, color);
|
||||
tft.drawLine(x - 4, y + 7, x + 4, y + 7, color);
|
||||
}
|
||||
|
||||
// Haupt-Flugzeug in der Mitte (Unverändert)
|
||||
void drawAirplane(TFT_eSPI& tft, int16_t cx) {
|
||||
uint16_t color = TFT_GREEN;
|
||||
|
||||
@@ -49,6 +58,18 @@ void begin(TFT_eSPI& tft) {
|
||||
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
drawRadarReticle(tft, cx, 174);
|
||||
|
||||
// Hintergrund-Flugzeuge & Helikopter dezent im Hintergrund - gleicher
|
||||
// gedaempfter Gruenton wie die Radar-Ringe (0x0320), NICHT das volle
|
||||
// TFT_GREEN (das war vorher gleich hell wie das zentrale Flugzeug und
|
||||
// wirkte dadurch nicht wie ein dezenter Hintergrund).
|
||||
uint16_t dimGreen = 0x0320;
|
||||
drawMiniJet(tft, cx - 45, 135, dimGreen);
|
||||
drawMiniJet(tft, cx + 50, 160, dimGreen);
|
||||
drawMiniHeli(tft, cx - 35, 215, dimGreen);
|
||||
drawMiniHeli(tft, cx + 45, 115, dimGreen);
|
||||
|
||||
// Zentrales Flugzeug (unverändert im Vordergrund)
|
||||
drawAirplane(tft, cx);
|
||||
|
||||
tft.setTextDatum(MC_DATUM);
|
||||
|
||||
Reference in New Issue
Block a user