X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Fplatforms%2Ftmirws%2Fsensors%2FWindVaneP.nc;h=65716f63f7718ccf800c50f043ded67591f150c8;hp=ef1543c42d9f4ff8b2086f1843ff453a3b79b832;hb=d7953c242529726be3c6743f499781db79d94f7d;hpb=d77247da5b155b1653e5044fe59ece639dce90bd diff --git a/tos/platforms/tmirws/sensors/WindVaneP.nc b/tos/platforms/tmirws/sensors/WindVaneP.nc index ef1543c4..65716f63 100644 --- a/tos/platforms/tmirws/sensors/WindVaneP.nc +++ b/tos/platforms/tmirws/sensors/WindVaneP.nc @@ -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. */