}
void radioOff() {
- call ByteRadio.off();
call CC1000Control.off();
+ call ByteRadio.off();
}
/* LPL preamble length and sleep time computation */
{
case IDLE_STATE:
/* Timer already running means that we have a noise floor
- measurement scheduled. */
+ measurement scheduled. If we just set a new alarm here, we
+ might indefinitely delay noise floor measurements if we're,
+ e,g, transmitting frequently. */
if (!call WakeupTimer.isRunning())
if (call CC1000Squelch.settled())
{
- if (lplRxPower == 0 || f.txPending)
+ if (lplRxPower == 0)
call WakeupTimer.startOneShot(CC1K_SquelchIntervalSlow);
else
// timeout for receiving a message after an lpl check
*/
if (data > call CC1000Squelch.get() - (call CC1000Squelch.get() >> 2))
{
+ post sleepCheck();
// don't be too agressive (ignore really quiet thresholds).
if (data < call CC1000Squelch.get() + (call CC1000Squelch.get() >> 3))
{
rssiForSquelch = data;
post adjustSquelch();
}
- post sleepCheck();
}
else if (count++ > 5)
{