|
@@ -38,7 +38,7 @@
|
|
|
|
|
|
|
|
uint8_t msg_buf[256] = {0};
|
|
uint8_t msg_buf[256] = {0};
|
|
|
uint16_t crc = 0;
|
|
uint16_t crc = 0;
|
|
|
-
|
|
|
|
|
|
|
+uint32_t DMJZ=0;
|
|
|
pmu_data pmu;
|
|
pmu_data pmu;
|
|
|
plane_para planep = {.Candebug_flag = 0};
|
|
plane_para planep = {.Candebug_flag = 0};
|
|
|
|
|
|
|
@@ -627,9 +627,9 @@ void pmu_to_con_devtype_data(void)
|
|
|
if(Dev.Bms.facid == FAC_QX_BMS)
|
|
if(Dev.Bms.facid == FAC_QX_BMS)
|
|
|
msg_buf[index++] = DEV_QQ_BMS;
|
|
msg_buf[index++] = DEV_QQ_BMS;
|
|
|
else
|
|
else
|
|
|
- msg_buf[index++] = DEV_BMS;
|
|
|
|
|
|
|
+ msg_buf[index++] = DEV_BMS;//设备类型
|
|
|
|
|
|
|
|
- memcpy(&msg_buf[index],&Dev.Bms.facid,Dev.Bms.index + 1);
|
|
|
|
|
|
|
+ memcpy(&msg_buf[index],&Dev.Bms.facid,Dev.Bms.index + 1);//厂家id
|
|
|
index += Dev.Bms.index + 1;
|
|
index += Dev.Bms.index + 1;
|
|
|
devinfo_time.bms = false;
|
|
devinfo_time.bms = false;
|
|
|
}
|
|
}
|
|
@@ -1655,7 +1655,7 @@ void uart_recv_con_msg()
|
|
|
case MSGID_SET_LACKLOSS_CAL:
|
|
case MSGID_SET_LACKLOSS_CAL:
|
|
|
{
|
|
{
|
|
|
uint8_t can_buf[8] = {0};
|
|
uint8_t can_buf[8] = {0};
|
|
|
- if(Dev.Lackloss_Link.connect_status == COMP_NORMAL)
|
|
|
|
|
|
|
+ if(Dev.Lackloss_Link.connect_status == COMP_NORMAL && Dev.Checklow.facid == FAC_VK)
|
|
|
{
|
|
{
|
|
|
mimo_lackloss.cal_distance = mimo_lackloss.distance / 10 + 5;
|
|
mimo_lackloss.cal_distance = mimo_lackloss.distance / 10 + 5;
|
|
|
put_date_to_can(can_buf,0xFA,0x03,0x00,0xB1,0XC1,0x00,0X00,0X00);
|
|
put_date_to_can(can_buf,0xFA,0x03,0x00,0xB1,0XC1,0x00,0X00,0X00);
|
|
@@ -1664,6 +1664,15 @@ void uart_recv_con_msg()
|
|
|
can_buf[7] = (can_buf[1]+can_buf[2]+can_buf[3]+can_buf[4]+can_buf[5]+can_buf[6]) & 0xff;
|
|
can_buf[7] = (can_buf[1]+can_buf[2]+can_buf[3]+can_buf[4]+can_buf[5]+can_buf[6]) & 0xff;
|
|
|
can_send_msg_normalstd(can_buf,8,0xFA);
|
|
can_send_msg_normalstd(can_buf,8,0xFA);
|
|
|
}
|
|
}
|
|
|
|
|
+ else if(Dev.Lackloss_Link.connect_status == COMP_NORMAL && Dev.Checklow.facid == FAC_DM_CHECKLOW)
|
|
|
|
|
+ {
|
|
|
|
|
+ if(HAL_GetTick()-DMJZ >= 6000)
|
|
|
|
|
+ {
|
|
|
|
|
+ put_date_to_can(can_buf,0x01,0x00,0x00,0x00,0X00,0x00,0X00,0X00);
|
|
|
|
|
+ can_send_msg_normal(can_buf,8,0x18F2AD0A);
|
|
|
|
|
+ DMJZ = HAL_GetTick();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case MSGID_SET_PUMP_ID:
|
|
case MSGID_SET_PUMP_ID:
|