]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Trim the size down a bit.
authorscipio <scipio>
Sun, 1 Apr 2007 00:52:10 +0000 (00:52 +0000)
committerscipio <scipio>
Sun, 1 Apr 2007 00:52:10 +0000 (00:52 +0000)
tos/lib/tossim/sim_noise.c
tos/lib/tossim/sim_noise.h

index 6614cc9c0c36682e6d573560ca2e9456d4e185e4..6a5dca745ed6679ae7a78d3f9aaade432f125783 100644 (file)
@@ -221,15 +221,9 @@ void sim_noise_dist(uint16_t node_id)__attribute__ ((C, spontaneous))
 
 void arrangeKey(uint16_t node_id)__attribute__ ((C, spontaneous))
 {
-  int i;
-  char key[NOISE_HISTORY];
   char *pKey = noiseData[node_id].key;
+  memcpy(pKey, pKey+1, NOISE_HISTORY-1);
 
-  for(i=0;i<NOISE_HISTORY-1; i++)
-    {
-      key[i] = pKey[i+1];
-    }
-  memcpy((void *)pKey, (void *)key, NOISE_HISTORY);
 }
 
 /*
index 110cf3f0f1022b74d2283c32ccc9c0e4c730a72a..078c58427c56c7ee2178eb1ea14b37310912fe78 100644 (file)
@@ -41,8 +41,8 @@ extern "C" {
 #endif
 
 enum {
-  NOISE_MIN = -120,
-  NOISE_MAX = 10,
+  NOISE_MIN = -100,
+  NOISE_MAX = -30,
   NOISE_MIN_QUANTIZE = -100,
   NOISE_QUANTIZE_INTERVAL = 5,
   NOISE_BIN_SIZE = (NOISE_MAX - NOISE_MIN)/NOISE_QUANTIZE_INTERVAL,