]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
allow etx for a bad parent to grow if no pkts were received since the last update
authorgnawali <gnawali>
Mon, 9 Apr 2007 15:34:34 +0000 (15:34 +0000)
committergnawali <gnawali>
Mon, 9 Apr 2007 15:34:34 +0000 (15:34 +0000)
tos/lib/net/le/LinkEstimatorP.nc

index 58ab66c64321993afcc308dfb7ce9388be77fb97..ebfa4430fa6741a593fbbcbeafce36b732fd75e3 100644 (file)
@@ -246,14 +246,15 @@ implementation {
 
     if (ne->data_success == 0) {
       // if there were no successful packet transmission in the
-      // last window, assign a large EETX estimate
-      estETX = LARGE_EETX_VALUE;
+      // last window, our current estimate is the number of failed
+      // transmissions
+      estETX = (ne->data_total - 1)* 10;
     } else {
       estETX = (10 * ne->data_total) / ne->data_success - 10;
+      ne->data_success = 0;
+      ne->data_total = 0;
     }
     updateEETX(ne, estETX);
-    ne->data_success = 0;
-    ne->data_total = 0;
   }