|
@@ -14,6 +14,8 @@
|
|
|
#include "protocol.h"
|
|
#include "protocol.h"
|
|
|
#include "bms_message.h"
|
|
#include "bms_message.h"
|
|
|
#include "event_record.h"
|
|
#include "event_record.h"
|
|
|
|
|
+#include "protocol_old.h"
|
|
|
|
|
+
|
|
|
extern char* bsp_get_fversion(void);
|
|
extern char* bsp_get_fversion(void);
|
|
|
|
|
|
|
|
static uint8_t bms_insert = 0;
|
|
static uint8_t bms_insert = 0;
|
|
@@ -68,6 +70,11 @@ void process_bms_message(can_frame_t *frame, int len){
|
|
|
protocol_send_ack(frame->head.can_addr, frame->key, result);
|
|
protocol_send_ack(frame->head.can_addr, frame->key, result);
|
|
|
break;
|
|
break;
|
|
|
case CAN_KEY_BMS_BASE_INFO:{
|
|
case CAN_KEY_BMS_BASE_INFO:{
|
|
|
|
|
+ if (len >= 1) {
|
|
|
|
|
+ uint8_t env = frame->data[0];
|
|
|
|
|
+ bms_set_ps_charger_in(1, (env == CW_CHE_SHANG_CHARGER || env == CW_CHONG_DIAN_ZUO));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
binfo_cmd_resp_t bresp;
|
|
binfo_cmd_resp_t bresp;
|
|
|
bresp.capacity = get_soc()->capacity;
|
|
bresp.capacity = get_soc()->capacity;
|
|
|
if (get_soc()->coulomb_now >= get_soc()->coulomb_min) {
|
|
if (get_soc()->coulomb_now >= get_soc()->coulomb_min) {
|