Reset batttery charge in coloumbs on charge completion

This commit is contained in:
Phillip Kühne 2025-02-16 20:44:58 +01:00
parent 21f313af5c
commit fdd59a83e3
Signed by: phillip
GPG Key ID: E4C1C4D2F90902AA

View File

@ -178,6 +178,7 @@ void PowerManager::updatePowerStateHandler() {
if (PowerManager::busPowered && !PowerManager::chargingState) {
// Calibrate voltage offset on full Battery
PowerManager::fullVoltageOffset = PowerParameters::Battery::DISCHARGE_CURVE::VOLTAGES[0] - getBatteryVoltage();
PowerManager::coloumbsRemaining = PowerParameters::Battery::CELL_CHARGE_FULL_COLOUMB;
}
ESP_LOGD(TAG, "Bus Powered: %d, Charging: %d", busPowered, chargingState);