src.nth.io/

summaryrefslogtreecommitdiff
path: root/main/app_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/app_main.c')
-rw-r--r--main/app_main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/main/app_main.c b/main/app_main.c
index c411c46..a60496d 100644
--- a/main/app_main.c
+++ b/main/app_main.c
@@ -103,13 +103,16 @@ static void display_setup_task(void *arg)
ESP_LOGI(TAG, "display subsystems [%s] up", flags);
- // Wake the display on boot. Empirically the FT5426 touch IC only
- // reports contacts when the LCD is actively streaming with the
- // backlight on — booting straight into ASLEEP leaves taps silently
- // unread. The idle timer (idle_timeout_ms) puts the device back to
- // sleep on its own if nothing happens.
+ // Briefly wake the display on boot so the FT5426 touch IC can come
+ // out of its initial unresponsive state — empirically it only
+ // reports contacts when the LCD has been actively streaming with
+ // the backlight on at least once since power-up. A 600 ms flash is
+ // enough; we then sleep so an idle device doesn't burn the
+ // backlight until the idle timer fires.
if (dsp_err == ESP_OK) {
state_machine_set(VIEWPORT_STATE_AWAKE);
+ vTaskDelay(pdMS_TO_TICKS(600));
+ state_machine_set(VIEWPORT_STATE_ASLEEP);
}
vTaskDelete(NULL);