|
@@ -192,7 +192,7 @@ int soc_update_by_ocv(void){
|
|
|
ocv_full_count = 0;
|
|
ocv_full_count = 0;
|
|
|
changed = 1;
|
|
changed = 1;
|
|
|
}else if (bms_state_get()->pack_voltage >= (FULL_MAX_VOLTAGE) && (measure_value()->load_current <= FULL_MIN_CURRENT)){
|
|
}else if (bms_state_get()->pack_voltage >= (FULL_MAX_VOLTAGE) && (measure_value()->load_current <= FULL_MIN_CURRENT)){
|
|
|
- if (ocv_full_count++ >= 30) {
|
|
|
|
|
|
|
+ if (ocv_full_count++ >= 100) {
|
|
|
_force_capacity_full();
|
|
_force_capacity_full();
|
|
|
ocv_full_count = 0;
|
|
ocv_full_count = 0;
|
|
|
changed = 1;
|
|
changed = 1;
|
|
@@ -341,9 +341,6 @@ void soc_update(void){
|
|
|
_soc.total_coulomb += _soc.pre_discharger_coulomb / 3600.0f;
|
|
_soc.total_coulomb += _soc.pre_discharger_coulomb / 3600.0f;
|
|
|
chargering = 0;
|
|
chargering = 0;
|
|
|
charger_remain_time = 0;
|
|
charger_remain_time = 0;
|
|
|
- if (_soc.capacity < 100) {
|
|
|
|
|
- is_force_full = 0;
|
|
|
|
|
- }
|
|
|
|
|
soc_warning("changed to dischargering, current = %d\n", measure_value()->load_current);
|
|
soc_warning("changed to dischargering, current = %d\n", measure_value()->load_current);
|
|
|
}
|
|
}
|
|
|
#if LEAST_SQUARE==1
|
|
#if LEAST_SQUARE==1
|
|
@@ -356,6 +353,10 @@ void soc_update(void){
|
|
|
if (_soc.charger_coulomb / (_soc.coulomb_max - _soc.coulomb_min) >= 0.005) {
|
|
if (_soc.charger_coulomb / (_soc.coulomb_max - _soc.coulomb_min) >= 0.005) {
|
|
|
is_force_empty = 0;
|
|
is_force_empty = 0;
|
|
|
}
|
|
}
|
|
|
|
|
+ }else if (!chargering && is_force_full) {
|
|
|
|
|
+ if (_soc.discharger_coulomb / (_soc.coulomb_max - _soc.coulomb_min) >= 0.005) {
|
|
|
|
|
+ is_force_full = 0;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
soc_update_by_current_and_time(measure_value()->load_current, _delta_time(), pre_chargering);
|
|
soc_update_by_current_and_time(measure_value()->load_current, _delta_time(), pre_chargering);
|
|
|
soc_update_charger_remain_time();
|
|
soc_update_charger_remain_time();
|