]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/tmirws/sensors/WindVaneP.nc
Replace a cardinal value with its proper template argument in WindVaneP.
[tinyos-2.x.git] / tos / platforms / tmirws / sensors / WindVaneP.nc
index ef1543c42d9f4ff8b2086f1843ff453a3b79b832..65716f63f7718ccf800c50f043ded67591f150c8 100644 (file)
@@ -72,7 +72,7 @@ implementation {
   /* Convert a degree heading into a sector */
   uint16_t degreeToSector(uint16_t degree)
   {
-    return ((degree * sectors + 180) / 360) % 32;
+    return ((degree * sectors + 180) / 360) % sectors;
   }
 
   /* Return the # of sectors clockwise along the compass from start to end.  */