mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-04 17:51:41 +02:00
Reset batttery charge in coloumbs on charge completion
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user