LCD implementation of our project.
Dependencies: mbed mbed-rtos MLX90614
Compass.h@3:688b62ff6474, 2015-04-26 (annotated)
- Committer:
- ovidiup13
- Date:
- Sun Apr 26 16:29:53 2015 +0000
- Revision:
- 3:688b62ff6474
- Child:
- 4:024e6a9c2ebf
added screens for interacting with other components. i.e. distance, thermo, gyro, compass, etc. Need to complete settings screen and create threads for interacting with other code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ovidiup13 | 3:688b62ff6474 | 1 | #ifndef _COMPASS_H |
ovidiup13 | 3:688b62ff6474 | 2 | #define _COMPASS_H |
ovidiup13 | 3:688b62ff6474 | 3 | |
ovidiup13 | 3:688b62ff6474 | 4 | #include "Item.h" |
ovidiup13 | 3:688b62ff6474 | 5 | #include<stdio.h> |
ovidiup13 | 3:688b62ff6474 | 6 | #define _USE_MATH_DEFINES |
ovidiup13 | 3:688b62ff6474 | 7 | #include <math.h> |
ovidiup13 | 3:688b62ff6474 | 8 | #define M_PI 3.14159265358979323846 /* pi */ |
ovidiup13 | 3:688b62ff6474 | 9 | |
ovidiup13 | 3:688b62ff6474 | 10 | //define center coordinates |
ovidiup13 | 3:688b62ff6474 | 11 | #define X_CENTER 95 |
ovidiup13 | 3:688b62ff6474 | 12 | #define Y_CENTER 35 |
ovidiup13 | 3:688b62ff6474 | 13 | #define POINTER_LENGTH 10 |
ovidiup13 | 3:688b62ff6474 | 14 | #define RADIUS 19 |
ovidiup13 | 3:688b62ff6474 | 15 | |
ovidiup13 | 3:688b62ff6474 | 16 | class Compass: public Item { |
ovidiup13 | 3:688b62ff6474 | 17 | public: |
ovidiup13 | 3:688b62ff6474 | 18 | |
ovidiup13 | 3:688b62ff6474 | 19 | //inherited functions |
ovidiup13 | 3:688b62ff6474 | 20 | Compass(ST7565 * lcd, Item * back){ |
ovidiup13 | 3:688b62ff6474 | 21 | this->title = " Compass"; |
ovidiup13 | 3:688b62ff6474 | 22 | this->st7565= lcd; |
ovidiup13 | 3:688b62ff6474 | 23 | this->back = back; |
ovidiup13 | 3:688b62ff6474 | 24 | } |
ovidiup13 | 3:688b62ff6474 | 25 | |
ovidiup13 | 3:688b62ff6474 | 26 | virtual void display(void); |
ovidiup13 | 3:688b62ff6474 | 27 | virtual void update(char c); |
ovidiup13 | 3:688b62ff6474 | 28 | |
ovidiup13 | 3:688b62ff6474 | 29 | void draw_compass(double degrees); |
ovidiup13 | 3:688b62ff6474 | 30 | void update_compass(void); |
ovidiup13 | 3:688b62ff6474 | 31 | }; |
ovidiup13 | 3:688b62ff6474 | 32 | |
ovidiup13 | 3:688b62ff6474 | 33 | #endif |