From 865c4859d710870245ae7954e729edcaf442a921 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Sun, 14 Jun 2026 20:11:21 -0500 Subject: Default name = MAC; brief wake on boot; drop dead touch defences MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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. --- main/display.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'main/display.c') 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(). -- cgit v1.2.3