|
@@ -69,7 +69,11 @@ static int get_response_data(uint8_t *data, uint8_t operate, uint8_t result){
|
|
|
|
|
|
|
|
response->health_state = *((uint16_t *)bms_health());
|
|
response->health_state = *((uint16_t *)bms_health());
|
|
|
response->balance_mask = 0x0;
|
|
response->balance_mask = 0x0;
|
|
|
- response->misc_status = (ml5238_is_discharging() << 1) | (ml5238_is_charging() << 2) | (AUX_VOL_IS_OPEN() << 3) |(io_state()->aux_lock_detect << 5) | ((get_soc()->capacity==100) << 4) | (((get_soc()->flags & SOC_FLAG_CALIBRATED) == 0) << 6);
|
|
|
|
|
|
|
+ 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 |= ((get_soc()->capacity==100) << 4) | (((get_soc()->flags & SOC_FLAG_CALIBRATED) == 0) << 6);
|
|
|
|
|
+ response->misc_status |= io_state()->charger_detect_irq;
|
|
|
|
|
+
|
|
|
response->result = (operate << 4) | result;
|
|
response->result = (operate << 4) | result;
|
|
|
|
|
|
|
|
head->size += sizeof(comm_response_t);
|
|
head->size += sizeof(comm_response_t);
|