|
|
@@ -307,10 +307,12 @@ static void _force_capacity_full(void){
|
|
|
}else {
|
|
|
curr_min_cap = _soc.coulomb_max - curr_real_cap;
|
|
|
}
|
|
|
- //lowpass filter
|
|
|
- _soc.coulomb_min = (curr_min_cap + _soc.coulomb_min)/2.0f;
|
|
|
- soc_warning("current real cap %f\n", curr_real_cap);
|
|
|
- push_event(Min_Cap_For_Full, (u32)curr_real_cap);
|
|
|
+ //don't trust if curr_min_cap big than before
|
|
|
+ if (curr_min_cap < _soc.coulomb_min) {
|
|
|
+ _soc.coulomb_min = (curr_min_cap + _soc.coulomb_min)/2.0f; //lowpass filter
|
|
|
+ soc_warning("current real cap %f\n", curr_real_cap);
|
|
|
+ push_event(Min_Cap_For_Full, (u32)curr_real_cap);
|
|
|
+ }
|
|
|
}
|
|
|
_soc.coulomb_now = _soc.coulomb_max;//充满后,当前容量设置为最大容量
|
|
|
|