]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/Sense/SenseC.nc
Changed the default to be that all platforms #include stdio.h unless specifically...
[tinyos-2.x.git] / apps / Sense / SenseC.nc
index c2cc90ce59f4fb65956dc80c4e354ffa4ee2d8b1..a1017e054eb094f4bd0a806e59af142eb43752e6 100644 (file)
@@ -55,7 +55,7 @@ module SenseC
 }
 implementation
 {
-  // sampling frequency in milliseconds
+  // sampling frequency in binary milliseconds
   #define SAMPLING_FREQUENCY 100
   
   event void Boot.booted() {
@@ -70,15 +70,15 @@ implementation
   event void Read.readDone(error_t result, uint16_t data) 
   {
     if (result == SUCCESS){
-      if (data & 0x8000)
+      if (data & 0x0004)
         call Leds.led2On();
       else
         call Leds.led2Off();
-      if (data & 0x4000)
+      if (data & 0x0002)
         call Leds.led1On();
       else
         call Leds.led1Off();
-      if (data & 0x2000)
+      if (data & 0x0001)
         call Leds.led0On();
       else
         call Leds.led0Off();