Robot's source code

Dependencies:   mbed

Committer:
Jagang
Date:
Wed May 06 11:22:17 2015 +0000
Revision:
117:f8c147141a0c
Parent:
109:53918ba98306
Child:
119:c45efcd706d9
Objectif pince et depot

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jagang 109:53918ba98306 1 #ifndef OBJECTIF_H
Jagang 109:53918ba98306 2 #define OBJECTIF_H
Jagang 109:53918ba98306 3
Jagang 109:53918ba98306 4 #include "defines.h"
Jagang 109:53918ba98306 5
Jagang 109:53918ba98306 6 #ifdef PLAN_A
Jagang 109:53918ba98306 7 #include "Asserv.h"
Jagang 109:53918ba98306 8 #else
Jagang 109:53918ba98306 9 #include "planB.h"
Jagang 109:53918ba98306 10 #endif
Jagang 109:53918ba98306 11
Jagang 109:53918ba98306 12 enum ID
Jagang 109:53918ba98306 13 {
Jagang 117:f8c147141a0c 14 IDO_PC1,
Jagang 117:f8c147141a0c 15 IDO_DEPOT
Jagang 109:53918ba98306 16 };
Jagang 109:53918ba98306 17
Jagang 109:53918ba98306 18 class Objectif
Jagang 109:53918ba98306 19 {
Jagang 109:53918ba98306 20 public:
Jagang 117:f8c147141a0c 21 Objectif(float x, float y, float theta);
Jagang 109:53918ba98306 22
Jagang 109:53918ba98306 23 virtual void run() = 0;
Jagang 109:53918ba98306 24 bool isDone(){return done;}
Jagang 109:53918ba98306 25 float getX(){return x;}
Jagang 109:53918ba98306 26 float getY(){return y;}
Jagang 109:53918ba98306 27 float getTheta(){return theta;}
Jagang 109:53918ba98306 28
Jagang 109:53918ba98306 29 int getId(){return id;}
Jagang 109:53918ba98306 30 void setId(int id){this->id = id;}
Jagang 109:53918ba98306 31
Jagang 109:53918ba98306 32 virtual int isActive(){return active;}
Jagang 109:53918ba98306 33 void activate(){active=true;}
Jagang 109:53918ba98306 34 void desactivate(){active=false;}
Jagang 109:53918ba98306 35 protected:
Jagang 109:53918ba98306 36 float x,y,theta;
Jagang 109:53918ba98306 37 bool done,active;
Jagang 109:53918ba98306 38 int id;
Jagang 109:53918ba98306 39 };
Jagang 109:53918ba98306 40
Jagang 109:53918ba98306 41 #endif