|
@@ -631,9 +631,8 @@ static uint32_t get_balance_mask(uint8_t current_max_index){
|
|
|
static void check_cell_balance(uint8_t current_max_index){
|
|
static void check_cell_balance(uint8_t current_max_index){
|
|
|
if (!_bms_state.charging || (_bms_state.cell_max_vol >= SIGLE_CELL_MAX_CHARGER_VOLTAGE)){ //not charging, need not do balance
|
|
if (!_bms_state.charging || (_bms_state.cell_max_vol >= SIGLE_CELL_MAX_CHARGER_VOLTAGE)){ //not charging, need not do balance
|
|
|
if (_bms_state.pack_balancing){
|
|
if (_bms_state.pack_balancing){
|
|
|
- _bms_state.pack_balancing = 0;
|
|
|
|
|
- _cell_balance.count = 10;
|
|
|
|
|
- ml5238_cell_start_balance(0);
|
|
|
|
|
|
|
+ debounce_reset(_cell_balance);
|
|
|
|
|
+ _bms_state.pack_balancing = ml5238_cell_start_balance(0);
|
|
|
shark_timer_cancel(&_balance_timer);
|
|
shark_timer_cancel(&_balance_timer);
|
|
|
}
|
|
}
|
|
|
return;
|
|
return;
|