Files
hexapod-robot/2011-firefly-mega-ssc32/firmware/2012-behaviours-wip/FireFly/Gedrags_Classen.cpp
T
mangavalk 6e50819e01 FireFly 2012: behaviour rewrite now uses the hexapod library
From Electronics\Hexapod\Arduino sketches 2011-2012\FireFly. Data.h, Def.h and SerD.h moved into the library.
2012-07-23 17:56:33 +02:00

56 lines
1.2 KiB
C++

//Gedrags classen,
#ifndef GCC
#define GCC
#include "hexapod.h"
// LAYOUT
// _U_
// 0==/ \==3
// >***<
// 1===|---|===4
// >***<
// 2==\___/==5
class WalkForward //Direction
{
private:
DataObject LoopPatroon[8];
DataObject HuidigePositie;
hexapod *FireFly;
//Startup VARIABLES
void init(hexapod *pntr)
{
LoopPatroon[0](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800);
LoopPatroon[1](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800);
LoopPatroon[2](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800);
LoopPatroon[3](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800);
LoopPatroon[4](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800);
LoopPatroon[5](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800);
LoopPatroon[6](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800);
LoopPatroon[7](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800);
FireFly = pntr;
}
void send(DataObject pntr)
{
FireFly->CoreSend(&pntr);
}
public:
void Run()
{
//Start runnning code until exit or expection raises.
send(LoopPatroon[0]);//Test
}
};
#endif