[Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/eyesIFX/byte_radio RssiFixedThresholdCMP.nc, 1.5, 1.6
akoepke
andreaskoepke at users.sourceforge.net
Thu Aug 14 06:14:11 PDT 2008
Update of /cvsroot/tinyos/tinyos-2.x/tos/platforms/eyesIFX/byte_radio
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18363/platforms/eyesIFX/byte_radio
Modified Files:
RssiFixedThresholdCMP.nc
Log Message:
improve computation of mean
Index: RssiFixedThresholdCMP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/eyesIFX/byte_radio/RssiFixedThresholdCMP.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** RssiFixedThresholdCMP.nc 10 Jul 2007 13:13:42 -0000 1.5
--- RssiFixedThresholdCMP.nc 14 Aug 2008 13:14:09 -0000 1.6
***************
*** 287,291 ****
shellsort(rssisamples,NSAMPLES);
atomic {
! noisefloor = (5*noisefloor + rssisamples[NSAMPLES/2])/6;
rssiindex = 0;
}
--- 287,291 ----
shellsort(rssisamples,NSAMPLES);
atomic {
! noisefloor = (5*noisefloor + rssisamples[NSAMPLES/2] + 3)/6;
rssiindex = 0;
}
***************
*** 319,323 ****
shellsort(rssisamples,NSAMPLES);
if(rssisamples[MINIMUM_POSITION] < noisefloor + THREE_SIGMA) {
! noisefloor = (7*noisefloor + rssisamples[NSAMPLES/2])/8;
++deadlockCounter;
}
--- 319,323 ----
shellsort(rssisamples,NSAMPLES);
if(rssisamples[MINIMUM_POSITION] < noisefloor + THREE_SIGMA) {
! noisefloor = (7*noisefloor + rssisamples[NSAMPLES/2] + 4)/8;
++deadlockCounter;
}
***************
*** 412,416 ****
uint16_t l;
atomic l = batteryLevel;
! return (uint32_t)l*39>>5;
}
}
--- 412,416 ----
uint16_t l;
atomic l = batteryLevel;
! return (uint32_t)(l+3)*6/5;
}
}
More information about the Tinyos-2-commits
mailing list