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:
@@ -214,7 +214,8 @@ void DisplayIdleService::tick() {
|
||||
}
|
||||
displayDimmed = false;
|
||||
}
|
||||
} else {
|
||||
} else if (supportsBacklight) {
|
||||
// For backlight-capable displays: full idle handling
|
||||
bool charging_blocks = cachedDisplaySettings.disableScreensaverWhenCharging && isDeviceCharging();
|
||||
|
||||
if (!displayDimmed && inactive_ms >= cachedDisplaySettings.backlightTimeoutMs) {
|
||||
@@ -227,7 +228,7 @@ void DisplayIdleService::tick() {
|
||||
activateScreensaver();
|
||||
lvgl::unlock();
|
||||
if (cachedDisplaySettings.screensaverType == settings::display::ScreensaverType::None) {
|
||||
if (supportsBacklight && display != nullptr) {
|
||||
if (display != nullptr) {
|
||||
display->setBacklightDuty(0);
|
||||
}
|
||||
}
|
||||
@@ -240,6 +241,14 @@ void DisplayIdleService::tick() {
|
||||
stopScreensaver();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// For monochrome/RLCD (no backlight): don't auto-enter screensaver (heavy full_refresh SPI causes freeze)
|
||||
// Only handle wake if we are somehow dimmed (e.g. MCP left it)
|
||||
if (displayDimmed && !isMcpActive) {
|
||||
if (inactive_ms < kWakeActivityThresholdMs) {
|
||||
stopScreensaver();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user