Ver Fonte

1. 老化等测试模式下,powerdown不等待5s
2. 没霍尔,插充电器充电,需要开放电mos(判断充电中,强开放电mos)

Signed-off-by: huhui <huhui@sharkgulf.com>

huhui há 4 anos atrás
pai
commit
363216761e
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      Application/app/sox/state.c

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

@@ -321,7 +321,7 @@ static void _process_user_request(s32 health){
 		if (_bms_state.user_request & USER_REQUEST_DISCHARGER_ON) {
 			open_dfet ++;
 			if (!(health & Health_Discharger_Failt)){
-				if ((io_state()->hall_detect) || !_can_close_mos_no_hall()){
+				if ((io_state()->hall_detect || _bms_state.charging) || !_can_close_mos_no_hall()){
 					discharger_open(1);
 					mos_drv = true;
 				}
@@ -340,7 +340,7 @@ static void _process_user_request(s32 health){
 static void _process_power_down(void){
 #if (ALLOW_POWER_DOWN==1)	
 	if (bms_health()->powerdown_lower_voltage){
-		if (shark_get_seconds() < bms_health()->pd_time + 5) {//³¬¹ý5s powerdown
+		if (bms_work_is_normal() && (shark_get_seconds() < bms_health()->pd_time + 5)) {//³¬¹ý5s powerdown
 			return;
 		}
 		state_debug("BMS System PowerDown!!\n");