Eurobot2012_Secondary

Fork of Eurobot_2012_Secondary by Shuto Naruse

Eurobot_shared/ai/ai.h

Committer:
narshu
Date:
2012-10-17
Revision:
1:cc2a9eb0bd55

File content as of revision 1:cc2a9eb0bd55:

#ifndef AI_H
#define AI_H

#include "rtos.h"
//#include "Kalman.h"

class AI {
public:
AI();

Mutex targetlock;
Thread thr_AI;

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

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

bool flag_terminate;// = false;
bool flag_motorStop; // = true;
bool flag_manOverride; // = false;

private:

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

};

#endif //AI_H