miscellaneous fix.
This commit is contained in:
@@ -391,7 +391,7 @@ void L2_FrameStateUpdate(L2_INST *instPtr)
|
||||
if (isValid == true)
|
||||
{
|
||||
memcpy(instPtr->rxSlotLog.payload,
|
||||
instPtr->recvPktData,
|
||||
instPtr->recvPktData,
|
||||
Phy_GetFrameLen(L2_L2frame2L1frame(recvType)));
|
||||
TIME_WORD timeWrod;
|
||||
Phy_GetLastReceivedFrameSyncTimeStamp(phyRef, &timeWrod);
|
||||
@@ -1220,7 +1220,7 @@ int32_t Linklayer_Proc(L2_INST *instPtr)
|
||||
// Update slot number.
|
||||
L2_UpdateSlotNum(instPtr);
|
||||
|
||||
DBG_INFO("######## Current frameNum: %u, SlotNo: %u ########\n",
|
||||
DBG_INFO("######## Current frameNum: %u, SlotNum: %u ########\n",
|
||||
instPtr->frameNum.curr, instPtr->slotNum.curr);
|
||||
|
||||
// Sync System info
|
||||
@@ -1232,9 +1232,9 @@ int32_t Linklayer_Proc(L2_INST *instPtr)
|
||||
// Handle frame received in last slot.
|
||||
if (L2_isDataAvail(instPtr) == true)
|
||||
{
|
||||
if (Linklayer_PktHandler(instPtr, L2_GetLastFrameType(instPtr)) != SUCCESS)
|
||||
if (Linklayer_PktHandler(instPtr, L2_GetLastOptFrameType(instPtr)) != SUCCESS)
|
||||
{
|
||||
DBG_ERROR("Failed to handle last received frame: %ld.\n", instPtr->frame.last);
|
||||
DBG_ERROR("Failed to handle last received frame: %d.\n", L2_GetLastOptFrameType(instPtr));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1268,7 +1268,7 @@ int32_t Linklayer_Proc(L2_INST *instPtr)
|
||||
L2_EventPoolHandler(instPtr);
|
||||
|
||||
PHY_INST* phyRef = instPtr->config.phyInstPtr;
|
||||
TIMECTRL_INST* tmcRef = instPtr->config.tmcInstPtr;
|
||||
TMC_INST* tmcRef = instPtr->config.tmcInstPtr;
|
||||
|
||||
TIME_WORD timeWord;
|
||||
// Update Protocol log
|
||||
|
||||
@@ -113,7 +113,16 @@ static int32_t Service_Packing(L2_INST *instPtr, L2_FRAME_TYPE type, uint8_t dst
|
||||
L2_FrameInsertChunk(buff, L2_MSG_SVC_SRC_SPEEDZ, L2_MSG_SVC_SRC_SPEEDZ_LEN, &(instPtr->sysInfo.vZ));
|
||||
|
||||
// packing payload
|
||||
L2_FrameInsertChunk(buff, L2_MSG_SVC_PAYLOAD, L2_MSG_SVC_PAYLOAD_LEN, testData);
|
||||
L2_FrameInsertChunk(buff, L2_MSG_SVC_PAYLOAD, L2_MSG_SVC_PAYLOAD_LEN, testData);
|
||||
|
||||
// if(L2_GetNodeType(instPtr) == L2_NODE_HEAD)
|
||||
// {
|
||||
// SysMonitor_GetSendPayloadLJRaw(buff+L2_MSG_SVC_PAYLOAD);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SysMonitor_GetSendPayloadFLJRaw(buff+L2_MSG_SVC_PAYLOAD);
|
||||
// }
|
||||
|
||||
Status = L2_CrcAppend(buff, L2_SVC_PACK_LEN - L2_MSG_SVC_CRC_LEN, L2_MSG_SVC_CRC, L2_CRC16_1021);
|
||||
if (Status != SUCCESS)
|
||||
@@ -267,7 +276,7 @@ int32_t L2_Service_PktHandler(L2_INST *instPtr, uint8_t *msg)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
DBG_ERROR("Unsupported frame type: %ld.\n", instPtr->frame.last);
|
||||
DBG_ERROR("Unsupported frame type: %d.\n", instPtr->frame.last);
|
||||
break;
|
||||
}
|
||||
return Status;
|
||||
@@ -339,7 +348,7 @@ int32_t L2_Service_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntr
|
||||
L2_SetupNextSlot(instPtr, torState, L2_SVC_FRAME);
|
||||
break;
|
||||
default:
|
||||
DBG_ERROR("UNKNOWN slot type [%d].\n", schedEntry->slotType);
|
||||
DBG_ERROR("UNKNOWN slot type [%d].\n", rtneEntry->slotType);
|
||||
return FAILURE;
|
||||
}
|
||||
#ifdef DATALINK_ENABLE_BERTEST
|
||||
|
||||
Reference in New Issue
Block a user