Colin Stearns
/
qcControl
QC Control software
Fork of dgps by
handle/handleCompass.h@10:c4745ddaaf6a, 2014-04-03 (annotated)
- Committer:
- krobertson
- Date:
- Thu Apr 03 17:24:53 2014 +0000
- Revision:
- 10:c4745ddaaf6a
- Child:
- 44:2ae602b89961
added compass
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
krobertson | 10:c4745ddaaf6a | 1 | #ifndef _HANDLECOMPASS_H_ |
krobertson | 10:c4745ddaaf6a | 2 | #define _HANDLECOMPASS_H_ |
krobertson | 10:c4745ddaaf6a | 3 | |
krobertson | 10:c4745ddaaf6a | 4 | #include "adapt/compass.h" |
krobertson | 10:c4745ddaaf6a | 5 | |
krobertson | 10:c4745ddaaf6a | 6 | class compassHandle { |
krobertson | 10:c4745ddaaf6a | 7 | public: |
krobertson | 10:c4745ddaaf6a | 8 | /** |
krobertson | 10:c4745ddaaf6a | 9 | * \brief the last read compass heading |
krobertson | 10:c4745ddaaf6a | 10 | **/ |
krobertson | 10:c4745ddaaf6a | 11 | float heading; |
krobertson | 10:c4745ddaaf6a | 12 | |
krobertson | 10:c4745ddaaf6a | 13 | /** |
krobertson | 10:c4745ddaaf6a | 14 | * \brief constructor for the compass handle. Sets up the compass for reading. |
krobertson | 10:c4745ddaaf6a | 15 | **/ |
krobertson | 10:c4745ddaaf6a | 16 | compassHandle(); |
krobertson | 10:c4745ddaaf6a | 17 | |
krobertson | 10:c4745ddaaf6a | 18 | /** |
krobertson | 10:c4745ddaaf6a | 19 | * \brief sets up the compass for reading headings |
krobertson | 10:c4745ddaaf6a | 20 | **/ |
krobertson | 10:c4745ddaaf6a | 21 | void setup(); |
krobertson | 10:c4745ddaaf6a | 22 | |
krobertson | 10:c4745ddaaf6a | 23 | /** |
krobertson | 10:c4745ddaaf6a | 24 | * \brief gets an updated heading |
krobertson | 10:c4745ddaaf6a | 25 | **/ |
krobertson | 10:c4745ddaaf6a | 26 | void run(); |
krobertson | 10:c4745ddaaf6a | 27 | private: |
krobertson | 10:c4745ddaaf6a | 28 | /** |
krobertson | 10:c4745ddaaf6a | 29 | * \brief reference to the compass adaptor |
krobertson | 10:c4745ddaaf6a | 30 | **/ |
krobertson | 10:c4745ddaaf6a | 31 | Compass compass; |
krobertson | 10:c4745ddaaf6a | 32 | }; |
krobertson | 10:c4745ddaaf6a | 33 | |
krobertson | 10:c4745ddaaf6a | 34 | #endif |