Eurobot2012_Primary

Dependencies:   mbed Eurobot_2012_Primary

Committer:
narshu
Date:
Sat Apr 28 17:21:24 2012 +0000
Revision:
9:377560539b74
Parent:
ui/ui.h@8:ffc7d8af2d5a
Restructured project to have a single shared lib; Also raised the RF baud rate

Who changed what in which revision?

UserRevisionLine numberNew contents of line
narshu 2:cffa347bb943 1
narshu 2:cffa347bb943 2 #ifndef UI_H
narshu 2:cffa347bb943 3 #define UI_H
narshu 2:cffa347bb943 4
narshu 2:cffa347bb943 5 #include "rtos.h"
narshu 2:cffa347bb943 6
narshu 2:cffa347bb943 7 #define NUMIDS 32
narshu 2:cffa347bb943 8
narshu 2:cffa347bb943 9 class UI {
narshu 2:cffa347bb943 10 public:
narshu 2:cffa347bb943 11 Thread tUI;
narshu 2:cffa347bb943 12
narshu 2:cffa347bb943 13 UI();
narshu 2:cffa347bb943 14
narshu 2:cffa347bb943 15 bool regid(char id, unsigned int length);
narshu 2:cffa347bb943 16 bool updateval(char id, float* buffer, unsigned int length);
narshu 2:cffa347bb943 17 bool updateval(char id, float value);
narshu 2:cffa347bb943 18 bool unregid(char id);
narshu 2:cffa347bb943 19
narshu 2:cffa347bb943 20 private:
narshu 8:ffc7d8af2d5a 21 Mutex printlock;
narshu 2:cffa347bb943 22 char idlist[NUMIDS];
narshu 2:cffa347bb943 23 float* buffarr[NUMIDS];
narshu 8:ffc7d8af2d5a 24 volatile int newdataflags; //Only works for NUMID = 32
narshu 2:cffa347bb943 25
narshu 2:cffa347bb943 26 void printloop();
narshu 2:cffa347bb943 27 static void printtw(void const *arg){ ((UI*)arg)->printloop(); }
narshu 2:cffa347bb943 28 };
narshu 2:cffa347bb943 29
narshu 2:cffa347bb943 30 #endif //UI_H