fix SOC estimation
This commit is contained in:
parent
b68d26decb
commit
94a1794764
@ -53,7 +53,7 @@ void soc_update() {
|
|||||||
// Otherwise, use the current counter to update SoC
|
// Otherwise, use the current counter to update SoC
|
||||||
float as_delta = shunt_data.current_counter - mAs_before_current;
|
float as_delta = shunt_data.current_counter - mAs_before_current;
|
||||||
float soc_delta = as_delta / SOC_ESTIMATION_BATTERY_CAPACITY * 100;
|
float soc_delta = as_delta / SOC_ESTIMATION_BATTERY_CAPACITY * 100;
|
||||||
current_soc = soc_before_current + soc_delta;
|
current_soc = soc_before_current - soc_delta;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user