Robot's source code

Dependencies:   mbed

Map/Objectifs/Objectif.h

Committer:
Jagang
Date:
2015-05-05
Revision:
109:53918ba98306
Child:
117:f8c147141a0c

File content as of revision 109:53918ba98306:

#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