X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fnet%2F4bitle%2FLinkEstimatorP.nc;h=c428df1b0ce307b4034ddbea85c116941bbbbe0f;hb=9390e390de5df6a16c6d862ecad74e6c788cecde;hp=b35e1f4c2e4f789b1ac6eee444e856ab97a56bca;hpb=36379087c4459259cb05c00f0b9f125adf7b7266;p=tinyos-2.x.git diff --git a/tos/lib/net/4bitle/LinkEstimatorP.nc b/tos/lib/net/4bitle/LinkEstimatorP.nc index b35e1f4c..c428df1b 100644 --- a/tos/lib/net/4bitle/LinkEstimatorP.nc +++ b/tos/lib/net/4bitle/LinkEstimatorP.nc @@ -70,7 +70,7 @@ implementation { INFINITY = 0xff, // decay the link estimate using this alpha // we use a denominator of 10, so this corresponds to 0.2 - ALPHA = 2, + ALPHA = 9, // number of packets to wait before computing a new // DLQ (Data-driven Link Quality) DLQ_PKT_WINDOW = 5, @@ -443,8 +443,12 @@ implementation { if (idx == INVALID_RVAL) { return INFINITY; } else { - return NeighborTable[idx].eetx; - }; + if (NeighborTable[idx].flags & MATURE_ENTRY) { + return NeighborTable[idx].eetx; + } else { + return INFINITY; + } + } } // insert the neighbor at any cost (if there is a room for it)