|
|
@@ -81,6 +81,7 @@ void health_log(void){
|
|
|
health_debug("aux_short: %d, %d\n", error_counts.aux_short, error_counts.aux_real_short);
|
|
|
health_debug("lower voltage: %d, %d, %d, %d\n", discharger_lower_cell_voltage, discharger_lower_voltage, error_counts.cell_under_voltage, error_counts.pack_under_voltage);
|
|
|
health_debug("uart error %d, %d, %d\n", error_counts.uart_crc_error, error_counts.uart_len_error, error_counts.uart_dir_error);
|
|
|
+ health_debug("Temp abnormal: %d,%d,%d,%d\n", error_counts.discharger_high_temp, error_counts.charger_high_temp, error_counts.discharger_lower_temp, error_counts.charger_lower_temp);
|
|
|
}
|
|
|
|
|
|
bms_health_t *bms_health(){
|
|
|
@@ -423,6 +424,7 @@ void check_temp_state(void){
|
|
|
}
|
|
|
if (debounce_reach_max(_charger_over_temp_count)){
|
|
|
_health.over_temp_deny_charger = 1;
|
|
|
+ error_counts.charger_high_temp ++;
|
|
|
debounce_reset(_charger_over_temp_count);
|
|
|
}
|
|
|
}
|
|
|
@@ -434,6 +436,7 @@ void check_temp_state(void){
|
|
|
}
|
|
|
if (debounce_reach_max(_charger_lower_temp_count)) {
|
|
|
_health.lower_temp_deny_charger = 1;
|
|
|
+ error_counts.charger_lower_temp ++;
|
|
|
debounce_reset(_charger_lower_temp_count);
|
|
|
}
|
|
|
}
|
|
|
@@ -458,6 +461,7 @@ void check_temp_state(void){
|
|
|
}
|
|
|
if (debounce_reach_max(_discharger_over_temp_count)){
|
|
|
_health.over_temp_deny_discharger = 1;
|
|
|
+ error_counts.discharger_high_temp ++;
|
|
|
debounce_reset(_discharger_over_temp_count);
|
|
|
}
|
|
|
}
|
|
|
@@ -470,6 +474,7 @@ void check_temp_state(void){
|
|
|
}
|
|
|
if (debounce_reach_max(_discharger_lower_temp_count)) {
|
|
|
_health.lower_temp_deny_discharger = 1;
|
|
|
+ error_counts.discharger_lower_temp ++;
|
|
|
debounce_reset(_discharger_lower_temp_count);
|
|
|
}
|
|
|
}
|