*adapted to new time sync api
This commit is contained in:
@@ -306,10 +306,8 @@ int32_t L2_Service_PktHandler(L2_INST *instPtr, uint8_t *msg)
|
|||||||
// Implement a auto time sync.
|
// Implement a auto time sync.
|
||||||
if (L2_GetNodeType(instPtr) != L2_NODE_HEAD)
|
if (L2_GetNodeType(instPtr) != L2_NODE_HEAD)
|
||||||
{
|
{
|
||||||
uint32_t frameNum, slotNum;
|
// Time sync.
|
||||||
L2_FrameGetChunk(msg, L2_MSG_FRAME_NUM, L2_MSG_FRAME_NUM_LEN, &frameNum);
|
L2_TimeAdjust(instPtr, &(instPtr->log.timeDev));
|
||||||
L2_FrameGetChunk(msg, L2_MSG_SLOT_NUM, L2_MSG_SLOT_NUM_LEN, &slotNum);
|
|
||||||
L2_TimeAlign(instPtr, frameNum, slotNum, true);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user