]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/tmirws/sensors/WindVaneP.nc
Work on wind sensor move to Davis Instruments.
[tinyos-2.x.git] / tos / platforms / tmirws / sensors / WindVaneP.nc
index 4042470e241704a7d22fbc33c91024bbd508bf6c..f9907c8eee4b9a20c5f22c88744b1885d1b9cd56 100644 (file)
@@ -40,6 +40,7 @@ module WindVaneP {
   uses {
     interface Tick as Second;
     interface Read<uint16_t> as Vane;
+    interface GeneralIO as WPower;
   }
 }
 implementation {
@@ -164,6 +165,7 @@ implementation {
 
   task void startRead()
   {
+    call WPower.set();
     call Vane.read();
   }
 
@@ -174,6 +176,7 @@ implementation {
 
   event void Vane.readDone(error_t error, uint16_t value)
   {
+    //call WPower.clr();
     if (error == SUCCESS) {
       /* Convert the adc value (0...4095) to a compass heading
        * (0...COMPASS_COUNT - 1).