Eurobot_shared pubulished from Eurobot Primary
Diff: ai/ai.h
- Revision:
- 0:434fd09723be
diff -r 000000000000 -r 434fd09723be ai/ai.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ai/ai.h Tue Aug 07 10:25:53 2012 +0000 @@ -0,0 +1,37 @@ +#ifndef AI_H +#define AI_H + +#include "rtos.h" +//#include "Kalman.h" + +class AI { +public: +AI(); + +Mutex targetlock; +Thread thr_AI; + +struct Target { + float x; + float y; + float theta; + bool facing; + bool reached; +} target; + +void settarget(float targetX, float targetY, float targetTheta, bool targetfacing = true, bool colour = true, int maxSpeed = 35); +void settarget(Target); +Target gettarget(); + +bool flag_terminate;// = false; +bool flag_motorStop; // = true; +bool flag_manOverride; // = false; + +private: + +void ai_thread (); +static void aithreadwrapper(void const *arg){ ((AI*)arg)->ai_thread(); } + +}; + +#endif //AI_H \ No newline at end of file