[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/tossim sim_noise.h, 1.5, 1.6

Phil Levis scipio at users.sourceforge.net
Sun Aug 5 15:29:48 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9928

Modified Files:
	sim_noise.h 
Log Message:
Fix possible size bug on bin count.


Index: sim_noise.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/sim_noise.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** sim_noise.h	21 May 2007 22:08:29 -0000	1.5
--- sim_noise.h	5 Aug 2007 22:29:46 -0000	1.6
***************
*** 41,44 ****
--- 41,46 ----
  #endif
  
+ // BIN_SIZE (the number of bins) has a + 1 in case the range is not
+ // evenly divisible by INTERVAL -pal 5.aug.07
  enum {
    NOISE_MIN = -115,
***************
*** 46,50 ****
    NOISE_MIN_QUANTIZE = -115,
    NOISE_QUANTIZE_INTERVAL = 5,
!   NOISE_BIN_SIZE = (NOISE_MAX - NOISE_MIN)/NOISE_QUANTIZE_INTERVAL,
    NOISE_HISTORY = 20,
    NOISE_DEFAULT_ELEMENT_SIZE = 8,
--- 48,52 ----
    NOISE_MIN_QUANTIZE = -115,
    NOISE_QUANTIZE_INTERVAL = 5,
!   NOISE_BIN_SIZE = ((NOISE_MAX - NOISE_MIN) / NOISE_QUANTIZE_INTERVAL) + 1,
    NOISE_HISTORY = 20,
    NOISE_DEFAULT_ELEMENT_SIZE = 8,



More information about the Tinyos-2-commits mailing list