fix(provisioning): drop the 2-minute QR display delay

The 15s FIRST_IMAGE_POLL_INTERVAL_MS bootstrap already keeps the QR on
the panel (204 responses don't trigger a redraw) until the user claims
via /setup/{mac} and the server's bootstrap-bypass serves an image. The
hard-coded delay(120000) was just dead time between WiFi save and the
first poll — observed in the field as ~110s of nothing happening after
login.

Also touches operation.h header comments to match the "hold until the
screen flashes" terminology and document the short-press fast-poll
gesture.
This commit is contained in:
2026-05-08 19:11:02 -04:00
parent e37df03b7f
commit e7f0a11ad3
2 changed files with 11 additions and 6 deletions
+7 -4
View File
@@ -316,13 +316,16 @@ void normal_operation_impl(const String& mac, HTTP& http, const String& url, Pre
}
esp_sleep_enable_timer_wakeup(sleepMs * 1000ULL);
// Wake on the BOOT button so the user-facing 5-second-hold reset works
// even during deep sleep. Without this, the button only does anything
// during the brief poll-and-paint window when the device is awake, and
// a full sleep cycle (default minutes) of holding does nothing.
// Wake on the BOOT button so the user-facing "hold until the screen
// starts to flash" reset works even during deep sleep. Without this,
// the button only did anything during the brief awake window during
// a poll, and a full sleep cycle of holding did nothing.
// Pin is GPIO 0 (PIN_BTN_RESET); active-low because BOOT is pulled-up
// and shorts to ground on press. After EXT0 wakes the chip, setup()
// runs and check_reset_button() handles the remainder of the hold.
// A too-short press wakes the device but check_reset_button returns
// false → normal_operation_impl runs → the next poll fetches a fresh
// image, which doubles as a "force refresh" gesture.
esp_sleep_enable_ext0_wakeup((gpio_num_t)PIN_BTN_RESET, 0);
esp_deep_sleep_start();
}