Commit 5b28fe3a authored by hu's avatar hu

调整诊断故障码问题

parent d1f04e2e
......@@ -12,6 +12,7 @@
#include "PowerManagement.h"
#include "UDS_Common.h"
#include "UDS_CFG.H"
#include "Watchdog.h"
#include "RSCAN.h"
......@@ -154,9 +155,9 @@ void Can_Read_Msg(uint32_t m_id, uint8_t m_dlc, uint8_t m_Msg[])
void Can_Read_Msg2(uint32_t m_id, uint8_t m_dlc, uint8_t m_Msg[])
{
if (m_id == DIAG_ID_Rx_PHY)
if (m_id == ID_BCM_ResAddr)
{
LK_Link_main(DIAG_ID_Rx_PHY, (uint8_t*)m_Msg, (m_dlc & 0x0f));
LK_Link_main(ID_BCM_ResAddr, (uint8_t*)m_Msg, (m_dlc & 0x0f));
}
if ((m_id == DIAG_ID_Rx_FUN) || (m_id == DIAG_ID_Rx_PHY))
{
......
......@@ -499,7 +499,7 @@ void TP_ReciveMultiF_handle(void)
--------------------------------------------------------------------------*/
void TP_TransmitPDU(void)
{
g_txCanMsg.id = ID_ResAddr;
g_txCanMsg.id = ID_BCM_PhyAddr;
_CAN_Msg canMag;
......@@ -650,7 +650,7 @@ void TP_TransmitPDU(void)
//g_bReturn = bsp_CANSendFrame(g_txCanMsg.id, txResNum, (uint8_t *)&g_txCanMsg.msg[0], 8);
/*重新赋值----20220326----*/
canMag.MsgID = 0x7E0;//g_txCanMsg.id;
canMag.MsgID = g_txCanMsg.id;
canMag.MsgDLC = 8u;
canMag.MsgPro = 0u;
canMag.MsgStd = 0u;
......@@ -727,7 +727,7 @@ void TP_TransmitNegatePDU(_ErrorFrame *Err)
(Err->FrameErr != SubFunctionNotSupported) &&
(Err->FrameErr != RequestOutOfRange))
{
g_txCanMsg.id = ID_ResAddr;
g_txCanMsg.id = ID_BCM_PhyAddr;
g_txCanMsg.msg[0] = 3;
g_txCanMsg.msg[1] = NegativeId;
g_txCanMsg.msg[2] = Err->RespSerId;
......
......@@ -16,9 +16,9 @@
#define ID_BCM_PhyAddr 0x7E0
#define ID_BCM_ResAddr 0x7E8 //BCM物理响应
#define ID_PhyAddr 0x7E8
#define ID_ResAddr 0x7E0 //物理响应
#define ID_FunAddr 0x7df
//#define ID_PhyAddr 0x7E8
//#define ID_ResAddr 0x7E0 //物理响应
//#define ID_FunAddr 0x7df
#define N_FILL 0x00
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment