Eurobot2012_Primary

Dependencies:   mbed Eurobot_2012_Primary

Committer:
narshu
Date:
Wed Oct 17 22:22:47 2012 +0000
Revision:
26:0995f61cb7b8
Parent:
17:bafcef1c3579
Eurobot 2012 Primary;

Who changed what in which revision?

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