diff options
| author | Your Name <you@example.com> | 2026-05-18 22:55:37 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-18 22:55:37 +0530 |
| commit | 46e7dabaf80333ca045061ff480377a4186e5deb (patch) | |
| tree | 06bd62bed43e15c432cc27faf20993a50d7c3cee /main/display.h | |
| parent | eb2ae72d91a4b2ec0333a2e6d18eeeeee6b60464 (diff) | |
feat: integrate touchscreen WiFi setup into display UI
- 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
Diffstat (limited to 'main/display.h')
| -rw-r--r-- | main/display.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/display.h b/main/display.h index 49b3ffd..e8824b6 100644 --- a/main/display.h +++ b/main/display.h | |||
| @@ -9,7 +9,8 @@ typedef enum { | |||
| 9 | DISPLAY_BOOT, | 9 | DISPLAY_BOOT, |
| 10 | DISPLAY_READY, | 10 | DISPLAY_READY, |
| 11 | DISPLAY_PAYMENT_RECEIVED, | 11 | DISPLAY_PAYMENT_RECEIVED, |
| 12 | DISPLAY_ERROR | 12 | DISPLAY_ERROR, |
| 13 | DISPLAY_WIFI_SETUP | ||
| 13 | } display_state_t; | 14 | } display_state_t; |
| 14 | 15 | ||
| 15 | typedef enum { | 16 | typedef enum { |
| @@ -24,6 +25,9 @@ void display_update(const char *ap_ssid, int active_clients, | |||
| 24 | const char *mint_url, int price_per_step, | 25 | const char *mint_url, int price_per_step, |
| 25 | const char *wifi_status); | 26 | const char *wifi_status); |
| 26 | void display_notify_payment(int amount_sats, int64_t allotment_ms); | 27 | void display_notify_payment(int amount_sats, int64_t allotment_ms); |
| 28 | void display_notify_wifi_connected(const char *ip); | ||
| 29 | void display_notify_wifi_disconnected(void); | ||
| 30 | void display_enter_wifi_setup(void); | ||
| 27 | void display_render_text(int x, int y, const char *text, uint16_t fg, uint16_t bg, int scale); | 31 | void display_render_text(int x, int y, const char *text, uint16_t fg, uint16_t bg, int scale); |
| 28 | void display_render_qr(const char *text); | 32 | void display_render_qr(const char *text); |
| 29 | 33 | ||