|
|
@@ -255,6 +255,7 @@ static int _soc_is_under_voltage(void) {
|
|
|
bms_health()->discharger_lower_voltage);
|
|
|
}
|
|
|
|
|
|
+#if 0
|
|
|
static int _soc_force_capaticy(uint8_t capaticy){
|
|
|
float cap = (float)capaticy / 100.0f;
|
|
|
float min = (_soc.coulomb_now - cap * _soc.coulomb_max)/(1.0f - cap);
|
|
|
@@ -266,10 +267,11 @@ static int _soc_force_capaticy(uint8_t capaticy){
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
+#endif
|
|
|
|
|
|
static int _soc_update_by_ocv(uint8_t prev_charge_status){
|
|
|
static int ocv_full_count = 0;
|
|
|
- static int ocv_force_capaticy = 0;
|
|
|
+ //static int ocv_force_capaticy = 0;
|
|
|
int changed = 0;
|
|
|
if ((_soc.flags & SOC_FLAG_CALIBRATED) == 0){
|
|
|
return 0;
|
|
|
@@ -285,7 +287,9 @@ static int _soc_update_by_ocv(uint8_t prev_charge_status){
|
|
|
}
|
|
|
_soc.capacity = 0;
|
|
|
return 1;
|
|
|
- }else if ((!prev_charge_status) && (bms_state_get()->cell_min_vol <= 2900) && (_soc.capacity > 10)) {
|
|
|
+ }
|
|
|
+#if 0
|
|
|
+ else if ((!prev_charge_status) && (bms_state_get()->cell_min_vol <= 2900) && (_soc.capacity > 10)) {
|
|
|
/* 如果单电芯最小电压小于2.9v,并且容量大于10%,需要校准到10% */
|
|
|
if (ocv_force_capaticy++ >= 10) {
|
|
|
return _soc_force_capaticy(10);
|
|
|
@@ -293,9 +297,10 @@ static int _soc_update_by_ocv(uint8_t prev_charge_status){
|
|
|
}else {
|
|
|
ocv_force_capaticy = 0;
|
|
|
}
|
|
|
+#endif
|
|
|
}
|
|
|
if (chargering || prev_charge_status) {
|
|
|
- ocv_force_capaticy = 0;
|
|
|
+ //ocv_force_capaticy = 0;
|
|
|
/*
|
|
|
if (bms_state_get()->ps_charger_mask && !bms_state_get()->ps_charger_in) { //ps100 上报无充电器,不做处理
|
|
|
ocv_full_count = 0;
|