|
|
@@ -491,6 +491,7 @@ static void soc_update_by_current_and_time(float current_now, float delta_time,
|
|
|
double delta_q = current * delta_time;
|
|
|
uint8_t est_capaticy = _soc.capacity;
|
|
|
int update_capticy = 0;
|
|
|
+ uint8_t prev_cap = _soc.capacity;
|
|
|
|
|
|
if (!chargering) {
|
|
|
soc_update_discharger_coeff();
|
|
|
@@ -535,7 +536,7 @@ static void soc_update_by_current_and_time(float current_now, float delta_time,
|
|
|
soc_calibrate(prev_charge_status);
|
|
|
|
|
|
//如果没有校准过,充电过程中,电量100%后,设置校准标志位
|
|
|
- if (chargering && (_soc.capacity == 100)){
|
|
|
+ if ((_soc.capacity == 100) && (prev_cap < 100)){
|
|
|
if ((_soc.flags & SOC_FLAG_CALIBRATED) == 0){
|
|
|
_soc.flags |= SOC_FLAG_CALIBRATED;
|
|
|
update_capticy = 1;
|