/*******************************************************************************
功 能: CAN 数据处理函数
*******************************************************************************/
void DealCanSlave(void )
{
CANMSG *Pcanmsg =&CanMsgData ;
Pcanmsg->std_id=0x761;
TxHeader.StdId=CanMsgData.std_id;
TxHeader.ExtId = 0x01;
TxHeader.RTR = CAN_RTR_DATA;
TxHeader.IDE = CAN_ID_STD;
TxHeader.DLC = 8;
TxHeader.TransmitGlobalTime = DISABLE;
Pcanmsg->TxData[0]=LOBYTE(pv_sys_cond_out/10); // pv_sys_cond_out/10;
Pcanmsg->TxData[1]=HIBYTE(pv_sys_cond_out/10);
Pcanmsg->TxData[2]=0x01;
Pcanmsg->TxData[3]=0x01;
Pcanmsg->TxData[4]=0x01;
Pcanmsg->TxData[5]=0x01;
Pcanmsg->TxData[6]=0x01;
Pcanmsg->TxData[7]=0x01;
HAL_CAN_AddTxMessage(&CAN1_Handler, &TxHeader, Pcanmsg->TxData, &Pcanmsg->TxMailbox) ;
Pcanmsg->std_id=0x762;
TxHeader.StdId=CanMsgData.std_id;
TxHeader.ExtId = 0x01;
TxHeader.RTR = CAN_RTR_DATA;
TxHeader.IDE = CAN_ID_STD;
TxHeader.DLC = 8;
TxHeader.TransmitGlobalTime = DISABLE;
Pcanmsg->TxData[0]=LOBYTE(pv_sys_cond_out/10); // pv_sys_cond_out/10;
Pcanmsg->TxData[1]=HIBYTE(pv_sys_cond_out/10);
Pcanmsg->TxData[2]=0x02;
Pcanmsg->TxData[3]=0x02;
Pcanmsg->TxData[4]=0x02;
Pcanmsg->TxData[5]=0x02;
Pcanmsg->TxData[6]=0x02;
Pcanmsg->TxData[7]=0x02;
HAL_CAN_AddTxMessage(&CAN1_Handler, &TxHeader, Pcanmsg->TxData, &Pcanmsg->TxMailbox) ;
Pcanmsg->std_id=0x763;
TxHeader.StdId=CanMsgData.std_id;
TxHeader.ExtId = 0x01;
TxHeader.RTR = CAN_RTR_DATA;
TxHeader.IDE = CAN_ID_STD;
TxHeader.DLC = 8;
TxHeader.TransmitGlobalTime = DISABLE;
Pcanmsg->TxData[0]=LOBYTE(pv_sys_cond_out/10); // pv_sys_cond_out/10;
Pcanmsg->TxData[1]=HIBYTE(pv_sys_cond_out/10);
Pcanmsg->TxData[2]=0x03;
Pcanmsg->TxData[3]=0x03;
Pcanmsg->TxData[4]=0x03;
Pcanmsg->TxData[5]=0x03;
Pcanmsg->TxData[6]=0x03;
Pcanmsg->TxData[7]=0x03;
HAL_CAN_AddTxMessage(&CAN1_Handler, &TxHeader, Pcanmsg->TxData, &Pcanmsg->TxMailbox) ;
Pcanmsg->std_id=0x764;
TxHeader.StdId=CanMsgData.std_id;
TxHeader.ExtId = 0x01;
TxHeader.RTR = CAN_RTR_DATA;
TxHeader.IDE = CAN_ID_STD;
TxHeader.DLC = 8;
TxHeader.TransmitGlobalTime = DISABLE;
Pcanmsg->TxData[0]=LOBYTE(pv_sys_cond_out/10); // pv_sys_cond_out/10;
Pcanmsg->TxData[1]=HIBYTE(pv_sys_cond_out/10);
Pcanmsg->TxData[2]=0x04;
Pcanmsg->TxData[3]=0x04;
Pcanmsg->TxData[4]=0x04;
Pcanmsg->TxData[5]=0x04;
Pcanmsg->TxData[6]=0x04;
Pcanmsg->TxData[7]=0x04;
HAL_CAN_AddTxMessage(&CAN1_Handler, &TxHeader, Pcanmsg->TxData, &Pcanmsg->TxMailbox) ;
} |