Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2216 → Rev 2217

/C-OSD/trunk/mk-data-structs.h
46,7 → 46,7
/*
* FC Debug Struct
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V0.88e/uart.h
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.12a/uart.h
*/
typedef struct {
unsigned char Status[2];
54,18 → 54,21
} __attribute__((packed)) str_DebugOut;
 
typedef struct {
unsigned char SWMajor;
unsigned char SWMinor;
unsigned char ProtoMajor;
unsigned char ProtoMinor;
unsigned char SWPatch;
unsigned char HardwareError[5];
unsigned char SWMajor;
unsigned char SWMinor;
unsigned char ProtoMajor;
unsigned char LabelTextCRC;
unsigned char SWPatch;
unsigned char HardwareError[2];
unsigned char HWMajor;
unsigned char BL_Firmware;
unsigned char Flags;
} __attribute__((packed)) str_VersionInfo;
 
/*
* NaviCtrl GPS Structs
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V0.20c/ubx.h
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.12a/gpspos.h
*/
typedef struct {
s32 Longitude; // in 1E-7 deg
77,11 → 80,12
#define INVALID 0x00
#define NEWDATA 0x01
#define PROCESSED 0x02
#define SIMULATION 0x03
 
/*
* NaviCtrl OSD Structs
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.06a/uart1.h
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.12a/uart1.h
*/
typedef struct {
u16 Distance; // distance to target in dm
113,7 → 117,7
u8 FCStatusFlags; // Flags from FC
u8 NCFlags; // Flags from NC
u8 Errorcode; // 0 --> okay
u8 OperatingRadius; // current operation radius around the Home Position in m
u8 WP_OperatingRadius; // current WP operation radius around the Home Position in m
s16 TopSpeed; // velocity in vertical direction in cm/s
u8 TargetHoldTime; // time in s to stay at the given target, counts down to 0 if target has been reached
u8 FCStatusFlags2; // StatusFlags2 (since version 5 added)
123,6 → 127,12
u16 UsedCapacity; // used capacity in mAh
} __attribute__((packed)) NaviData_t;
 
/*
* NaviCtrl & FCFlags Flags
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.12a/main.h
*/
// .NCFlags
#define NC_FLAG_FREE 0x01
#define NC_FLAG_PH 0x02
#define NC_FLAG_CH 0x04
132,11 → 142,7
#define NC_FLAG_MANUAL_CONTROL 0x40
#define NC_FLAG_GPS_OK 0x80
 
/*
* MikroKopter Flags
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V0.80d/fc.h
*/
// FC.StatusFlags
#define FCFLAG_MOTOR_RUN 0x01
#define FCFLAG_FLY 0x02
#define FCFLAG_CALIBRATE 0x04
146,34 → 152,49
#define FCFLAG_VARIO_TRIM_UP 0x40
#define FCFLAG_VARIO_TRIM_DOWN 0x80
 
// FC STATUS FLAGS2
// FC.StatusFlags2
#define FC_STATUS2_CAREFREE 0x01
#define FC_STATUS2_ALTITUDE_CONTROL 0x02
#define FC_STATUS2_RC_FAILSAVE_ACTIVE 0x04
#define FC_STATUS2_OUT1_ACTIVE 0x08
#define FC_STATUS2_OUT2_ACTIVE 0x10
#define FC_STATUS2_WAIT_FOR_TAKEOFF 0x20 // Motor Running, but still on the ground
 
#define DEFEKT_G_NICK 0x01
#define DEFEKT_G_ROLL 0x02
#define DEFEKT_G_GIER 0x04
#define DEFEKT_A_NICK 0x08
#define DEFEKT_A_ROLL 0x10
#define DEFEKT_A_Z 0x20
#define DEFEKT_PRESSURE 0x40
#define DEFEKT_CAREFREE_ERR 0x80
 
#define DEFEKT_I2C 0x01
#define DEFEKT_BL_MISSING 0x02
#define DEFEKT_SPI_RX_ERR 0x04
#define DEFEKT_PPM_ERR 0x08
#define DEFEKT_MIXER_ERR 0x10
// FC.StatusFlags3
#define FC_STATUS3_REDUNDANCE_AKTIVE 0x01
#define FC_STATUS3_BOAT 0x02
#define FC_STATUS3_REDUNDANCE_ERROR 0x04
#define FC_STATUS3_REDUNDANCE_TEST 0x08
 
// FC ERRORS FLAGS
#define FC_ERROR0_GYRO_NICK 0x01
#define FC_ERROR0_GYRO_ROLL 0x02
#define FC_ERROR0_GYRO_YAW 0x04
#define FC_ERROR0_ACC_NICK 0x08
#define FC_ERROR0_ACC_ROLL 0x10
#define FC_ERROR0_ACC_TOP 0x20
#define FC_ERROR0_PRESSURE 0x40
#define FC_ERROR0_CAREFREE 0x80
 
#define FC_ERROR1_I2C 0x01
#define FC_ERROR1_BL_MISSING 0x02
#define FC_ERROR1_SPI_RX 0x04
#define FC_ERROR1_PPM 0x08
#define FC_ERROR1_MIXER 0x10
#define FC_ERROR1_RES1 0x20
#define FC_ERROR1_RES2 0x40
#define FC_ERROR1_RES3 0x80
 
/*
* MikroKopter config struct
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.10a/eeprom.h
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.12a/eeprom.h
*/
 
#define EEPARAM_REVISION 105 // is count up, if paramater stucture has changed (compatibility)
#define EEPARAM_REVISION 106 // is count up, if paramater stucture has changed (compatibility)
#define EEMIXER_REVISION 1 // is count up, if mixer stucture has changed (compatibility)
 
 
typedef struct
{
unsigned char Revision;
294,6 → 315,8
unsigned char AutoPhotoAtitudes;
unsigned char SingleWpSpeed;
unsigned char LandingPulse;
unsigned char SingleWpControlChannel;
unsigned char MenuKeyChannel;
//------------------------------------------------
unsigned char BitConfig; // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
unsigned char ServoCompInvert; // // 0x01 = Nick, 0x02 = Roll, 0x04 = relative moving // WICHTIG!!! am Ende lassen