Eurobot2012_Primary

Dependencies:   mbed Eurobot_2012_Primary

Eurobot_shared/ai/ai.h

Committer:
narshu
Date:
2012-04-28
Revision:
13:57ea4e520dbd
Parent:
9:377560539b74
Child:
15:acae5c0e9ca8

File content as of revision 13:57ea4e520dbd:

#ifndef AI_H
#define AI_H

#include "rtos.h"

class AI {
public:
AI();

Mutex targetlock;
Thread thr_AI;

unsigned int targetnumber;

struct Target {
    float x;
    float y;
    float theta;
    bool facing;
} target;

void settarget(float targetX, float targetY, float targetTheta, bool targetfacing = true);
void settarget(Target);
Target gettarget();

bool flag_terminate;// = false;

private:

void ai_thread ();
static void aithreadwrapper(void const *arg){ ((AI*)arg)->ai_thread(); }

};

#endif //AI_H