- if (call IsTokenRequested.getNow()) {
- // some other component needs the token - we give it up for now,
- // but before make another request to get it back afterwards
- dbg_serial("BeaconTransmitP", "Token is requested, releasing it now.\n");
- call Token.request();
- call Token.release();
- } else
- post grantedTask();
+ dbg_serial("BeaconSynchronizeP","Token transferred, will Tx beacon in %lu\n",
+ (uint32_t) ((m_lastBeaconTxTime + m_dt) - call BeaconSendAlarm.getNow()));
+ if (m_requestBitmap & (REQUEST_REALIGNMENT_DONE_PENDING | REQUEST_UPDATE_SF))
+ post signalGrantedTask(); // need to be in sync context
+ else
+ nextRound();