Quellcode durchsuchen

充电时间大于20s,清除强制容量为0的标志

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui vor 5 Jahren
Ursprung
Commit
1901ea2e22
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      Application/app/sox/soc.c

+ 2 - 2
Application/app/sox/soc.c

@@ -254,7 +254,7 @@ static void soc_update_by_current_and_time(float current_now, float delta_time,
 	}else if (!chargering && (_soc.capacity == 0) && !is_force_empty){
 		_soc.capacity = 1;
 	}
-	if (is_force_empty) {
+	if (is_force_empty && (_soc.capacity == 1)) {
 		_soc.capacity = 0;
 	}
 	//通过电压校准SOC,只能在电压范围的两端校准
@@ -319,7 +319,7 @@ void soc_update(void){
 		start_least_square(1);
 	}
 #endif
-	if (chargering && (charger_time() >= 10 * 1000)){
+	if (chargering && (charger_time() >= 20 * 1000)){
 		is_force_empty = 0;
 	}
 	soc_update_by_current_and_time(measure_value()->load_current, _delta_time(), pre_chargering);