Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1917 | - | 1 | /***************************************************************************** |
2 | * Copyright (C) 2008 Thomas Kaiser, thomas@ft-fanpage.de * |
||
3 | * Copyright (C) 2009 Peter "woggle" Mack, mac@denich.net * |
||
4 | * Copyright (C) 2011 Christian "Cebra" Brandtner, brandtner@brandtner.net * |
||
5 | * Copyright (C) 2011 Harald Bongartz * |
||
6 | * * |
||
7 | * This program is free software; you can redistribute it and/or modify * |
||
8 | * it under the terms of the GNU General Public License as published by * |
||
9 | * the Free Software Foundation; either version 2 of the License. * |
||
10 | * * |
||
11 | * This program is distributed in the hope that it will be useful, * |
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
14 | * GNU General Public License for more details. * |
||
15 | * * |
||
16 | * You should have received a copy of the GNU General Public License * |
||
17 | * along with this program; if not, write to the * |
||
18 | * Free Software Foundation, Inc., * |
||
19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
||
20 | * * |
||
21 | * * |
||
22 | * Credits to: * |
||
23 | * Holger Buss & Ingo Busker from mikrokopter.de for the MK project + SVN * |
||
24 | * http://www.mikrokopter.de * |
||
25 | * Gregor "killagreg" Stobrawa for his version of the MK code * |
||
26 | * Thomas Kaiser "thkais" for the original project. See * |
||
27 | * http://www.ft-fanpage.de/mikrokopter/ * |
||
28 | * http://forum.mikrokopter.de/topic-4061-1.html * |
||
29 | * Claas Anders "CaScAdE" Rathje for providing the font and his C-OSD code * |
||
30 | * http://www.mylifesucks.de/oss/c-osd/ * |
||
31 | * Harald Bongartz "HaraldB" for providing his Ideas and Code for usibility* |
||
32 | *****************************************************************************/ |
||
33 | |||
34 | |||
35 | #ifndef _MK_DATA_STRUCTS_H |
||
36 | #define _MK_DATA_STRUCTS_H |
||
37 | |||
38 | #include "main.h" |
||
39 | |||
40 | //-------------------------------------------------------------------------------- |
||
41 | #ifdef MKVERSION088n |
||
42 | // FC Version 0.88m |
||
43 | #define EEProm_Version 91 // FC EEProm Revision / Struktur FC 0.87 |
||
44 | #define FC_Version "0.88n" //Softwareversion der FC |
||
45 | |||
46 | #define VERSION_MAJOR 0 |
||
47 | #define VERSION_MINOR 88 |
||
48 | #define VERSION_PATCH 12 |
||
49 | #define VERSION_SERIAL_MAJOR 11 // Serial Protocol |
||
50 | #define VERSION_SERIAL_MINOR 0 // Serial Protocol |
||
51 | #define NC_SPI_COMPATIBLE 51 // Navi-Kompatibilität |
||
52 | #warning "FC-Version 0.88n" |
||
53 | #endif |
||
54 | //-------------------------------------------------------------------------------- |
||
55 | #ifdef MKVERSION090b |
||
56 | // FC Version 0.89b |
||
57 | #define EEProm_Version 92 // FC EEProm Revision / Struktur FC 0.87 |
||
58 | #define FC_Version "0.90b" //Softwareversion der FC |
||
59 | |||
60 | #define VERSION_MAJOR 0 |
||
61 | #define VERSION_MINOR 89 |
||
62 | #define VERSION_PATCH 2 |
||
63 | #define VERSION_SERIAL_MAJOR 11 // Serial Protocol |
||
64 | #define VERSION_SERIAL_MINOR 0 // Serial Protocol |
||
65 | #define NC_SPI_COMPATIBLE 52 // Navi-Kompatibilität |
||
66 | #warning "FC-Version 0.90b" |
||
67 | #endif |
||
68 | //-------------------------------------------------------------------------------- |
||
69 | |||
70 | |||
71 | |||
72 | |||
73 | #define u8 uint8_t |
||
74 | #define s8 int8_t |
||
75 | #define u16 uint16_t |
||
76 | #define s16 int16_t |
||
77 | #define u32 uint32_t |
||
78 | #define s32 int32_t |
||
79 | |||
80 | #define NUMBER_OF_DEBUG_DATAS 32 |
||
81 | #define ANALOG_NAME_LENGTH 16 |
||
82 | |||
83 | // Version of supported serial protocol |
||
84 | #define MIN_VERSION 7 |
||
85 | #define MAX_VERSION 10 |
||
86 | |||
87 | // Setting index |
||
88 | #define SETTING_1 1 |
||
89 | #define SETTING_2 2 |
||
90 | #define SETTING_3 3 |
||
91 | #define SETTING_4 4 |
||
92 | #define SETTING_5 5 |
||
93 | #define SETTING_CURRENT 0xff |
||
94 | |||
95 | |||
96 | // MikroKopter defines |
||
97 | // taken from |
||
98 | // FC Software eeprom.h |
||
99 | // |
||
100 | |||
101 | //GlobalConfig3 aus FC/eeprom.h |
||
102 | #define CFG3_NO_SDCARD_NO_START 0x01 |
||
103 | #define CFG3_DPH_MAX_RADIUS 0x02 |
||
104 | #define CFG3_VARIO_FAILSAFE 0x04 |
||
105 | #define CFG3_MOTOR_SWITCH_MODE 0x08 //FC0.88L 7.5.12 |
||
106 | #define CFG3_NO_GPSFIX_NO_START 0x10 //FC0.88L 7.5.12 |
||
107 | #ifdef MKVERSION090b |
||
108 | #define CFG3_USE_NC_FOR_OUT1 0x20 |
||
109 | #define CFG3_SPEAK_ALL 0x40 |
||
110 | #endif |
||
111 | |||
112 | //GlobalConfig |
||
113 | #define CFG_HOEHENREGELUNG 0x01 |
||
114 | #define CFG_HOEHEN_SCHALTER 0x02 |
||
115 | #define CFG_HEADING_HOLD 0x04 |
||
116 | #define CFG_KOMPASS_AKTIV 0x08 |
||
117 | #define CFG_KOMPASS_FIX 0x10 |
||
118 | #define CFG_GPS_AKTIV 0x20 |
||
119 | #define CFG_ACHSENKOPPLUNG_AKTIV 0x40 |
||
120 | #define CFG_DREHRATEN_BEGRENZER 0x80 |
||
121 | |||
122 | //Bitconfig MAsk |
||
123 | #define CFG_LOOP_OBEN 0x01 |
||
124 | #define CFG_LOOP_UNTEN 0x02 |
||
125 | #define CFG_LOOP_LINKS 0x04 |
||
126 | #define CFG_LOOP_RECHTS 0x08 |
||
127 | #define CFG_MOTOR_BLINK1 0x10 |
||
128 | #define CFG_MOTOR_OFF_LED1 0x20 |
||
129 | #define CFG_MOTOR_OFF_LED2 0x40 |
||
130 | #define CFG_MOTOR_BLINK2 0x80 |
||
131 | |||
132 | // ServoCompInvert, FC0.89 |
||
133 | |||
134 | #define SVNick 0x01 |
||
135 | #define SVRoll 0x02 |
||
136 | #define SVRelMov 0x04 |
||
137 | |||
138 | // ExtraConfig |
||
139 | #define CFG2_HEIGHT_LIMIT 0x01 |
||
140 | #define CFG2_VARIO_BEEP 0x02 |
||
141 | #define CFG_SENSITIVE_RC 0x04 |
||
142 | #define CFG_3_3V_REFERENCE 0x08 |
||
143 | #define CFG_NO_RCOFF_BEEPING 0x10 |
||
144 | #define CFG_GPS_AID 0x20 |
||
145 | #define CFG_LEARNABLE_CAREFREE 0x40 |
||
146 | #define CFG_IGNORE_MAG_ERR_AT_STARTUP 0x80 |
||
147 | |||
148 | // bit mask for ParamSet.Config0 |
||
149 | #define CFG0_AIRPRESS_SENSOR 0x01 |
||
150 | #define CFG0_HEIGHT_SWITCH 0x02 |
||
151 | #define CFG0_HEADING_HOLD 0x04 |
||
152 | #define CFG0_COMPASS_ACTIVE 0x08 |
||
153 | #define CFG0_COMPASS_FIX 0x10 |
||
154 | #define CFG0_GPS_ACTIVE 0x20 |
||
155 | #define CFG0_AXIS_COUPLING_ACTIVE 0x40 |
||
156 | #define CFG0_ROTARY_RATE_LIMITER 0x80 |
||
157 | |||
158 | // defines for the receiver selection |
||
159 | #define RECEIVER_PPM 0 |
||
160 | #define RECEIVER_SPEKTRUM 1 |
||
161 | #define RECEIVER_SPEKTRUM_HI_RES 2 |
||
162 | #define RECEIVER_SPEKTRUM_LOW_RES 3 |
||
163 | #define RECEIVER_JETI 4 |
||
164 | #define RECEIVER_ACT_DSL 5 |
||
165 | #define RECEIVER_HOTT 6 |
||
166 | #define RECEIVER_SBUS 7 |
||
167 | #define RECEIVER_USER 8 |
||
168 | #define RECEIVER_UNKNOWN 0xFF |
||
169 | |||
170 | // MikroKopter Flags |
||
171 | // taken from |
||
172 | // http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=FlightCtrl&path=%2Ftags%2FV0.73d%2Ffc.h |
||
173 | //alt 0.86 |
||
174 | //#define FCFLAG_MOTOR_RUN 0x01 |
||
175 | //#define FCFLAG_FLY 0x02 |
||
176 | //#define FCFLAG_CALIBRATE 0x04 |
||
177 | //#define FCFLAG_START 0x08 |
||
178 | //#define FCFLAG_NOTLANDUNG 0x10 |
||
179 | //#define FCFLAG_LOWBAT 0x20 |
||
180 | //#define FCFLAG_SPI_RX_ERR 0x40 |
||
181 | //#define FCFLAG_I2CERR 0x80 |
||
182 | // FC_StatusFlags 0.88 |
||
183 | #define FC_STATUS_MOTOR_RUN 0x01 |
||
184 | #define FC_STATUS_FLY 0x02 |
||
185 | #define FC_STATUS_CALIBRATE 0x04 |
||
186 | #define FC_STATUS_START 0x08 |
||
187 | #define FC_STATUS_EMERGENCY_LANDING 0x10 |
||
188 | #define FC_STATUS_LOWBAT 0x20 |
||
189 | #define FC_STATUS_VARIO_TRIM_UP 0x40 |
||
190 | #define FC_STATUS_VARIO_TRIM_DOWN 0x80 |
||
191 | |||
192 | // FC_StatusFlags2 |
||
193 | #define FC_STATUS2_CAREFREE 0x01 |
||
194 | #define FC_STATUS2_ALTITUDE_CONTROL 0x02 |
||
195 | #define FC_STATUS2_RC_FAILSAVE_ACTIVE 0x04 |
||
196 | #define FC_STATUS2_OUT1_ACTIVE 0x08 |
||
197 | #define FC_STATUS2_OUT2_ACTIVE 0x10 |
||
198 | |||
199 | // NaviCtrl Flags |
||
200 | // taken from |
||
201 | // http://mikrocontroller.cco-ev.de/mikrowebsvn/filedetails.php?repname=NaviCtrl&path=%2Ftags%2FV0.15c%2Fuart1.h |
||
202 | // |
||
203 | #define NC_FLAG_FREE 0x01 |
||
204 | #define NC_FLAG_PH 0x02 |
||
205 | #define NC_FLAG_CH 0x04 |
||
206 | #define NC_FLAG_RANGE_LIMIT 0x08 |
||
207 | #define NC_FLAG_NOSERIALLINK 0x10 |
||
208 | #define NC_FLAG_TARGET_REACHED 0x20 |
||
209 | #define NC_FLAG_MANUAL_CONTROL 0x40 |
||
210 | #define NC_FLAG_GPS_OK 0x80 |
||
211 | |||
212 | typedef struct |
||
213 | { |
||
214 | unsigned char SWMajor; |
||
215 | unsigned char SWMinor; |
||
216 | unsigned char ProtoMajor; |
||
217 | unsigned char ProtoMinor; |
||
218 | unsigned char SWPatch; |
||
219 | unsigned char HardwareError[5]; |
||
220 | } __attribute__((packed)) Version_t; |
||
221 | |||
222 | |||
223 | // FC Debug Struct |
||
224 | // portions taken and adapted from |
||
225 | // http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=FlightCtrl&path=%2Ftags%2FV0.72p%2Fuart.h |
||
226 | // |
||
227 | typedef struct // 0.86 |
||
228 | { |
||
229 | uint8_t Digital[2]; |
||
230 | // NC: unsigned; FC: signed !!!! |
||
231 | int16_t Analog[32]; // Debugvalues |
||
232 | } __attribute__((packed)) DebugData_t; |
||
233 | |||
234 | //****************************************************************** |
||
235 | // uart1.h NC 0.87, zur Zeit hier nicht verwendet 28.01.2012 CB |
||
236 | |||
237 | #define AMPEL_FC 0x01 |
||
238 | #define AMPEL_BL 0x02 |
||
239 | #define AMPEL_NC 0x04 |
||
240 | #define AMPEL_COMPASS 0x08 |
||
241 | |||
242 | |||
243 | typedef struct //0.87 |
||
244 | { |
||
245 | u8 StatusGreen; |
||
246 | u8 StatusRed; |
||
247 | u16 Analog[32]; // Debugwerte |
||
248 | } __attribute__((packed)) DebugOut_t; |
||
249 | //****************************************************************** |
||
250 | |||
251 | |||
252 | // NaviCtrl OSD Structs |
||
253 | // portions taken and adapted from |
||
254 | // http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=NaviCtrl&path=%2Ftags%2FV0.15c%2Fuart1.h |
||
255 | // |
||
256 | |||
257 | typedef struct //NC uart1.h |
||
258 | { |
||
259 | s16 AngleNick; // in 0.1 deg |
||
260 | s16 AngleRoll; // in 0.1 deg |
||
261 | s16 Heading; // in 0.1 deg |
||
262 | u8 StickNick; |
||
263 | u8 StickRoll; |
||
264 | u8 StickYaw; |
||
265 | u8 StickGas; |
||
266 | u8 reserve[4]; |
||
267 | } __attribute__((packed)) Data3D_t; |
||
268 | |||
269 | |||
270 | |||
271 | typedef struct |
||
272 | { |
||
273 | s32 Longitude; // in 1E-7 deg |
||
274 | s32 Latitude; // in 1E-7 deg |
||
275 | s32 Altitude; // in mm |
||
276 | u8 Status; // validity of data |
||
277 | } __attribute__((packed)) GPS_Pos_t; |
||
278 | |||
279 | |||
280 | typedef struct |
||
281 | { |
||
282 | u16 Distance; // distance to target in cm |
||
283 | s16 Bearing; // course to target in deg |
||
284 | } __attribute__((packed)) GPS_PosDev_t; |
||
285 | |||
286 | |||
287 | // aus NC waypoint.h |
||
288 | typedef struct |
||
289 | { |
||
290 | GPS_Pos_t Position; // the gps position of the waypoint, see ubx.h for details |
||
291 | s16 Heading; // orientation, 0 no action, 1...360 fix heading, neg. = Index to POI in WP List |
||
292 | u8 ToleranceRadius; // in meters, if the MK is within that range around the target, then the next target is triggered |
||
293 | u8 HoldTime; // in seconds, if the was once in the tolerance area around a WP, this time defines the delay before the next WP is triggered |
||
294 | u8 Event_Flag; // future implementation |
||
295 | u8 Index; // to indentify different waypoints, workaround for bad communications PC <-> NC |
||
296 | u8 Type; // typeof Waypoint |
||
297 | u8 WP_EventChannelValue; // |
||
298 | u8 AltitudeRate; // rate to change the setpoint |
||
299 | u8 Speed; // rate to change the Position |
||
300 | u8 CamAngle; // Camera servo angle |
||
301 | u8 reserve[6]; // reserve |
||
302 | } __attribute__((packed)) Point_t; |
||
303 | |||
304 | |||
305 | // NaviCtrl struct |
||
306 | // taken from |
||
307 | // http://mikrocontroller.cco-ev.de/mikrowebsvn/filedetails.php?repname=NaviCtrl&path=%2Ftags%2FV0.15c%2Fuart1.h |
||
308 | // |
||
309 | #define NAVIDATA_VERSION 5 |
||
310 | |||
311 | typedef struct |
||
312 | { |
||
313 | u8 Version; // version of the data structure |
||
314 | GPS_Pos_t CurrentPosition; // see ubx.h for details |
||
315 | GPS_Pos_t TargetPosition; |
||
316 | GPS_PosDev_t TargetPositionDeviation; |
||
317 | GPS_Pos_t HomePosition; |
||
318 | GPS_PosDev_t HomePositionDeviation; |
||
319 | u8 WaypointIndex; // index of current waypoints running from 0 to WaypointNumber-1 |
||
320 | u8 WaypointNumber; // number of stored waypoints |
||
321 | u8 SatsInUse; // number of satellites used for position solution |
||
322 | s16 Altimeter; // hight according to air pressure |
||
323 | s16 Variometer; // climb(+) and sink(-) rate |
||
324 | u16 FlyingTime; // in seconds |
||
325 | u8 UBat; // Battery Voltage in 0.1 Volts |
||
326 | u16 GroundSpeed; // speed over ground in cm/s (2D) |
||
327 | s16 Heading; // current flight direction in ° as angle to north |
||
328 | s16 CompassHeading; // current compass value in |
||
329 | s8 AngleNick; // current Nick angle in 1 |
||
330 | s8 AngleRoll; // current Roll angle in 1 |
||
331 | u8 RC_Quality; // RC_Quality |
||
332 | u8 FCStatusFlags; // Flags from FC |
||
333 | u8 NCFlags; // Flags from NC |
||
334 | u8 Errorcode; // 0 --> okay |
||
335 | u8 OperatingRadius; // current operation radius around the Home Position in m |
||
336 | s16 TopSpeed; // velocity in vertical direction in cm/s |
||
337 | u8 TargetHoldTime; // time in s to stay at the given target, counts down to 0 if target has been reached |
||
338 | u8 FCStatusFlags2; // StatusFlags2 (since version 5 added) |
||
339 | s16 SetpointAltitude; // setpoint for altitude |
||
340 | u8 Gas; // for future use |
||
341 | u16 Current; // actual current in 0.1A steps |
||
342 | u16 UsedCapacity; // used capacity in mAh |
||
343 | } __attribute__((packed)) NaviData_t; |
||
344 | |||
345 | |||
346 | typedef struct |
||
347 | { |
||
348 | uint8_t Version; // the version of the BL (0 = old) |
||
349 | uint8_t SetPoint; // written by attitude controller |
||
350 | uint8_t SetPointLowerBits; // for higher Resolution of new BLs |
||
351 | uint8_t State; // 7 bit for I2C error counter, highest bit indicates if motor is present |
||
352 | uint8_t ReadMode; // select data to read |
||
353 | // the following bytes must be exactly in that order! |
||
354 | uint8_t Current; // in 0.1 A steps, read back from BL |
||
355 | uint8_t MaxPWM; // read back from BL -> is less than 255 if BL is in current limit, not running (250) or starting (40) |
||
356 | int8_t Temperature; // old BL-Ctrl will return a 255 here, the new version the temp. in �C |
||
357 | } __attribute__((packed)) MotorData_t; |
||
358 | |||
359 | typedef struct |
||
360 | { |
||
361 | uint8_t Revision; // must be BL_REVISION |
||
362 | uint8_t SetMask; // settings mask |
||
363 | uint8_t PwmScaling; // maximum value of control pwm, acts like a thrust limit |
||
364 | uint8_t CurrentLimit; // current limit in A |
||
365 | uint8_t TempLimit; // in �C |
||
366 | uint8_t CurrentScaling; // scaling factor for current measurement |
||
367 | uint8_t BitConfig; // see defines above |
||
368 | uint8_t crc; // checksum |
||
369 | } __attribute__((packed)) BLConfig_t; |
||
370 | |||
371 | |||
372 | // Aus FC eeprom.h |
||
373 | // |
||
374 | typedef struct |
||
375 | { |
||
376 | unsigned char Revision; |
||
377 | unsigned char Kanalbelegung[12]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3 |
||
378 | unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv |
||
379 | unsigned char Hoehe_MinGas; // Wert : 0-100 |
||
380 | unsigned char Luftdruck_D; // Wert : 0-250 |
||
381 | unsigned char MaxHoehe; // Wert : 0-32 |
||
382 | unsigned char Hoehe_P; // Wert : 0-32 |
||
383 | unsigned char Hoehe_Verstaerkung; // Wert : 0-50 |
||
384 | unsigned char Hoehe_ACC_Wirkung; // Wert : 0-250 |
||
385 | unsigned char Hoehe_HoverBand; // Wert : 0-250 |
||
386 | unsigned char Hoehe_GPS_Z; // Wert : 0-250 |
||
387 | unsigned char Hoehe_StickNeutralPoint;// Wert : 0-250 |
||
388 | unsigned char Stick_P; // Wert : 1-6 |
||
389 | unsigned char Stick_D; // Wert : 0-64 |
||
390 | unsigned char StickGier_P; // Wert : 1-20 |
||
391 | unsigned char Gas_Min; // Wert : 0-32 |
||
392 | unsigned char Gas_Max; // Wert : 33-250 |
||
393 | unsigned char GyroAccFaktor; // Wert : 1-64 |
||
394 | unsigned char KompassWirkung; // Wert : 0-32 |
||
395 | unsigned char Gyro_P; // Wert : 10-250 |
||
396 | unsigned char Gyro_I; // Wert : 0-250 |
||
397 | unsigned char Gyro_D; // Wert : 0-250 |
||
398 | unsigned char Gyro_Gier_P; // Wert : 10-250 |
||
399 | unsigned char Gyro_Gier_I; // Wert : 0-250 |
||
400 | unsigned char Gyro_Stability; // Wert : 0-16 |
||
401 | unsigned char UnterspannungsWarnung; // Wert : 0-250 |
||
402 | unsigned char NotGas; // Wert : 0-250 //Gaswert bei EmpÀngsverlust |
||
403 | unsigned char NotGasZeit; // Wert : 0-250 // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen |
||
404 | unsigned char Receiver; // 0= Summensignal, 1= Spektrum, 2 =Jeti, 3=ACT DSL, 4=ACT S3D |
||
405 | unsigned char I_Faktor; // Wert : 0-250 |
||
406 | unsigned char UserParam1; // Wert : 0-250 |
||
407 | unsigned char UserParam2; // Wert : 0-250 |
||
408 | unsigned char UserParam3; // Wert : 0-250 |
||
409 | unsigned char UserParam4; // Wert : 0-250 |
||
410 | unsigned char ServoNickControl; // Wert : 0-250 // Stellung des Servos |
||
411 | unsigned char ServoNickComp; // Wert : 0-250 // Einfluss Gyro/Servo |
||
412 | unsigned char ServoNickMin; // Wert : 0-250 // Anschlag |
||
413 | unsigned char ServoNickMax; // Wert : 0-250 // Anschlag |
||
414 | //--- Seit V0.75 |
||
415 | unsigned char ServoRollControl; // Wert : 0-250 // Stellung des Servos |
||
416 | unsigned char ServoRollComp; // Wert : 0-250 |
||
417 | unsigned char ServoRollMin; // Wert : 0-250 |
||
418 | unsigned char ServoRollMax; // Wert : 0-250 |
||
419 | //--- |
||
420 | unsigned char ServoNickRefresh; // Speed of the Servo |
||
421 | unsigned char ServoManualControlSpeed;// |
||
422 | unsigned char CamOrientation; // |
||
423 | unsigned char Servo3; // Value or mapping of the Servo Output |
||
424 | unsigned char Servo4; // Value or mapping of the Servo Output |
||
425 | unsigned char Servo5; // Value or mapping of the Servo Output |
||
426 | unsigned char LoopGasLimit; // Wert: 0-250 max. Gas wÀhrend Looping |
||
427 | unsigned char LoopThreshold; // Wert: 0-250 Schwelle fÃŒr Stickausschlag |
||
428 | unsigned char LoopHysterese; // Wert: 0-250 Hysterese fÃŒr Stickausschlag |
||
429 | unsigned char AchsKopplung1; // Wert: 0-250 Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung) |
||
430 | unsigned char AchsKopplung2; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden |
||
431 | unsigned char CouplingYawCorrection; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden |
||
432 | unsigned char WinkelUmschlagNick; // Wert: 0-250 180°-Punkt |
||
433 | unsigned char WinkelUmschlagRoll; // Wert: 0-250 180°-Punkt |
||
434 | unsigned char GyroAccAbgleich; // 1/k (Koppel_ACC_Wirkung) |
||
435 | unsigned char Driftkomp; |
||
436 | unsigned char DynamicStability; |
||
437 | unsigned char UserParam5; // Wert : 0-250 |
||
438 | unsigned char UserParam6; // Wert : 0-250 |
||
439 | unsigned char UserParam7; // Wert : 0-250 |
||
440 | unsigned char UserParam8; // Wert : 0-250 |
||
441 | //---Output --------------------------------------------- |
||
442 | unsigned char J16Bitmask; // for the J16 Output |
||
443 | unsigned char J16Timing; // for the J16 Output |
||
444 | unsigned char J17Bitmask; // for the J17 Output |
||
445 | unsigned char J17Timing; // for the J17 Output |
||
446 | // seit version V0.75c |
||
447 | unsigned char WARN_J16_Bitmask; // for the J16 Output |
||
448 | unsigned char WARN_J17_Bitmask; // for the J17 Output |
||
449 | //---NaviCtrl--------------------------------------------- |
||
450 | #ifdef MKVERSION090b |
||
451 | unsigned char NaviOut1Parameter; // for the J16 Output |
||
452 | #endif |
||
453 | unsigned char NaviGpsModeControl; // Parameters for the Naviboard |
||
454 | unsigned char NaviGpsGain; |
||
455 | unsigned char NaviGpsP; |
||
456 | unsigned char NaviGpsI; |
||
457 | unsigned char NaviGpsD; |
||
458 | unsigned char NaviGpsPLimit; |
||
459 | unsigned char NaviGpsILimit; |
||
460 | unsigned char NaviGpsDLimit; |
||
461 | unsigned char NaviGpsACC; |
||
462 | unsigned char NaviGpsMinSat; |
||
463 | unsigned char NaviStickThreshold; |
||
464 | unsigned char NaviWindCorrection; |
||
465 | unsigned char NaviAccCompensation; // New since 0.86 -> was: SpeedCompensation |
||
466 | unsigned char NaviOperatingRadius; |
||
467 | unsigned char NaviAngleLimitation; |
||
468 | unsigned char NaviPH_LoginTime; |
||
469 | //---Ext.Ctrl--------------------------------------------- |
||
470 | unsigned char ExternalControl; // for serial Control |
||
471 | //---CareFree--------------------------------------------- |
||
472 | unsigned char OrientationAngle; // Where is the front-direction? |
||
473 | unsigned char CareFreeModeControl; // switch for CareFree |
||
474 | unsigned char MotorSafetySwitch; |
||
475 | unsigned char MotorSmooth; |
||
476 | unsigned char ComingHomeAltitude; |
||
477 | unsigned char FailSafeTime; |
||
478 | unsigned char MaxAltitude; |
||
479 | unsigned char FailsafeChannel; // if the value of this channel is > 100, the MK reports "RC-Lost" |
||
480 | unsigned char ServoFilterNick; |
||
481 | unsigned char ServoFilterRoll; |
||
482 | //------------------------------------------------ |
||
483 | unsigned char BitConfig; // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
||
484 | unsigned char ServoCompInvert; // // 0x01 = Nick, 0x02 = Roll 0x04 = relative moving // WICHTIG!!! am Ende lassen |
||
485 | unsigned char ExtraConfig; // bitcodiert |
||
486 | unsigned char GlobalConfig3; // bitcodiert |
||
487 | char Name[12]; |
||
488 | unsigned char crc; // must be the last byte! // MUST BE THE LAST BYTE! |
||
489 | } __attribute__((packed)) mk_param_struct_t; |
||
490 | |||
491 | #endif |