|
@@ -68,6 +68,9 @@ static int get_response_data(uint8_t *data, uint8_t operate, uint8_t result){
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
response->health_state = *((uint16_t *)bms_health()) | (bms_health()->sigle_cell_lower_voltage << 1);
|
|
response->health_state = *((uint16_t *)bms_health()) | (bms_health()->sigle_cell_lower_voltage << 1);
|
|
|
|
|
+ if (bms_is_ps_charger_in()) {
|
|
|
|
|
+ response->health_state |= (bms_health()->lower_temp_deny_charger << 12 | bms_health()->over_temp_deny_charger << 14);
|
|
|
|
|
+ }
|
|
|
response->balance_mask = 0x0;
|
|
response->balance_mask = 0x0;
|
|
|
response->misc_status = (ml5238_is_discharging() << 1) | (ml5238_is_charging() << 2);
|
|
response->misc_status = (ml5238_is_discharging() << 1) | (ml5238_is_charging() << 2);
|
|
|
response->misc_status |= (AUX_VOL_IS_OPEN() << 3) |(io_state()->aux_lock_detect << 5);
|
|
response->misc_status |= (AUX_VOL_IS_OPEN() << 3) |(io_state()->aux_lock_detect << 5);
|