fix: prevent idle freeze by hardening NTP and clock power management
BootNtpSync now acquires a HalPowerManager::Lock for the entire WiFi/NTP task lifecycle, keeping the CPU at full speed during scan, connect, sync, and teardown. The clock refresh logic in the main loop now explicitly restores CPU frequency and resets the activity timer before requesting a render, preventing display SPI operations from running at 10 MHz. Made-with: Cursor
This commit is contained in:
@@ -416,9 +416,13 @@ void loop() {
|
||||
if (lastRenderedMinute < 0) {
|
||||
lastRenderedMinute = currentMinute;
|
||||
if (sawInvalidTime) {
|
||||
lastActivityTime = millis();
|
||||
powerManager.setPowerSaving(false);
|
||||
activityManager.requestUpdate();
|
||||
}
|
||||
} else if (currentMinute != lastRenderedMinute) {
|
||||
lastActivityTime = millis();
|
||||
powerManager.setPowerSaving(false);
|
||||
activityManager.requestUpdate();
|
||||
lastRenderedMinute = currentMinute;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user