bugfix: correct record shit mechanism.
This commit is contained in:
@@ -450,8 +450,9 @@ int32_t L2_SetupNextSlot(L2_INST* instPtr, L2_TOR_TYPE txrxMode, L2_FRAME_TYPE f
|
||||
#endif
|
||||
|
||||
// Update frame and tx/rx mode record.
|
||||
instPtr->frame.next = frameType;
|
||||
instPtr->tor.next = txrxMode;
|
||||
// Frame types shift (last <- curr <- next)
|
||||
L2_RcdShift(&(instPtr->frame), frameType);
|
||||
L2_RcdShift(&(instPtr->tor), txrxMode);
|
||||
|
||||
TIME_WORD pullTime = {0, 0};
|
||||
pullTime.int_part = TimeCtrl_GetIntCnt(instPtr->config.tmcInstPtr) + 1;
|
||||
@@ -1106,6 +1107,9 @@ int32_t Linklayer_Proc(L2_INST* instPtr) {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// Update slot number.
|
||||
L2_UpdateSlotNum(instPtr);
|
||||
|
||||
DBG_INFO("######## Current frameNum: %u, SlotNo: %u ########\n",
|
||||
instPtr->frameNum.curr, instPtr->slotNum.curr);
|
||||
|
||||
@@ -1140,13 +1144,6 @@ int32_t Linklayer_Proc(L2_INST* instPtr) {
|
||||
// Check and execute scheduled event.
|
||||
L2_EventPoolHandler(instPtr);
|
||||
|
||||
// Update slot number.
|
||||
L2_UpdateSlotNum(instPtr);
|
||||
|
||||
// Frame types shift (last <- curr <- next)
|
||||
L2_RcdShift(&(instPtr->frame), L2_NONE_FRAME);
|
||||
L2_RcdShift(&(instPtr->tor), L2_TOR_SUSPEND);
|
||||
|
||||
// Update link layer state.
|
||||
instPtr->mainState = instPtr->nextState;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user