[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/4bitle LinkEstimatorP.nc, 1.9, 1.10
Omprakash Gnawali
gnawali at users.sourceforge.net
Thu Mar 12 22:13:31 PDT 2009
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/4bitle
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15778/4bitle
Modified Files:
LinkEstimatorP.nc
Log Message:
trunc->round as suggested out by Andreas Kopke, and one other trunc->round
Index: LinkEstimatorP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/4bitle/LinkEstimatorP.nc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** LinkEstimatorP.nc 27 Sep 2008 17:00:54 -0000 1.9
--- LinkEstimatorP.nc 13 Mar 2009 05:13:29 -0000 1.10
***************
*** 277,281 ****
// also called when new DEETX estimate is done
void updateEETX(neighbor_table_entry_t *ne, uint16_t newEst) {
! ne->eetx = (ALPHA * ne->eetx + (10 - ALPHA) * newEst)/10;
}
--- 277,281 ----
// also called when new DEETX estimate is done
void updateEETX(neighbor_table_entry_t *ne, uint16_t newEst) {
! ne->eetx = (ALPHA * ne->eetx + (10 - ALPHA) * newEst + 5)/10;
}
***************
*** 347,352 ****
} else {
newEst = (255 * ne->rcvcnt) / totalPkt;
! dbg("LI,LITest", " %hu: %hhu -> %hhu", ne->ll_addr, ne->inquality, (ALPHA * ne->inquality + (10-ALPHA) * newEst)/10);
! ne->inquality = (ALPHA * ne->inquality + (10-ALPHA) * newEst)/10;
}
ne->rcvcnt = 0;
--- 347,352 ----
} else {
newEst = (255 * ne->rcvcnt) / totalPkt;
! dbg("LI,LITest", " %hu: %hhu -> %hhu", ne->ll_addr, ne->inquality, (ALPHA * ne->inquality + (10-ALPHA) * newEst + 5)/10);
! ne->inquality = (ALPHA * ne->inquality + (10-ALPHA) * newEst + 5)/10;
}
ne->rcvcnt = 0;
More information about the Tinyos-2-commits
mailing list