[link-quality] explicitly clear link quality for new child/router (#2941)

The child/router entries are generally cleared using `memset()` to avoid
explicitly setting all fields to zero.  As a result, it is necessary to
explicitly clear the link quality state to properly initialize the last
RSSI reading.  The user-specific constructors are also removed.
This commit is contained in:
Jonathan Hui
2018-08-01 10:33:03 -05:00
committed by GitHub
parent 412f9740b0
commit ba4b238a00
5 changed files with 10 additions and 26 deletions
+3
View File
@@ -93,6 +93,7 @@ void TestLinkQualityData(RssTestData aRssData)
size_t i;
printf("- - - - - - - - - - - - - - - - - -\n");
linkInfo.Clear();
min = kMinRssValue;
max = kMaxRssValue;
@@ -387,6 +388,8 @@ void TestSuccessRateTracker(void)
printf("\nTesting SuccessRateTracker\n");
rateTracker.Reset();
VerifyOrQuit(rateTracker.GetSuccessRate() == kMaxRate, "SuccessRateTracker: Initial value incorrect");
VerifyOrQuit(rateTracker.GetFailureRate() == 0, "SuccessRateTracker: Initial value incorrect");