Eurobot2012_Primary
Dependencies: mbed Eurobot_2012_Primary
ai.h
00001 #ifndef AI_H 00002 #define AI_H 00003 00004 #include "rtos.h" 00005 //#include "Kalman.h" 00006 00007 class AI { 00008 public: 00009 AI(); 00010 00011 Mutex targetlock; 00012 Thread thr_AI; 00013 00014 struct Target { 00015 float x; 00016 float y; 00017 float theta; 00018 bool facing; 00019 bool reached; 00020 } target; 00021 00022 void settarget(float targetX, float targetY, float targetTheta, bool targetfacing = true, bool colour = true, int maxSpeed = 35); 00023 void settarget(Target); 00024 Target gettarget(); 00025 00026 bool flag_terminate;// = false; 00027 bool flag_motorStop; // = true; 00028 bool flag_manOverride; // = false; 00029 00030 private: 00031 00032 void ai_thread (); 00033 static void aithreadwrapper(void const *arg){ ((AI*)arg)->ai_thread(); } 00034 00035 }; 00036 00037 #endif //AI_H
Generated on Tue Jul 12 2022 21:49:57 by 1.7.2