Files
hexapod-robot/2011-firefly-mega-ssc32/firmware/2012-ir-radar-gps/hexapodV3/Data.h
T
mangavalk f690f307c1 FireFly 2012 v3: restructured into Data/Converter/IK/Servos classes, IR remote, ultrasonic radar head
From 'hexapodV3 28-april-2012-Backup.rar'. Oud/ is the 2011 code it was based on.
2012-04-28 16:42:59 +02:00

71 lines
831 B
C

//Data.h Data Structure
#ifndef DATA
#define DATA
#include "Arduino.h"
#include "hexapod.h"
#include "Def.h"
#include "SerD.h"
// LAYOUT
// _U_
// 0==/ \==3
// >***<
// 1===|---|===4
// >***<
// 2==\___/==5
struct Data
{
//MAIN
// Pointers to classes
hexapod FireFly;
//Watchdog
boolean Send;
double LastSendTime;
int WalkTime;
int HeadTime; //100
//Converter
SerD ServoData[6];
float HeadAngle;
int ReadyToSend;
//IK
int HeadPosition;
boolean ReadyToConvert;
float l3;
float s;
//Startup VARIABLES
Data()
{
LastSendTime = 0;
HeadAngle = 0;
HeadTime = 100;
ServoData[0](5, 3, 8);
ServoData[1](8, 3, 0);
ServoData[2](5, 3, -8);
ServoData[3](5, 3, 8);
ServoData[4](8, 3, 0);
ServoData[5](5, 3, -8);
}
};
#endif