formatting

This commit is contained in:
Dave ID 2026-02-04 11:08:56 +01:00
parent ee75345684
commit d192043853
2 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,8 @@ void BatteryPercentageRingBuffer::update(uint8_t v) {
was_charging = false;
}
// Buffer was reintilialized with readout values while charging (can be too high values), reinit with new readout after charging
// Buffer was reintilialized with readout values while charging (can be too high values), reinit with new readout
// after charging
if (was_charging) {
init(v);
was_charging = false;
@ -34,7 +35,6 @@ void BatteryPercentageRingBuffer::update(uint8_t v) {
}
uint8_t BatteryPercentageRingBuffer::evaluate() {
uint8_t new_val = (sum + MAX_SAMPLES / 2) / MAX_SAMPLES;
// Battery percentage should not increase when not charging so we just cap it to be lower than the last value