Procházet zdrojové kódy

Revert "加入均衡次数的计数"

This reverts commit aa8124c4b0617a1f0e2625944040cd294d00744e.
huhui před 4 roky
rodič
revize
e4166ebbfd
1 změnil soubory, kde provedl 2 přidání a 4 odebrání
  1. 2 4
      Application/app/sox/state.c

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

@@ -48,7 +48,7 @@ static int no_hall_count = 0;
 u64 uart_frame_time = 0;
 static u32 uart_reinit_count = 0;
 static u32 pd_count = 0;
-static u32 cell_balance_count = 0;
+
 static void put_no_hall_time(void){
 	no_hall_time[no_hall_count] = shark_get_seconds();
 	no_hall_count = (no_hall_count + 1) % 5;
@@ -136,7 +136,6 @@ void bms_state_log(void){
 	state_debug("Reset Reson 0x%x, 0x%x\n", bsp_get_rst_reson(), pd_count);
 	state_debug("BackUp value 0x%x\n", bsp_get_backup());
 	state_debug("Debug: %d, %d. uart reinit=%d\n", shark_uart_timeout(), io_state()->hall_detect, uart_reinit_count);
-	state_debug("Cell balance count %d\n", cell_balance_count);
 	log_no_hall_time();
 #if 0
 	state_debug("Charging: %d\n", _bms_state.charging);
@@ -144,7 +143,7 @@ void bms_state_log(void){
 	state_debug("DMos: %d\n", ml5238_is_discharging());
 	state_debug("CMos: %d\n", ml5238_is_charging());
 	state_debug("AuxPower: %d\n", AUX_VOL_IS_OPEN());
-	state_debug("WorkMode:0x%x\n", _bms_state.work_mode);
+	state_debug("WorkMode:0x%x\n", _bms_state.work_mode);l
 #endif
 }
 
@@ -656,7 +655,6 @@ static void check_cell_balance(uint8_t current_max_index){
 	}
 	if (!_bms_state.pack_balancing && debounce_reach_max(_cell_balance)){
 		_bms_state.pack_balancing = 1;
-		cell_balance_count ++;
 		ml5238_cell_start_balance(get_balance_mask(current_max_index));
 		shark_timer_post(&_balance_timer, 30 * 1000); //stop balance after 30s
 		debounce_reset(_cell_balance);