mirror of
https://github.com/espressif/openthread.git
synced 2026-07-27 22:37:45 +00:00
[csl] allow scheduling delayed reception in any radio state (#7677)
When radio supports receive timing it makes no sense to restrict scheduling future reception slots while the radio state is for instance transmitting or receiving, as long as CSL parameters are properly configured.
This commit is contained in:
@@ -1165,18 +1165,19 @@ void SubMac::HandleCslTimer(void)
|
||||
}
|
||||
|
||||
Get<Radio>().UpdateCslSampleTime(mCslSampleTime.GetValue());
|
||||
if (mState == kStateCslSample)
|
||||
|
||||
if (RadioSupportsReceiveTiming())
|
||||
{
|
||||
if (RadioSupportsReceiveTiming())
|
||||
if (mState != kStateDisabled && mCslChannel)
|
||||
{
|
||||
IgnoreError(Get<Radio>().ReceiveAt(mCslChannel, mCslSampleTime.GetValue() - periodUs - timeAhead,
|
||||
timeAhead + timeAfter));
|
||||
}
|
||||
else
|
||||
{
|
||||
IgnoreError(Get<Radio>().Receive(mCslChannel));
|
||||
LogDebg("CSL sample %u, duration %u", mCslTimer.GetNow().GetValue(), timeAhead + timeAfter);
|
||||
}
|
||||
}
|
||||
else if (mState == kStateCslSample)
|
||||
{
|
||||
IgnoreError(Get<Radio>().Receive(mCslChannel));
|
||||
LogDebg("CSL sample %u, duration %u", mCslTimer.GetNow().GetValue(), timeAhead + timeAfter);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user