fix(rlcd): freeze after flash - disable auto-screensaver on monochrome + reduce video stream hog

Frozen screen caused by 2 runtime issues after init fixes 3770ac89:
- BouncingBalls screensaver full_refresh SPI at 10MHz for 300x400 takes ~100ms per frame, hogs LVGL lock -> UI appears frozen stuck on weird image
- MCP video stream task vTaskDelay 5ms streaming holds LVGL lock too often -> starves UI and screenshot (could not acquire LVGL lock)

Fix:
- DisplayIdle tick: for !supportsBacklight (RLCD) don't auto-activate screensaver, only handle wake. Prevents heavy animation entering automatically after timeout (SD may have 60s setting).
- McpSystem video stream: 50ms->100ms idle, 5ms->30ms streaming to release LVGL lock
- Screenshot API: 100ms->500ms lock timeout, task 50->300ms for slow SPI

Build 0x2b79e0 RLCD, flashed.

Co-Authored-By: internal-model
This commit is contained in:
Adolfo Reyna
2026-07-11 22:00:00 -04:00
parent 3770ac8954
commit 6f095081d2
4 changed files with 18 additions and 8 deletions
@@ -1506,8 +1506,8 @@ esp_err_t WebServerService::handleApiScreenshot(httpd_req_t* request) {
// LVGL's lodepng uses lv_fs which requires the "A:" prefix
std::string lvgl_screenshot_path = lvgl::PATH_PREFIX + screenshot_path;
// Capture screenshot using LVGL
if (lvgl::lock(pdMS_TO_TICKS(100))) {
// Capture screenshot using LVGL — increased timeout for RLCD monochrome (SPI slow)
if (lvgl::lock(pdMS_TO_TICKS(500))) {
bool success = lv_screenshot_create(lv_scr_act(), LV_100ASK_SCREENSHOT_SV_PNG, lvgl_screenshot_path.c_str());
lvgl::unlock();
@@ -1518,7 +1518,7 @@ esp_err_t WebServerService::handleApiScreenshot(httpd_req_t* request) {
}
LOGGER.info("Screenshot captured successfully");
} else {
LOGGER.error("Could not acquire LVGL lock within 100ms");
LOGGER.error("Could not acquire LVGL lock within 500ms");
httpd_resp_send_err(request, HTTPD_500_INTERNAL_SERVER_ERROR, "could not acquire LVGL lock");
return ESP_FAIL;
}