fix(can): restrict data transfer to buffer 0 and 1 due to issues with buffer 2

Identified an issue with the 2nd TX buffer in CAN. Updated the implementation to use only buffer 0 and buffer 1 for CAN data transfer.
stable
@rakshita4 2024-11-22 00:08:43 +05:30
parent f5bba30502
commit 1ed44dbf4f
1 changed files with 3 additions and 7 deletions

View File

@ -439,15 +439,11 @@ void vRTE_UARTDataProcess(void)
if ( retCode == 0 && ulId == 0){
vECU_InitiateUartToCanTransmit(&g_xUartHandle, 0x0, g_pu8Buf, 0);
}
if ( retCode >= 0 && ulId > 0x00 && ulId < 0xffffffff )
if ( retCode >= 0 && (ulId > 0x00 && ulId < 0xffffffff) )
{
xECU_WriteDataOverCAN(&g_pu8Buf[PKT_HEADER], ulId, retCode, 0);
__gprv_u8Buf = (__gprv_u8Buf + 1) % 2;
xECU_WriteDataOverCAN(&g_pu8Buf[PKT_HEADER], ulId, retCode, __gprv_u8Buf);
}
// if ( retCode >= 0 && (ulId > 0x00 && ulId < 0xffffffff) )
// {
// __gprv_u8Buf = (__gprv_u8Buf + 1) % 3;
// xECU_WriteDataOverCAN(&g_pu8Buf[PKT_HEADER], ulId, retCode, __gprv_u8Buf);
// }
}
}