[mac] keep the second energy scan sample (#3871)

This commit fixes an issue where the second sample is skipped
because the timer had not expired yet.
This commit is contained in:
Yakun Xu
2019-05-28 11:50:02 -07:00
committed by Jonathan Hui
parent 754da79286
commit 6b4f8a8829
+1 -2
View File
@@ -421,8 +421,7 @@ otError SubMac::EnergyScan(uint8_t aScanChannel, uint16_t aScanDuration)
SetState(kStateEnergyScan);
mEnergyScanMaxRssi = kInvalidRssiValue;
mEnergyScanEndTime = TimerMilli::GetNow() + aScanDuration;
mTimer.Start(kEnergyScanRssiSampleInterval);
SampleRssi();
mTimer.Start(0);
}
else
{