Robot's source code
Dependencies: mbed
Map/Objectifs/Objectif.h@123:55e5e9acc541, 2015-05-11 (annotated)
- Committer:
- Jagang
- Date:
- Mon May 11 20:32:11 2015 +0000
- Revision:
- 123:55e5e9acc541
- Parent:
- 119:c45efcd706d9
Maj AI; Repositionnement du d?part (1000,177); Ajout de l'action sur les claps
Who changed what in which revision?
User | Revision | Line number | New 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 | class Objectif |
Jagang | 109:53918ba98306 | 13 | { |
Jagang | 109:53918ba98306 | 14 | public: |
Jagang | 117:f8c147141a0c | 15 | Objectif(float x, float y, float theta); |
Jagang | 109:53918ba98306 | 16 | |
Jagang | 109:53918ba98306 | 17 | virtual void run() = 0; |
Jagang | 109:53918ba98306 | 18 | bool isDone(){return done;} |
Jagang | 109:53918ba98306 | 19 | float getX(){return x;} |
Jagang | 109:53918ba98306 | 20 | float getY(){return y;} |
Jagang | 109:53918ba98306 | 21 | float getTheta(){return theta;} |
Jagang | 109:53918ba98306 | 22 | |
Jagang | 109:53918ba98306 | 23 | int getId(){return id;} |
Jagang | 109:53918ba98306 | 24 | void setId(int id){this->id = id;} |
Jagang | 109:53918ba98306 | 25 | |
Jagang | 109:53918ba98306 | 26 | virtual int isActive(){return active;} |
Jagang | 109:53918ba98306 | 27 | void activate(){active=true;} |
Jagang | 109:53918ba98306 | 28 | void desactivate(){active=false;} |
Jagang | 109:53918ba98306 | 29 | protected: |
Jagang | 109:53918ba98306 | 30 | float x,y,theta; |
Jagang | 109:53918ba98306 | 31 | bool done,active; |
Jagang | 109:53918ba98306 | 32 | int id; |
Jagang | 109:53918ba98306 | 33 | }; |
Jagang | 109:53918ba98306 | 34 | |
Jagang | 109:53918ba98306 | 35 | #endif |