From e7cff086d70a6cd44c0c7ba21e83a92d52e5e0bf Mon Sep 17 00:00:00 2001 From: smckown Date: Mon, 9 Nov 2009 19:30:59 +0000 Subject: [PATCH] Teach aerovector_t that it can be null, via a special value in its dir member. --- tos/platforms/tmirws/sensors/AeroVane.h | 4 ++++ 1 file changed, 4 insertions(+) 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. */ -- 2.39.2