Robot's source code

Dependencies:   mbed

Revision:
109:53918ba98306
Child:
117:f8c147141a0c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Map/Objectifs/Objectif.h	Tue May 05 16:35:53 2015 +0000
@@ -0,0 +1,49 @@
+#ifndef OBJECTIF_H
+#define OBJECTIF_H
+
+#include "defines.h"
+
+#ifdef PLAN_A
+    #include "Asserv.h"
+#else
+    #include "planB.h"
+#endif
+
+enum ID
+{
+    
+};
+
+class Objectif
+{
+public:
+    #ifdef PLAN_A
+        Objectif(float x, float y, float theta, Asserv<float> *asserv);
+    #else
+        Objectif(float x, float y, float theta, aserv_planB *asserv);
+    #endif
+    
+    virtual void run() = 0;
+    bool isDone(){return done;}
+    float getX(){return x;}
+    float getY(){return y;}
+    float getTheta(){return theta;}
+    
+    int getId(){return id;}
+    void setId(int id){this->id = id;}
+    
+    virtual int isActive(){return active;}
+    void activate(){active=true;}
+    void desactivate(){active=false;}
+protected:
+    #ifdef PLAN_A
+        Asserv<float>* asserv;
+    #else
+        aserv_planB* asserv;
+    #endif
+    float x,y,theta;
+    bool done,active;
+    int id;
+};
+
+#endif