Browse Source

when no hall && no charging, we can close discharger

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 5 năm trước cách đây
mục cha
commit
b8754e5aed
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Application/app/sox/state.c

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

@@ -334,7 +334,7 @@ static int _can_close_mos_no_hall(void){
 
 static void _process_iostate_changed(s32 unhealth){
 	if (!(io_state()->hall_detect)&& _can_close_mos_no_hall()){
-		if (ml5238_is_discharging()){
+		if (ml5238_is_discharging() && (!_bms_state.charging)){
 			discharger_open(0);
 			close_dfet_time = shark_get_seconds();
 		}