ai

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ai.h Source File

ai.h

00001 #ifndef AI_H
00002 #define AI_H
00003 
00004 #include "rtos.h"
00005 
00006 class AI {
00007 public:
00008 AI();
00009 
00010 Mutex targetlock;
00011 Thread thr_AI;
00012 
00013 struct Target {
00014     float x;
00015     float y;
00016     float theta;
00017     bool facing;
00018 } target;
00019 
00020 void settarget(float targetX, float targetY, float targetTheta, bool targetfacing = true);
00021 void settarget(Target);
00022 Target gettarget();
00023 
00024 bool flag_terminate;// = false;
00025 
00026 private:
00027 
00028 void ai_thread ();
00029 static void aithreadwrapper(void const *arg){ ((AI*)arg)->ai_thread(); }
00030 
00031 };
00032 
00033 #endif //AI_H