Files
hexapod-robot/2011-firefly-mega-ssc32/firmware/2012-behaviours-wip/FireFly/SerD.h
T

88 lines
1.0 KiB
C++

// SerD.h
#ifndef SERD
#define SERD
class SerD
{
public:
//Coordinate system
int x;
int y;
int z;
//Angles
int o1;
int o2;
int o3;
//Timings
int t1;
int t2;
int t3;
//Input
SerD& operator() (int X, int Y, int Z)
{
x = X;
y = Y;
z = Z;
return *this;
}
SerD& operator= (SerD& R)
{
x = R.x;
y = R.y;
z = R.z;
return *this;
}
};
class DataObject
{
public:
SerD S0;
SerD S1;
SerD S2;
SerD S3;
SerD S4;
SerD S5;
DataObject& operator() (SerD s0, SerD s1, SerD s2, SerD s3, SerD s4, SerD s5)
{
S0 = s0;
S1 = s1;
S2 = s2;
S3 = s3;
S4 = s4;
S5 = s5;
}
DataObject& operator() ( int a1, int a2, int a3,
int b1, int b2, int b3,
int c1, int c2, int c3,
int d1, int d2, int d3,
int e1, int e2, int e3,
int f1, int f2, int f3)
{
S0(a1, a2, a3);
S1(b1, b2, b3);
S2(c1, c2, c3);
S3(d1, d2, d3);
S4(e1, e2, e3);
S5(f1, f2, f3);
}
};
#endif