|
|
@@ -4,6 +4,7 @@
|
|
|
#include "app/sox/measure_task.h"
|
|
|
#include "app/sox/health.h"
|
|
|
#include "app/sox/state.h"
|
|
|
+#include "app/sox/iostate.h"
|
|
|
#include "bsp/gpio.h"
|
|
|
#include "bsp/ml5238.h"
|
|
|
#include "bsp/fmc_flash.h"
|
|
|
@@ -95,6 +96,8 @@ void process_bms_message(can_frame_t *frame, int len){
|
|
|
sresp.charger_fet = ml5238_is_charging();
|
|
|
sresp.small_power = AUX_VOL_IS_OPEN();
|
|
|
sresp.is_balancing = bms_state_get()->pack_balancing;
|
|
|
+ sresp.health = (((uint16_t )(bms_health()->i_status)) != 0);
|
|
|
+ sresp.is_charger_in = io_state()->charger_detect_irq;
|
|
|
bresp.state = *((uint8_t*)&sresp);
|
|
|
data = (uint8_t *)&bresp;
|
|
|
data_len = sizeof(bresp);
|
|
|
@@ -132,6 +135,7 @@ void process_bms_message(can_frame_t *frame, int len){
|
|
|
sresp.small_power = AUX_VOL_IS_OPEN();
|
|
|
sresp.is_balancing = bms_state_get()->pack_balancing;
|
|
|
sresp.health = (((uint16_t )(bms_health()->i_status)) != 0);
|
|
|
+ sresp.is_charger_in = io_state()->charger_detect_irq;
|
|
|
data = (uint8_t *)&sresp;
|
|
|
data_len = sizeof(sresp);
|
|
|
protocol_send_bms_info(frame->head.can_addr, frame->key, data, data_len);
|