Rev 2217 | Rev 2569 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2217 | Rev 2225 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /**************************************************************************** |
1 | /**************************************************************************** |
2 | * Copyright (C) 2009-2015 by Claas Anders "CaScAdE" Rathje * |
2 | * Copyright (C) 2009-2016 by Claas Anders "CaScAdE" Rathje * |
3 | * admiralcascade@gmail.com * |
3 | * admiralcascade@gmail.com * |
4 | * Project-URL: http://www.mylifesucks.de/oss/c-osd/ * |
4 | * Project-URL: http://www.mylifesucks.de/oss/c-osd/ * |
5 | * * |
5 | * * |
6 | * This program is free software; you can redistribute it and/or modify * |
6 | * This program is free software; you can redistribute it and/or modify * |
7 | * it under the terms of the GNU General Public License as published by * |
7 | * it under the terms of the GNU General Public License as published by * |
Line 93... | Line 93... | ||
93 | } __attribute__((packed)) GPS_PosDev_t; |
93 | } __attribute__((packed)) GPS_PosDev_t; |
Line 94... | Line 94... | ||
94 | 94 | ||
Line 95... | Line 95... | ||
95 | #define NAVIDATA_VERSION 5 |
95 | #define NAVIDATA_VERSION 5 |
96 | 96 | ||
97 | typedef struct { |
97 | typedef struct { |
98 | u8 Version; // version of the data structure |
98 | u8 Version; // version of the data structure |
99 | GPS_Pos_t CurrentPosition; // see gpspos.h for details |
99 | GPS_Pos_t CurrentPosition; // see gpspos.h for details |
100 | GPS_Pos_t TargetPosition; |
100 | GPS_Pos_t TargetPosition; |
101 | GPS_PosDev_t TargetPositionDeviation; |
101 | GPS_PosDev_t TargetPositionDeviation; |
102 | GPS_Pos_t HomePosition; |
102 | GPS_Pos_t HomePosition; |
103 | GPS_PosDev_t HomePositionDeviation; |
103 | GPS_PosDev_t HomePositionDeviation; |
104 | u8 WaypointIndex; // index of current waypoints running from 0 to WaypointNumber-1 |
104 | u8 WaypointIndex; // index of current waypoints running from 0 to WaypointNumber-1 |
105 | u8 WaypointNumber; // number of stored waypoints |
105 | u8 WaypointNumber; // number of stored waypoints |
106 | u8 SatsInUse; // number of satellites used for position solution |
106 | u8 SatsInUse; // number of satellites used for position solution |
107 | s16 Altimeter; // hight according to air pressure |
107 | s16 Altimeter_5cm; // hight according to air pressure |
108 | s16 Variometer; // climb(+) and sink(-) rate |
108 | s16 Variometer; // climb(+) and sink(-) rate |
109 | u16 FlyingTime; // in seconds |
109 | u16 FlyingTime; // in seconds |
110 | u8 UBat; // Battery Voltage in 0.1 Volts |
110 | u8 UBat; // Battery Voltage in 0.1 Volts |
111 | u16 GroundSpeed; // speed over ground in cm/s (2D) |
111 | u16 GroundSpeed; // speed over ground in cm/s (2D) |
112 | s16 Heading; // current flight direction in ° as angle to north |
112 | s16 Heading; // current flight direction in ° as angle to north |
113 | s16 CompassHeading; // current compass value in ° |
113 | s16 CompassHeading; // current compass value in ° |
114 | s8 AngleNick; // current Nick angle in 1° |
114 | s8 AngleNick; // current Nick angle in 1° |
115 | s8 AngleRoll; // current Rick angle in 1° |
115 | s8 AngleRoll; // current Rick angle in 1° |
116 | u8 RC_Quality; // RC_Quality |
116 | u8 RC_Quality; // RC_Quality |
117 | u8 FCStatusFlags; // Flags from FC |
117 | u8 FCStatusFlags; // Flags from FC |
118 | u8 NCFlags; // Flags from NC |
118 | u8 NCFlags; // Flags from NC |
119 | u8 Errorcode; // 0 --> okay |
119 | u8 Errorcode; // 0 --> okay |
120 | u8 WP_OperatingRadius; // current WP operation radius around the Home Position in m |
120 | u8 WP_OperatingRadius; // current WP operation radius around the Home Position in m |
121 | s16 TopSpeed; // velocity in vertical direction in cm/s |
121 | s16 TopSpeed; // velocity in vertical direction in cm/s |
122 | u8 TargetHoldTime; // time in s to stay at the given target, counts down to 0 if target has been reached |
122 | u8 TargetHoldTime; // time in s to stay at the given target, counts down to 0 if target has been reached |
123 | u8 FCStatusFlags2; // StatusFlags2 (since version 5 added) |
123 | u8 FCStatusFlags2; // StatusFlags2 (since version 5 added) |
124 | s16 SetpointAltitude; // setpoint for altitude |
124 | s16 SetpointAltitude; // setpoint for altitude |
125 | u8 Gas; // for future use |
125 | u8 Gas; // for future use |
126 | u16 Current; // actual current in 0.1A steps |
126 | u16 Current; // actual current in 0.1A steps |
Line 127... | Line 127... | ||
127 | u16 UsedCapacity; // used capacity in mAh |
127 | u16 UsedCapacity; // used capacity in mAh |
128 | } __attribute__((packed)) NaviData_t; |
128 | } __attribute__((packed)) NaviData_t; |
129 | 129 | ||
Line 157... | Line 157... | ||
157 | #define FC_STATUS2_ALTITUDE_CONTROL 0x02 |
157 | #define FC_STATUS2_ALTITUDE_CONTROL 0x02 |
158 | #define FC_STATUS2_RC_FAILSAVE_ACTIVE 0x04 |
158 | #define FC_STATUS2_RC_FAILSAVE_ACTIVE 0x04 |
159 | #define FC_STATUS2_OUT1_ACTIVE 0x08 |
159 | #define FC_STATUS2_OUT1_ACTIVE 0x08 |
160 | #define FC_STATUS2_OUT2_ACTIVE 0x10 |
160 | #define FC_STATUS2_OUT2_ACTIVE 0x10 |
161 | #define FC_STATUS2_WAIT_FOR_TAKEOFF 0x20 // Motor Running, but still on the ground |
161 | #define FC_STATUS2_WAIT_FOR_TAKEOFF 0x20 // Motor Running, but still on the ground |
162 | - | ||
- | 162 | #define FC_STATUS2_AUTO_STARTING 0x40 |
|
- | 163 | #define FC_STATUS2_AUTO_LANDING 0x80 |
|
Line 163... | Line 164... | ||
163 | 164 | ||
164 | // FC.StatusFlags3 |
165 | // FC.StatusFlags3 |
165 | #define FC_STATUS3_REDUNDANCE_AKTIVE 0x01 |
166 | #define FC_STATUS3_REDUNDANCE_AKTIVE 0x01 |
166 | #define FC_STATUS3_BOAT 0x02 |
167 | #define FC_STATUS3_BOAT 0x02 |
167 | #define FC_STATUS3_REDUNDANCE_ERROR 0x04 |
168 | #define FC_STATUS3_REDUNDANCE_ERROR 0x04 |
- | 169 | #define FC_STATUS3_REDUNDANCE_TEST 0x08 |
|
- | 170 | #define FC_STATUS3_NOT_CALIBRATED 0x10 |
|
Line 168... | Line 171... | ||
168 | #define FC_STATUS3_REDUNDANCE_TEST 0x08 |
171 | #define FC_STATUS3_MOTORS_STOPPED_BY_RC 0x20 |
169 | 172 | ||
170 | // FC ERRORS FLAGS |
173 | // FC ERRORS FLAGS |
171 | #define FC_ERROR0_GYRO_NICK 0x01 |
174 | #define FC_ERROR0_GYRO_NICK 0x01 |
Line 190... | Line 193... | ||
190 | * MikroKopter config struct |
193 | * MikroKopter config struct |
191 | * portions taken and adapted from |
194 | * portions taken and adapted from |
192 | * http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.12a/eeprom.h |
195 | * http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.12a/eeprom.h |
193 | */ |
196 | */ |
Line 194... | Line 197... | ||
194 | 197 | ||
195 | #define EEPARAM_REVISION 106 // is count up, if paramater stucture has changed (compatibility) |
198 | #define EEPARAM_REVISION 108 // is count up, if paramater stucture has changed (compatibility) |
Line 196... | Line 199... | ||
196 | #define EEMIXER_REVISION 1 // is count up, if mixer stucture has changed (compatibility) |
199 | #define EEMIXER_REVISION 1 // is count up, if mixer stucture has changed (compatibility) |
197 | 200 | ||
198 | typedef struct |
201 | typedef struct |
199 | { |
202 | { |
Line 315... | Line 318... | ||
315 | unsigned char AutoPhotoAtitudes; |
318 | unsigned char AutoPhotoAtitudes; |
316 | unsigned char SingleWpSpeed; |
319 | unsigned char SingleWpSpeed; |
317 | unsigned char LandingPulse; |
320 | unsigned char LandingPulse; |
318 | unsigned char SingleWpControlChannel; |
321 | unsigned char SingleWpControlChannel; |
319 | unsigned char MenuKeyChannel; |
322 | unsigned char MenuKeyChannel; |
- | 323 | unsigned char CamCtrlModeChannel; |
|
- | 324 | unsigned char CamCtrlZoomChannel; |
|
- | 325 | unsigned char reserved[32]; // for later use |
|
320 | //------------------------------------------------ |
326 | //------------------------------------------------ |
321 | unsigned char BitConfig; // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
327 | unsigned char BitConfig; // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
322 | unsigned char ServoCompInvert; // // 0x01 = Nick, 0x02 = Roll, 0x04 = relative moving // WICHTIG!!! am Ende lassen |
328 | unsigned char ServoCompInvert; // // 0x01 = Nick, 0x02 = Roll, 0x04 = relative moving // WICHTIG!!! am Ende lassen |
323 | unsigned char ExtraConfig; // bitcodiert |
329 | unsigned char ExtraConfig; // bitcodiert |
324 | unsigned char GlobalConfig3; // bitcodiert |
330 | unsigned char GlobalConfig3; // bitcodiert |
325 | char Name[12]; |
331 | char Name[12]; |
326 | unsigned char crc; // must be the last byte! |
332 | unsigned char crc; // must be the last byte! |
327 | } paramset_t; // 134 bytes (V1.06) |
333 | } paramset_t; // since 2.14 -> size is always 179 Bytes |
Line 328... | Line 334... | ||
328 | 334 | ||
329 | 335 | ||
330 | typedef struct { |
336 | typedef struct { |