upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/main/display.c
AgeCommit message (Collapse)Author
2026-05-19feat: web-based WiFi setup via captive portal, portrait-only displayYour Name
- Remove touchscreen WiFi setup (touch.c, keyboard.c, wifi_setup.c from build) - Remove offscreen buffer and landscape rotation from axs15231b driver - Add /setup HTML page with WiFi scan/connect via captive portal - Add /wifi/scan, /wifi/connect, /wifi/status HTTP endpoints - Display shows SETUP_PENDING (QR + SSID + setup URL) when unconfigured - Display shows ERROR with setup URL when upstream is down - All 101 unit tests pass, builds and flashes to Board C
2026-05-19Dynamic layout for WiFi setup: landscape rotation, responsive render, ↵Your Name
highlight feedback - Render functions use axs15231b_get_width/height() instead of hardcoded coords - render_wifi_setup_list: dynamic item widths, screen-relative cancel button - render_wifi_setup_password: dynamic field/eye/keyboard from kb_get_layout() - render_wifi_setup_result: centered on screen, dynamic button placement - handle_wifi_setup_touch: matching dynamic hit areas, highlight_rect() feedback - Rotation lifecycle: enter_wifi_setup_rotation/exit wired into all entry/exit paths - display_enter_wifi_setup + READY/ERROR touch + SUCCESS auto-return + LIST cancel - Added kb_result_t typedef to keyboard.h (was only in .c) - Fixed test_keyboard.c: use computed offsets from kb_layout_t defaults - All 101 unit tests pass (touch:19, keyboard:46, wifi_setup:36)
2026-05-18fix: keyboard KB_START_Y must match render position (70), simplify row 3 layoutYour Name
- KB_START_Y was 310 but keyboard rendered at y=70 — touch hits never matched - Row 3 simplified to 3 keys: [layer/shift, space, done] - All 362 unit tests pass
2026-05-18fix: prevent IntegerDivideByZero in config_get_next_wifi when no networksYour Name
- Check network_count == 0 before modulo operation - Disconnect STA before WiFi scan to avoid 'STA is connecting, scan not allowed' - Add error handling for failed WiFi scans - This fixes the crash/restart loop on Board C with no configured WiFi
2026-05-18feat: integrate touchscreen WiFi setup into display UIYour Name
- Add DISPLAY_WIFI_SETUP state with full rendering pipeline - Touch init on display_init(), touch polling in display task - WiFi scan triggered on setup entry, sorted AP list - On-screen keyboard for password entry - Connect result via WiFi event notifications - Setup button on READY and ERROR screens - Auto-enter WiFi setup on first boot with no credentials - Save new WiFi credentials to SPIFFS config.json
2026-05-18Sync display with live TollGate stateYour Name
- Periodic refresh: wallet balance + client count every 5s from main loop - display_notify_payment() API: passes payment amount and time allotment - tollgate_api.c: triggers PAYMENT_RECEIVED state after wallet receive - AP station events update client count in real-time - Config data (price, mint) passed to display during boot phase - Payment screen shows actual sats paid and time purchased - Updated DISPLAY_UI_PLAN.md with state-sync audit and checklist
2026-05-18Implement full TollGate display UIYour Name
- BOOT screen: centered title + WiFi status line - READY screen: QR cycling (WiFi/Portal), price, mint domain, wallet balance (color-coded), client count - PAYMENT screen: green banner 'ACCESS GRANTED', paid amount, time - ERROR screen: red banner 'NO UPSTREAM', guidance, AP reassurance - Enhanced display_update() API with mint_url, price, wifi_status - Extract domain helper for clean mint URL display - Render interval: 2s (reduced SPI load) - Color palette: cyan, yellow, orange, green, red, dim gray - WiFi events update display status and trigger ERROR state - Board C now on /dev/ttyACM3
2026-05-18Fix display: add RAMWR before pixel data, correct colors, smaller textYour Name
Root cause: missing RAMWR (0x2C) command before pixel data transfer. Without RAMWR, the display didn't know to write data into the RAM window set by CASET/RASET, causing wrapping and double-vision artifacts. - Add qspi_write_command(RAMWR) before pixel data in flush() - Use internal DMA byte-swap buffer (MALLOC_CAP_DMA) for correct colors - Reduce font scale: TollGate scale 2, starting... scale 1 - Centered text positions for 320x480 portrait Display now shows: blue TollGate + yellow starting... on black
2026-05-18Fix display colors with internal DMA byte-swap bufferYour Name
- Allocate 4KB internal DMA buffer (MALLOC_CAP_DMA) for pixel byte-swap - Byte-swap from PSRAM framebuffer into DMA buffer in 2048-pixel chunks - Matches ArduinoGFX approach: separate DMA buffer avoids PSRAM cache issues - Restore render-on-change logic (only redraw on state/QR mode change) - Use saturated colors: cyan 0x07FF for title, yellow 0xFFE0 for subtitle - Remove debug flush log message
2026-05-18Document QSPI protocol findings and display fix planYour Name
- DISPLAY_FIX_PLAN.md: root cause analysis, byte-order mismatch, PSRAM cache coherency issue, reference implementations studied - axs15231b.c: QSPI protocol rewrite with correct ArduinoGFX framing (cmd=0x02 for regs, cmd=0x32/addr=0x003C00 for pixels) - display.c: portrait centering for 320x480, render-on-change logic - Makefile: Board C support (flash-c, lock-c) - axs15231b.h: QSPI command/address constants Display shows recognizable text, colors wrong due to byte-swap
2026-05-18track: add display abstraction layer and bitmap fontYour Name