|
|
@@ -273,6 +273,14 @@ static void push_cell_event(event_id_t id){
|
|
|
u32 min = ((bms_state_get()->cell_index_of_min_vol << 12) & 0xF000) | (min_v & 0x0FFF);
|
|
|
|
|
|
push_event(id, max << 16 | min);
|
|
|
+
|
|
|
+ u32 temps = 0;
|
|
|
+ s8 onetemp = 0;
|
|
|
+ for (int i = 0; i < PACK_TEMPS_NUM; i++){
|
|
|
+ onetemp = (s8)measure_value()->pack_temp[i];
|
|
|
+ temps |= (onetemp << i) & (0xFF<<i);
|
|
|
+ }
|
|
|
+ push_event(Pack_Temp, temps);
|
|
|
}
|
|
|
|
|
|
void check_voltage_state(void) {
|
|
|
@@ -292,7 +300,7 @@ void check_voltage_state(void) {
|
|
|
if ((bms_state_get()->cell_max_vol>= SIGLE_CELL_MAX_CHARGER_VOLTAGE)){
|
|
|
if (judge_debounce(!_health.sigle_cell_over_voltage, &_sigle_cell_charger_max_vol)){
|
|
|
_health.sigle_cell_over_voltage = 1;
|
|
|
- push_cell_event(Cell_Over_Vol);
|
|
|
+ push_cell_event(Cell_Over_Vol2);
|
|
|
sys_debug("sigle cell %d\n", bms_state_get()->cell_max_vol);
|
|
|
}
|
|
|
}else if ((bms_state_get()->cell_max_vol < SIGLE_CELL_MAX_CHARGER_VOLTAGE)){
|
|
|
@@ -308,7 +316,7 @@ void check_voltage_state(void) {
|
|
|
if ((bms_state_get()->cell_min_vol <= min_discharger_cell_vol[_health.is_work_temp_normal])){
|
|
|
if (judge_debounce(!_health.sigle_cell_lower_voltage, &_sigle_cell_discharger_lower_vol)){
|
|
|
_health.sigle_cell_lower_voltage = 1;
|
|
|
- push_cell_event(Cell_Under_Vol);
|
|
|
+ push_cell_event(Cell_Under_Vol2);
|
|
|
_single_low_judge_current(true);
|
|
|
error_counts.cell_under_voltage++;
|
|
|
}
|