|
|
@@ -22,8 +22,8 @@ uint32_t charger_remain_time = 0;
|
|
|
#define MAX_TIME_FULL_TO_EMPTY (5 * 24 * 3600) //充满到欠压5天内达到,可以校准最小电量
|
|
|
#define DEFALUT_MAX_COULOMB (MAX_HA * 3600.0f)
|
|
|
#define DEFALUT_MIN_COULOMB (25.0f * 3600.0f)
|
|
|
-#define FULL_MAX_VOLTAGE_CHARGING (53000)//mV
|
|
|
-#define FULL_MAX_VOLTAGE (53500) //mV
|
|
|
+#define FULL_MAX_VOLTAGE_CHARGING (53500)//mV
|
|
|
+#define FULL_MAX_VOLTAGE (54000) //mV
|
|
|
#define FULL_MIN_CURRENT (500.0f) //mA
|
|
|
static void calibrate_soc_by_ocv(void);
|
|
|
|
|
|
@@ -181,8 +181,7 @@ static void _force_capacity_full(void){
|
|
|
|
|
|
static int _soc_is_under_voltage(void) {
|
|
|
return (bms_health()->powerdown_lower_voltage || bms_health()->sigle_cell_lower_voltage ||
|
|
|
- bms_health()->discharger_lower_voltage || bms_health()->discharger_cell_shutpower_voltage ||
|
|
|
- bms_health()->discharger_shutpower_voltage);
|
|
|
+ bms_health()->discharger_lower_voltage);
|
|
|
}
|
|
|
|
|
|
static int _soc_update_by_ocv(uint8_t prev_charge_status){
|
|
|
@@ -207,10 +206,11 @@ static int _soc_update_by_ocv(uint8_t prev_charge_status){
|
|
|
}
|
|
|
}
|
|
|
if (chargering || prev_charge_status) {
|
|
|
+ /*
|
|
|
if (bms_state_get()->ps_charger_mask && !bms_state_get()->ps_charger_in) { //ps100 上报无充电器,不做处理
|
|
|
ocv_full_count = 0;
|
|
|
return changed;
|
|
|
- }
|
|
|
+ }*/
|
|
|
if (bms_health()->sigle_cell_over_voltage) { //单电芯过压强制充满
|
|
|
_force_capacity_full();
|
|
|
ocv_full_count = 0;
|