Review comments

This commit is contained in:
jpirnay
2026-03-18 13:09:58 +01:00
parent ec864a25e0
commit 72b00e1829
+6 -5
View File
@@ -347,11 +347,6 @@ void loop() {
powerManager.setPowerSaving(false); // Restore normal CPU frequency on user activity
}
// Refresh the battery icon immediately when USB is plugged or unplugged
if (gpio.wasUsbStateChanged()) {
activityManager.requestUpdate();
}
static bool screenshotButtonsReleased = true;
if (gpio.isPressed(HalGPIO::BTN_POWER) && gpio.isPressed(HalGPIO::BTN_DOWN)) {
if (screenshotButtonsReleased) {
@@ -384,6 +379,12 @@ void loop() {
return;
}
// Refresh the battery icon when USB is plugged or unplugged.
// Placed after sleep guards so we never queue a render that won't be processed.
if (gpio.wasUsbStateChanged()) {
activityManager.requestUpdate();
}
const unsigned long activityStartTime = millis();
activityManager.loop();
const unsigned long activityDuration = millis() - activityStartTime;