Battery info switcher (#2230)

This commit is contained in:
Totoo
2024-08-28 11:32:24 +02:00
committed by GitHub
parent 1a0555f9eb
commit 0ae7768f20
13 changed files with 147 additions and 29 deletions

View File

@@ -166,7 +166,7 @@ void MAX17055::getBatteryInfo(uint8_t& valid_mask, uint8_t& batteryPercentage, u
}
batteryPercentage = stateOfCharge();
current = instantCurrent();
valid_mask = 3; // BATT_VALID_VOLTAGE + CURRENT
valid_mask = 7; // BATT_VALID_VOLTAGE + CURRENT + PERCENT
} else {
// let's indicate the data is wrong. ui will handle this by display UNK values.
valid_mask = 0;