forked from gatsby/df_datalink
*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.
|
||||
if (L2_GetNodeType(instPtr) != L2_NODE_HEAD)
|
||||
{
|
||||
uint32_t frameNum, slotNum;
|
||||
L2_FrameGetChunk(msg, L2_MSG_FRAME_NUM, L2_MSG_FRAME_NUM_LEN, &frameNum);
|
||||
L2_FrameGetChunk(msg, L2_MSG_SLOT_NUM, L2_MSG_SLOT_NUM_LEN, &slotNum);
|
||||
L2_TimeAlign(instPtr, frameNum, slotNum, true);
|
||||
// Time sync.
|
||||
L2_TimeAdjust(instPtr, &(instPtr->log.timeDev));
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user