Skip to content

Commit

Permalink
fix: battery won't update in caffeinated or output-locked mode
Browse files Browse the repository at this point in the history
  • Loading branch information
DriftKingTW committed Mar 29, 2024
1 parent 0ddd5d7 commit cc37bf9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,16 @@ void generalTask(void *pvParameters) {
// }

// Update screen info
String result = "";
if (isGoingToSleep) {
contentBottom = "Going to sleep";
contentIcon = 7;
} else if (isOutputLocked) {
contentIcon = 10;
result = "Bat. " + (String)batteryPercentage + "%";
} else if (isCaffeinated) {
contentIcon = 9;
result = "Bat. " + (String)batteryPercentage + "%";
} else if (bootWiFiMode) {
String networkInfo = "";
if (currentMillis - networkInfoPreviousMillis <
Expand All @@ -406,7 +409,6 @@ void generalTask(void *pvParameters) {
}
contentTop = networkInfo;
} else {
String result = "";
bool plugged = getUSBPowerState();
if (!plugged) {
isUsbMode = false;
Expand Down

0 comments on commit cc37bf9

Please sign in to comment.