|
|
@@ -293,11 +293,14 @@ static void _force_capacity_full(void){
|
|
|
_soc.capacity = 100;
|
|
|
if (can_modify_min_when_full()) { //前面出现过电芯欠压, 当前容量没到最大容量
|
|
|
double curr_real_cap = start_charger_coulomb + _soc.charger_coulomb;
|
|
|
+ double curr_min_cap = 0.0f;
|
|
|
if (curr_real_cap > _soc.coulomb_max) {
|
|
|
- _soc.coulomb_min = 0;
|
|
|
+ curr_min_cap = 0.0f;
|
|
|
}else {
|
|
|
- _soc.coulomb_min = _soc.coulomb_max - curr_real_cap;
|
|
|
+ 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);
|
|
|
_force_full_minc ++;
|
|
|
}
|