Rev 440 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#ifndef COPTER_H
#define COPTER_H
#include <string>
using namespace std;
/**
* This file contains informations and configurations from the Mikrokopter
*/
// version information for the serial connection
#define VERSION_SERIAL_MAJOR 10
#define VERSION_SERIAL_MINOR 0
// Basis-Adresses for different hardware components
#define ADDRESS_ALL 0
#define ADDRESS_FC 1
#define ADDRESS_NC 2
#define ADDRESS_MK3MAG 3
//maximum amount of motors
#define MAX_MOTORS 12
// settings ID
#define SETTINGS_ID 2
static const string HardwareType[] = {"Default", "FlightCtrl", "NaviCtrl", "MK3Mag"};
static const int MaxTickerEvents = 5;
static const int MaxAnalog = 32;
static const int MaxPlot = 50000;
static const int MaxNaviPos = 2000;
struct sMotorData
{
int mixer_gas[MAX_MOTORS];
int mixer_nick[MAX_MOTORS];
int mixer_roll[MAX_MOTORS];
int mixer_yaw[MAX_MOTORS];
int desired_speed[MAX_MOTORS];
string mixer_name;
int mixer_version;
};
struct sMode
{
int id;
int version_major;
int version_minor;
int version_patch;
int version_serial_major;
int version_serial_minor;
string hardware;
string version;
};
struct sGPS_Pos
{
long Longitude;
long Latitude;
long Altitude;
};
struct sNaviData
{
sGPS_Pos Current;
sGPS_Pos Target;
sGPS_Pos Home;
long Longitude;
long Latitude;
long Altitude;
};
struct sWayPoint
{
double Longitude;
double Latitude;
double Altitude;
int Time;
};
/**
* The KopterData class represents the current state of the MikroKopter.
* It containes all data that was sent from the Mikrokopter
*/
class KopterData {
public:
sMode mode;
sNaviData navi;
sMotorData motor;
int analogData[MaxAnalog];
// current LCD page
int lcd_cur;
//max count of LCD pages
int lcd_max;
};
#endif