Oskar Weigl
/
Eurobot2013
We are going to win! wohoo
ui/ui.h@9:08552997b544, 2012-11-14 (annotated)
- Committer:
- madcowswe
- Date:
- Wed Nov 14 17:15:53 2012 +0000
- Revision:
- 9:08552997b544
- Parent:
- 1:6799c07fe510
Added an important comment
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sv | 1:6799c07fe510 | 1 | |
sv | 1:6799c07fe510 | 2 | #ifndef UI_H |
sv | 1:6799c07fe510 | 3 | #define UI_H |
sv | 1:6799c07fe510 | 4 | |
sv | 1:6799c07fe510 | 5 | #include "rtos.h" |
sv | 1:6799c07fe510 | 6 | |
sv | 1:6799c07fe510 | 7 | #define NUMIDS 32 |
sv | 1:6799c07fe510 | 8 | |
sv | 1:6799c07fe510 | 9 | class UI { |
sv | 1:6799c07fe510 | 10 | public: |
sv | 1:6799c07fe510 | 11 | Thread tUI; |
sv | 1:6799c07fe510 | 12 | |
sv | 1:6799c07fe510 | 13 | UI(); |
sv | 1:6799c07fe510 | 14 | |
sv | 1:6799c07fe510 | 15 | bool regid(char id, unsigned int length); |
sv | 1:6799c07fe510 | 16 | bool updateval(char id, float* buffer, unsigned int length); |
sv | 1:6799c07fe510 | 17 | bool updateval(char id, float value); |
sv | 1:6799c07fe510 | 18 | bool unregid(char id); |
sv | 1:6799c07fe510 | 19 | |
sv | 1:6799c07fe510 | 20 | private: |
sv | 1:6799c07fe510 | 21 | Mutex printlock; |
sv | 1:6799c07fe510 | 22 | char idlist[NUMIDS]; |
sv | 1:6799c07fe510 | 23 | float* buffarr[NUMIDS]; |
sv | 1:6799c07fe510 | 24 | volatile int newdataflags; //Only works for NUMID = 32 |
sv | 1:6799c07fe510 | 25 | |
sv | 1:6799c07fe510 | 26 | void printloop(); |
sv | 1:6799c07fe510 | 27 | static void printtw(void const *arg){ ((UI*)arg)->printloop(); } |
sv | 1:6799c07fe510 | 28 | }; |
sv | 1:6799c07fe510 | 29 | |
sv | 1:6799c07fe510 | 30 | #endif //UI_H |