#pragma once #include #include namespace RadarScreen { void render(TFT_eSPI& tft, int16_t top); void tick(TFT_eSPI& tft, int16_t top, uint32_t deltaMs); bool handleTap(TFT_eSPI& tft, int16_t x, int16_t y, int16_t top); void updateProximityAlert(uint32_t nowMs); // Switchable table view: shows a sortable list of aircraft directly // on the radar screen (toggled via a "L" button in the info bar). // Returns true if user selected an aircraft (opens detail panel). bool runTable(TFT_eSPI& tft, int16_t top); // Opens an alphanumeric keypad to search for an aircraft by callsign // or hex code. If found, opens the detail panel. If not, shows a brief // "not found" message and returns to the keypad. void runSearch(TFT_eSPI& tft, int16_t top); // Waehlt ein Flugzeug programmgesteuert aus (z.B. von der Flugzeugliste // aus, nicht per Antippen auf dem Radar) - damit beim naechsten render() // sofort das Detail-Panel fuer dieses Flugzeug erscheint, so als haette // man es direkt im Radar angetippt. void selectAircraft(const char* hex, const char* callsign); struct EmergencyInfo { bool active = false; char callsign[9] = {0}; char squawk[5] = {0}; }; EmergencyInfo checkEmergency(); }