diff options
| author | Luke Hoersten <[email protected]> | 2026-06-14 20:11:21 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-06-14 20:11:21 -0500 |
| commit | 865c4859d710870245ae7954e729edcaf442a921 (patch) | |
| tree | c22cb7d60fb8ea3bba6e9e85b45779d0dfa87d4f /main/display.c | |
| parent | 8e2de89efb540fd6a3dce2086216d3afc49e6831 (diff) | |
Default name = MAC; brief wake on boot; drop dead touch defences
- Seed viewport_name with the full base MAC, colons stripped
(e8:f6:0a:e0:90:94 → "e8f60ae09094"). Stable across reboots, globally
unique, 12 alphanumeric chars — well inside the mDNS hostname limit
even with the "viewport-" prefix.
- Add a mac_str field to viewport_state and expose it as the new "mac"
key in GET /state and as a "mac" line on the info screen.
- "Configured" no longer requires a viewport_name (it always has the
MAC default); the scrypted URL alone gates outbound POSTs and the
loading-vs-info screen choice.
- Strip viewport_name[0] fallbacks in http_api / mdns / local_screens
now that the field is never empty.
- Replace the wake-on-boot-stays-on behaviour with a ~600 ms flash
followed by sleep — long enough for the FT5426 touch IC to come out
of its initial unresponsive state, short enough that an idle device
doesn't burn the backlight.
- Drop the touch defensive cruft added when we were chasing a PoE-power
theory: the DEV_MODE=0x00 write at init, the touch_reset_pulse() call
at init, and the runtime wedge-self-heal in the polling loop didn't
actually fix anything — the wake-on-boot flash did. Also delete the
display_touch_reset_pulse() helper since it now has zero callers.
Diffstat (limited to 'main/display.c')
| -rw-r--r-- | main/display.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/main/display.c b/main/display.c index 8c5ffb2..a704891 100644 --- a/main/display.c +++ b/main/display.c @@ -218,22 +218,6 @@ static esp_err_t touch_release_reset(void) PC_LED_EN | PC_RST_TP_N | PC_RST_LCD_N | PC_RST_BRIDGE_N); } -// Hard-reset the touch IC: drop PC_RST_TP_N for ~20 ms, then release. -// touch_init() calls this if its dev_mode read keeps returning 0xff — -// usually unwedges a stuck FT5426 without needing a power cycle. -esp_err_t display_touch_reset_pulse(void) -{ - if (!s_panel_mcu) return ESP_ERR_INVALID_STATE; - // Hold touch in reset (clear PC_RST_TP_N), keep everything else as-is. - esp_err_t err = mcu_write_u8(REG_PORTC, - PC_LED_EN | PC_RST_LCD_N | PC_RST_BRIDGE_N); - if (err != ESP_OK) return err; - vTaskDelay(pdMS_TO_TICKS(20)); - err = touch_release_reset(); - vTaskDelay(pdMS_TO_TICKS(50)); - return err; -} - // ============================================================================ // TC358762 bridge configuration (DSI Generic Long Write packets) // Sequence mirrors Linux drivers/gpu/drm/bridge/tc358762.c tc358762_init(). |
