From: smckown Date: Mon, 9 Nov 2009 19:30:59 +0000 (+0000) Subject: Teach aerovector_t that it can be null, via a special value in its dir member. X-Git-Tag: release/2.1.0-2~5 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=e7cff086d70a6cd44c0c7ba21e83a92d52e5e0bf Teach aerovector_t that it can be null, via a special value in its dir member. --- diff --git a/tos/platforms/tmirws/sensors/AeroVane.h b/tos/platforms/tmirws/sensors/AeroVane.h index 3e90ef39..9c02b5c3 100644 --- a/tos/platforms/tmirws/sensors/AeroVane.h +++ b/tos/platforms/tmirws/sensors/AeroVane.h @@ -36,6 +36,10 @@ #ifndef AEROVANE_H #define AEROVANE_H +enum { + AEROVANE_VECTOR_NULL = 65535U, /* Null vector has this value as dir */ +}; + typedef struct { uint16_t dir; /* Vane position. 0...1023; 360 degrees = 1024 */ uint16_t speed; /* Anemometer revolutions over reading period. */