|
|
@@ -34,6 +34,7 @@ static shark_timer_t _debug_timer = {.handler = _debug_timer_handler};
|
|
|
static int open_dfet = 0;
|
|
|
static int open_dfet_failt = 0;
|
|
|
static int close_dfet_reson = 0;
|
|
|
+static int close_dfet_no_hall = 0;
|
|
|
void bms_state_init(void){
|
|
|
set_log_level(MOD_STATE, L_debug);
|
|
|
state_debug("BMS System Starting......\n");
|
|
|
@@ -97,7 +98,7 @@ void bms_state_log(void){
|
|
|
state_debug("Sleep Time: %ds\n", get_system_sleep_time());
|
|
|
state_debug("ml5238 cali: %d\n", ml5238_cali_count);
|
|
|
state_debug("ps charger mask:in %d, %d\n", _bms_state.ps_charger_mask, _bms_state.ps_charger_in);
|
|
|
- state_debug("open dfet %d - %d - %d\n", open_dfet, open_dfet_failt, close_dfet_reson);
|
|
|
+ state_debug("open dfet %d - %d - %d - %d\n", open_dfet, open_dfet_failt, close_dfet_reson, close_dfet_no_hall);
|
|
|
#if 0
|
|
|
state_debug("Charging: %d\n", _bms_state.charging);
|
|
|
state_debug("WorkMode %d\n", _bms_state.work_mode);
|
|
|
@@ -388,7 +389,7 @@ static void _process_iostate_changed(s32 unhealth){
|
|
|
bms_set_ps_charger_in(0, 0);
|
|
|
if (ml5238_is_discharging() && (!_bms_state.charging)){
|
|
|
discharger_open(0);
|
|
|
- close_dfet_reson = 1;
|
|
|
+ close_dfet_no_hall ++;
|
|
|
open_dfet = open_dfet_failt = 0; //clear open dfet count
|
|
|
}
|
|
|
if (!AUX_VOL_IS_OPEN()){
|