Delta Robot example

Dependencies:   BufferedSerial Eigen

Fork of TCPSocket_Example by mbed_example

comms.h

Committer:
je310
Date:
2018-10-05
Revision:
3:10fa3102c2d7
Child:
4:778bc352c47f

File content as of revision 3:10fa3102c2d7:

#ifndef COMMS_H
#define COMMS_H

struct OdriveCMD{
    float position;
    float velocity;
    float torque;
    float maxCurrent;
    int mode;
};
struct ServoCMD{
    float angle;
    float atTime;
};

struct toRobot{
    OdriveCMD motor1;
    OdriveCMD motor2;
    OdriveCMD motor3;
    ServoCMD servo1;
    ServoCMD servo2;
    long time;
    int count;
};

struct OdriveINFO{
    float speed;
    int position;
    float busVoltage;
    float setCurrent;
    float measuredCurrent;
};

struct vectorThree{
    float x;
    float y;
    float z;
};

struct imuINFO{
    vectorThree accel;
    vectorThree gyro;
};

struct gunINFO{
    bool buttons[32];
};

struct fromRobot{
    OdriveINFO motor1;
    OdriveINFO motor2;
    OdriveINFO motor3;
    imuINFO imu;
    gunINFO gun;
    long time;
    int count;
};


#endif // COMMS_H