Add dummy SoC, replace ID

This commit is contained in:
Dmitriy Semenov
2023-04-06 21:23:19 +03:00
parent 9c2667bbe5
commit 8ea5166aa1
6 changed files with 37 additions and 10 deletions

View File

@@ -120,7 +120,8 @@ void modStateOfChargeProcess(void){
// Calculate state of charge
// calc percent of we put/take to battery capacity
modStateOfChargeGeneralStateOfCharge.generalStateOfCharge = modStateOfChargeGeneralStateOfCharge.remainingCapacityAh / modStateOfChargeGeneralConfigHandle->batteryCapacity * 100.0f;
modStateOfChargeGeneralStateOfCharge.generalStateOfCharge =
modStateOfChargeGeneralStateOfCharge.remainingCapacityAh / modStateOfChargeGeneralConfigHandle->batteryCapacity * 100.0f;
if(SoC_Save_Flag == 0) {
previous_SoC = modStateOfChargeGeneralStateOfCharge.generalStateOfCharge;