Kaynağa Gözat

加入IGNORE_DISCHARGER_LOW_VOL定义是否忽略放电欠压,主要给测试,尽快把电池放到PowerDown

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 5 yıl önce
ebeveyn
işleme
5d365bf0f1
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      Application/app/sox/state.c

+ 3 - 1
Application/app/sox/state.c

@@ -16,7 +16,7 @@
 #define SLEEP_IGNORE_UNHEALTH 0
 #define ALLOW_POWER_DOWN 1 //disable power down for debug
 #define ALLOW_5238_BALANCE 1
-
+#define IGNORE_DISCHARGER_LOW_VOL 0 //忽略放电欠压
 static void _current_notify(void);
 static void _voltage_notify(void);
 static void _temperature_notify(void);
@@ -199,6 +199,7 @@ static s32 _process_unheath(void){
 	}
 	if (bms_health()->discharger_over_temp || bms_health()->discharger_lower_temp || bms_health()->discharger_lower_voltage ||
 				bms_health()->sigle_cell_lower_voltage){
+	#if IGNORE_DISCHARGER_LOW_VOL==0
 		if (bms_health()->discharger_over_temp || bms_health()->sigle_cell_lower_voltage || bms_health()->discharger_lower_voltage){ //放电过高温后,小电流也必须关闭
 			start_aux_power(0);
 			unhealth |= Health_aux_Fault;
@@ -208,6 +209,7 @@ static s32 _process_unheath(void){
 		if (bms_health()->sigle_cell_lower_voltage || bms_health()->discharger_lower_voltage) {
 			unhealth |= Health_Fault_Can_Sleep;
 		}
+	#endif
 	}
 	if (bms_health()->over_temp_deny_discharger|| bms_health()->lower_temp_deny_discharger) {
 		if (!_bms_state.charging) {