Skip to content

Feature/touch#39

Open
CrispinPZA wants to merge 5 commits into
MatixYo:mainfrom
CrispinPZA:feature/touch
Open

Feature/touch#39
CrispinPZA wants to merge 5 commits into
MatixYo:mainfrom
CrispinPZA:feature/touch

Conversation

@CrispinPZA

Copy link
Copy Markdown

On boards with a CST816 capacitive touch panel (e.g. ESP32-2424S012), tapping an
aircraft opens a full-screen details dialog; tapping again closes it.

  • Board registry + LGFX config gain CST816 touch pins (I2C) via Panel::setTouch,
    so tft.getTouch() works.
  • radar_display records drawn aircraft positions and exposes a hit-test plus a
    dialog renderer that blanks the screen and lists the details.
  • Detail fields (airline, type, altitude, speed, track, distance, position) are
    each toggled by a portal checkbox; a "Dialog text scale" value scales the
    dialog font. Both persist to NVS.

-- note - this pr builds on my previous two so best to ensure those are in before this.

CrispinPZA and others added 5 commits June 19, 2026 19:26
The project targeted only the ESP32-C3 Super Mini with a separately wired
GC9A01. Add support for the Sunton/JCZN ESP32-2424S012 integrated round board
(different SPI pins, GPIO3 active-high backlight, BGR color order) without
breaking the Super Mini default.

- Add include/hardware/board.h + src/hardware/board.cpp: a board registry with
  a per-board pin/color-order table, compile-time default, and an NVS-backed
  runtime override.
- Move display pins/color order out of config.h into the board registry.
- lgfx_config: applyBoard() (re)configures the SPI bus and panel from a board.
- display/radar_display: use the active board for pins, backlight, color order.
  Backlight is driven directly (the ESP32-C3 has only 6 LEDC channels).
- Wi-Fi portal: add a Board dropdown; selection persists to NVS and reboots to
  apply, so one image can run on either board.
- platformio.ini: add the esp32-2424s012 env (sets the build-time default).
- README: document supported boards, wiring, build envs, and selection.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Print the active radar lat/lon (and whether it came from NVS or the default) at
startup, and list each fetched aircraft's callsign/flight, position, altitude,
track and ground speed. Aids debugging location and ADS-B issues.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolve each flight's airline from its callsign's ICAO prefix (e.g. BAW in
BAW123) via a curated lookup table holding the ICAO code, IATA acronym, full
name, and a friendly short name.

A new Show: selector in the Wi-Fi setup portal chooses None / Full Airline
Name / Airline Abbreviation, persisted to NVS. When set and the callsign
resolves, the airline is rendered as an extra line on the aircraft tag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
On boards with a CST816 capacitive touch panel (e.g. ESP32-2424S012), tapping
an aircraft opens a full-screen details dialog; tapping again closes it.

- board registry + LGFX config gain CST816 touch pins (I2C), wired via
  Panel::setTouch so tft.getTouch() works.
- radar_display records drawn aircraft screen positions and exposes a hit-test
  plus a dialog renderer that blanks the screen and lists the details.
- Detail fields (airline, type, altitude, speed, track, distance, position) are
  each toggled by a portal checkbox; a Dialog text scale value scales the dialog
  font. Both persist to NVS.
Three enhancements developed together on top of the touch dialog; they share the
dialog, render, and portal files, so are committed as one:

- Flight dialog departure/arrival: on-tap callsign route lookup via the
  adsbdb.com API (services/route), shown as airport code plus city; toggled by
  the dialog-field checkboxes.
- Rotating radar sweep (green 8BF688, 25 deg, fading to 0): composited with the
  grid and aircraft into one buffer and pushed as a single flicker-free frame;
  kept animating during ADS-B fetches via the network poll callback.
- ADS-B fetch interval is now a portal setting (3 to 30 s, default 3) instead of
  a fixed compile-time value, to trade update frequency for sweep smoothness.

Also: reuse the HTTPS connection to avoid a TLS handshake every poll, filter the
ADS-B JSON to only the fields used, and enable SPI DMA.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant