mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-05 19:19:18 +00:00
return 0 if unknown node coverage is stale
This commit is contained in:
parent
0589b8384f
commit
0383c29383
@ -132,6 +132,9 @@ int CountingCoverageFilter::approximateNewCoverageCount(const CoverageFilter &in
|
|||||||
|
|
||||||
float CountingCoverageFilter::approximateCoverageRatio(const CoverageFilter &incoming) const
|
float CountingCoverageFilter::approximateCoverageRatio(const CoverageFilter &incoming) const
|
||||||
{
|
{
|
||||||
|
if (isStale())
|
||||||
|
return 0.0f;
|
||||||
|
|
||||||
// 1) How many "new coverage" bits do we see?
|
// 1) How many "new coverage" bits do we see?
|
||||||
int newBits = approximateNewCoverageCount(incoming);
|
int newBits = approximateNewCoverageCount(incoming);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user