Subversion Repositories Projects

Rev

Rev 2039 | Rev 2075 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2039 Rev 2043
Line 79... Line 79...
79
#define PROCESSED       0x02
79
#define PROCESSED       0x02
Line 80... Line 80...
80
 
80
 
81
/*
81
/*
82
 * NaviCtrl OSD Structs
82
 * NaviCtrl OSD Structs
83
 * portions taken and adapted from
83
 * portions taken and adapted from
84
 * http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.04a/uart1.h
84
 * http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.06a/uart1.h
85
 */
85
 */
86
typedef struct {
86
typedef struct {
87
    u16 Distance; // distance to target in dm
87
    u16 Distance; // distance to target in dm
88
    s16 Bearing; // course to target in deg
88
    s16 Bearing; // course to target in deg
-
 
89
} __attribute__((packed)) GPS_PosDev_t;
89
} __attribute__((packed)) GPS_PosDev_t;
90
 
Line 90... Line 91...
90
#define NAVIDATA_VERSION 5
91
#define NAVIDATA_VERSION 5
91
 
92
 
92
typedef struct {
93
typedef struct {
Line 165... Line 166...
165
#define DEFEKT_MIXER_ERR    0x10
166
#define DEFEKT_MIXER_ERR    0x10
Line 166... Line 167...
166
 
167
 
167
/*
168
/*
168
 * MikroKopter config struct
169
 * MikroKopter config struct
169
 * portions taken and adapted from
170
 * portions taken and adapted from
170
 * http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.04a/eeprom.h
171
 * http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.06a/eeprom.h
Line 171... Line 172...
171
 */
172
 */
Line -... Line 173...
-
 
173
 
172
 
174
#define EEPARAM_REVISION        102 // is count up, if paramater stucture has changed (compatibility)
-
 
175
 
173
#define EEPARAM_REVISION         98 // is count up, if paramater stucture has changed (compatibility)
176
 
174
 
177
typedef struct
175
typedef struct {
178
{
176
    unsigned char Revision;
179
        unsigned char Revision;
177
    unsigned char Kanalbelegung[12]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3
180
        unsigned char Kanalbelegung[12];       // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3
178
    unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv
181
        unsigned char GlobalConfig;           // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv
179
    unsigned char Hoehe_MinGas; // Wert : 0-100
182
        unsigned char Hoehe_MinGas;           // Wert : 0-100
180
    unsigned char Luftdruck_D; // Wert : 0-250
183
        unsigned char Luftdruck_D;            // Wert : 0-250
181
    unsigned char HoeheChannel; // Wert : 0-32
184
        unsigned char HoeheChannel;           // Wert : 0-32
182
    unsigned char Hoehe_P; // Wert : 0-32
185
        unsigned char Hoehe_P;                // Wert : 0-32
183
    unsigned char Hoehe_Verstaerkung; // Wert : 0-50
186
        unsigned char Hoehe_Verstaerkung;     // Wert : 0-50
184
    unsigned char Hoehe_ACC_Wirkung; // Wert : 0-250
187
        unsigned char Hoehe_ACC_Wirkung;      // Wert : 0-250
185
    unsigned char Hoehe_HoverBand; // Wert : 0-250
188
        unsigned char Hoehe_HoverBand;        // Wert : 0-250
186
    unsigned char Hoehe_GPS_Z; // Wert : 0-250
189
        unsigned char Hoehe_GPS_Z;            // Wert : 0-250
187
    unsigned char Hoehe_StickNeutralPoint; // Wert : 0-250
190
        unsigned char Hoehe_StickNeutralPoint;// Wert : 0-250
188
    unsigned char Stick_P; // Wert : 1-6
191
        unsigned char Stick_P;                // Wert : 1-6
189
    unsigned char Stick_D; // Wert : 0-64
192
        unsigned char Stick_D;                // Wert : 0-64
190
    unsigned char StickGier_P; // Wert : 1-20
193
        unsigned char StickGier_P;            // Wert : 1-20
191
    unsigned char Gas_Min; // Wert : 0-32
194
        unsigned char Gas_Min;                // Wert : 0-32
192
    unsigned char Gas_Max; // Wert : 33-250
195
        unsigned char Gas_Max;                // Wert : 33-250
193
    unsigned char GyroAccFaktor; // Wert : 1-64
196
        unsigned char GyroAccFaktor;          // Wert : 1-64
194
    unsigned char KompassWirkung; // Wert : 0-32
197
        unsigned char KompassWirkung;         // Wert : 0-32
195
    unsigned char Gyro_P; // Wert : 10-250
198
        unsigned char Gyro_P;                 // Wert : 10-250
196
    unsigned char Gyro_I; // Wert : 0-250
199
        unsigned char Gyro_I;                 // Wert : 0-250
197
    unsigned char Gyro_D; // Wert : 0-250
200
        unsigned char Gyro_D;                 // Wert : 0-250
198
    unsigned char Gyro_Gier_P; // Wert : 10-250
201
        unsigned char Gyro_Gier_P;            // Wert : 10-250
199
    unsigned char Gyro_Gier_I; // Wert : 0-250
202
        unsigned char Gyro_Gier_I;            // Wert : 0-250
200
    unsigned char Gyro_Stability; // Wert : 0-16
203
        unsigned char Gyro_Stability;         // Wert : 0-16
201
    unsigned char UnterspannungsWarnung; // Wert : 0-250
204
        unsigned char UnterspannungsWarnung;  // Wert : 0-250
202
    unsigned char NotGas; // Wert : 0-250     //Gaswert bei Empängsverlust
205
        unsigned char NotGas;                 // Wert : 0-250     //Gaswert bei Empängsverlust
203
    unsigned char NotGasZeit; // Wert : 0-250     // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen
206
        unsigned char NotGasZeit;             // Wert : 0-250     // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen
204
    unsigned char Receiver; // 0= Summensignal, 1= Spektrum, 2 =Jeti, 3=ACT DSL, 4=ACT S3D
207
        unsigned char Receiver;                   // 0= Summensignal, 1= Spektrum, 2 =Jeti, 3=ACT DSL, 4=ACT S3D
205
    unsigned char I_Faktor; // Wert : 0-250
208
        unsigned char I_Faktor;               // Wert : 0-250
206
    unsigned char UserParam1; // Wert : 0-250
209
        unsigned char UserParam1;             // Wert : 0-250
207
    unsigned char UserParam2; // Wert : 0-250
210
        unsigned char UserParam2;             // Wert : 0-250
208
    unsigned char UserParam3; // Wert : 0-250
211
        unsigned char UserParam3;             // Wert : 0-250
209
    unsigned char UserParam4; // Wert : 0-250
212
        unsigned char UserParam4;             // Wert : 0-250
210
    unsigned char ServoNickControl; // Wert : 0-250     // Stellung des Servos
213
        unsigned char ServoNickControl;       // Wert : 0-250     // Stellung des Servos
211
    unsigned char ServoNickComp; // Wert : 0-250     // Einfluss Gyro/Servo
214
        unsigned char ServoNickComp;          // Wert : 0-250     // Einfluss Gyro/Servo
212
    unsigned char ServoNickMin; // Wert : 0-250     // Anschlag
215
        unsigned char ServoNickMin;           // Wert : 0-250     // Anschlag
213
    unsigned char ServoNickMax; // Wert : 0-250     // Anschlag
216
        unsigned char ServoNickMax;           // Wert : 0-250     // Anschlag
214
    //--- Seit V0.75
217
        //--- Seit V0.75
215
    unsigned char ServoRollControl; // Wert : 0-250     // Stellung des Servos
218
        unsigned char ServoRollControl;       // Wert : 0-250     // Stellung des Servos
216
    unsigned char ServoRollComp; // Wert : 0-250
219
        unsigned char ServoRollComp;          // Wert : 0-250
217
    unsigned char ServoRollMin; // Wert : 0-250
220
        unsigned char ServoRollMin;           // Wert : 0-250
218
    unsigned char ServoRollMax; // Wert : 0-250
221
        unsigned char ServoRollMax;           // Wert : 0-250
219
    //---
222
        //---
220
    unsigned char ServoNickRefresh; // Speed of the Servo
223
        unsigned char ServoNickRefresh;       // Speed of the Servo
221
    unsigned char ServoManualControlSpeed; //
224
    unsigned char ServoManualControlSpeed;//
222
    unsigned char CamOrientation; //
225
    unsigned char CamOrientation;         //
223
    unsigned char Servo3; // Value or mapping of the Servo Output
226
        unsigned char Servo3;                    // Value or mapping of the Servo Output
224
    unsigned char Servo4; // Value or mapping of the Servo Output
227
        unsigned char Servo4;                            // Value or mapping of the Servo Output
225
    unsigned char Servo5; // Value or mapping of the Servo Output
228
        unsigned char Servo5;                            // Value or mapping of the Servo Output
226
    unsigned char LoopGasLimit; // Wert: 0-250  max. Gas während Looping
229
        unsigned char LoopGasLimit;           // Wert: 0-250  max. Gas während Looping
227
    unsigned char LoopThreshold; // Wert: 0-250  Schwelle für Stickausschlag
230
        unsigned char LoopThreshold;          // Wert: 0-250  Schwelle für Stickausschlag
228
    unsigned char LoopHysterese; // Wert: 0-250  Hysterese für Stickausschlag
231
        unsigned char LoopHysterese;          // Wert: 0-250  Hysterese für Stickausschlag
229
    unsigned char AchsKopplung1; // Wert: 0-250  Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung)
232
        unsigned char AchsKopplung1;          // Wert: 0-250  Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung)
230
    unsigned char AchsKopplung2; // Wert: 0-250  Faktor, mit dem Nick und Roll verkoppelt werden
233
        unsigned char AchsKopplung2;          // Wert: 0-250  Faktor, mit dem Nick und Roll verkoppelt werden
231
    unsigned char CouplingYawCorrection; // Wert: 0-250  Faktor, mit dem Nick und Roll verkoppelt werden
234
        unsigned char CouplingYawCorrection;  // Wert: 0-250  Faktor, mit dem Nick und Roll verkoppelt werden
232
    unsigned char WinkelUmschlagNick; // Wert: 0-250  180°-Punkt
235
        unsigned char WinkelUmschlagNick;     // Wert: 0-250  180°-Punkt
233
    unsigned char WinkelUmschlagRoll; // Wert: 0-250  180°-Punkt
236
        unsigned char WinkelUmschlagRoll;     // Wert: 0-250  180°-Punkt
234
    unsigned char GyroAccAbgleich; // 1/k  (Koppel_ACC_Wirkung)
237
        unsigned char GyroAccAbgleich;        // 1/k  (Koppel_ACC_Wirkung)
235
    unsigned char Driftkomp;
238
        unsigned char Driftkomp;
236
    unsigned char DynamicStability;
239
        unsigned char DynamicStability;
237
    unsigned char UserParam5; // Wert : 0-250
240
        unsigned char UserParam5;             // Wert : 0-250
238
    unsigned char UserParam6; // Wert : 0-250
241
        unsigned char UserParam6;             // Wert : 0-250
239
    unsigned char UserParam7; // Wert : 0-250
242
        unsigned char UserParam7;             // Wert : 0-250
240
    unsigned char UserParam8; // Wert : 0-250
243
        unsigned char UserParam8;             // Wert : 0-250
241
    //---Output ---------------------------------------------
244
        //---Output ---------------------------------------------
242
    unsigned char J16Bitmask; // for the J16 Output
245
        unsigned char J16Bitmask;             // for the J16 Output
243
    unsigned char J16Timing; // for the J16 Output
246
        unsigned char J16Timing;              // for the J16 Output
244
    unsigned char J17Bitmask; // for the J17 Output
247
        unsigned char J17Bitmask;             // for the J17 Output
245
    unsigned char J17Timing; // for the J17 Output
248
        unsigned char J17Timing;              // for the J17 Output
246
    // seit version V0.75c
249
        // seit version V0.75c
247
    unsigned char WARN_J16_Bitmask; // for the J16 Output
250
        unsigned char WARN_J16_Bitmask;       // for the J16 Output
248
    unsigned char WARN_J17_Bitmask; // for the J17 Output
251
        unsigned char WARN_J17_Bitmask;       // for the J17 Output
249
    //---NaviCtrl---------------------------------------------
252
        //---NaviCtrl---------------------------------------------
250
    unsigned char NaviOut1Parameter; // for the J16 Output
253
        unsigned char AutoPhotoDistance;      // Auto Photo
251
    unsigned char NaviGpsModeChannel; // Parameters for the Naviboard
254
        unsigned char NaviGpsModeChannel;     // Parameters for the Naviboard
252
    unsigned char NaviGpsGain;
255
        unsigned char NaviGpsGain;
253
    unsigned char NaviGpsP;
256
        unsigned char NaviGpsP;
254
    unsigned char NaviGpsI;
257
        unsigned char NaviGpsI;
255
    unsigned char NaviGpsD;
258
        unsigned char NaviGpsD;
256
    unsigned char NaviGpsPLimit;
259
        unsigned char NaviGpsPLimit;
257
    unsigned char NaviGpsILimit;
260
        unsigned char NaviGpsILimit;
258
    unsigned char NaviGpsDLimit;
261
        unsigned char NaviGpsDLimit;
259
    unsigned char NaviGpsA;
262
        unsigned char NaviGpsA;
260
    unsigned char NaviGpsMinSat;
263
        unsigned char NaviGpsMinSat;
261
    unsigned char NaviStickThreshold;
264
        unsigned char NaviStickThreshold;
262
    unsigned char NaviWindCorrection;
265
        unsigned char NaviWindCorrection;
263
    unsigned char NaviAccCompensation; // New since 0.86 -> was: SpeedCompensation
266
        unsigned char NaviAccCompensation;    // New since 0.86 -> was: SpeedCompensation
-
 
267
        unsigned char NaviMaxFlyingRange;     // in 10m
264
    unsigned char NaviOperatingRadius;
268
        unsigned char NaviAngleLimitation;
265
    unsigned char NaviAngleLimitation;
269
        unsigned char NaviPH_LoginTime;
266
    unsigned char NaviPH_LoginTime;
270
        unsigned char NaviDescendRange;
267
    //---Ext.Ctrl---------------------------------------------
271
        //---Ext.Ctrl---------------------------------------------
268
    unsigned char ExternalControl; // for serial Control
272
        unsigned char ExternalControl;         // for serial Control
269
    //---CareFree---------------------------------------------
273
        //---CareFree---------------------------------------------
270
    unsigned char OrientationAngle; // Where is the front-direction?
274
        unsigned char OrientationAngle;        // Where is the front-direction?
271
    unsigned char CareFreeChannel; // switch for CareFree
275
        unsigned char CareFreeChannel;     // switch for CareFree
272
    unsigned char MotorSafetySwitch;
276
    unsigned char MotorSafetySwitch;
273
    unsigned char MotorSmooth;
277
    unsigned char MotorSmooth;
274
    unsigned char ComingHomeAltitude;
278
    unsigned char ComingHomeAltitude;
275
    unsigned char FailSafeTime;
279
    unsigned char FailSafeTime;
276
    unsigned char MaxAltitude;
280
    unsigned char MaxAltitude;
-
 
281
        unsigned char FailsafeChannel;         // if the value of this channel is > 100, the MK reports "RC-Lost"
-
 
282
        unsigned char ServoFilterNick;  
-
 
283
        unsigned char ServoFilterRoll;  
-
 
284
    unsigned char Servo3OnValue;
277
    unsigned char FailsafeChannel; // if the value of this channel is > 100, the MK reports "RC-Lost"
285
    unsigned char Servo3OffValue;
278
    unsigned char ServoFilterNick;
286
    unsigned char Servo4OnValue;
279
    unsigned char ServoFilterRoll;
287
    unsigned char Servo4OffValue;
280
    unsigned char StartLandChannel;
288
        unsigned char StartLandChannel;  
281
    unsigned char LandingSpeed;
289
        unsigned char LandingSpeed;  
-
 
290
        unsigned char CompassOffset;        
-
 
291
        unsigned char AutoLandingVoltage;    // in 0,1V  0 -> disabled
282
    unsigned char CompassOffset;
292
        unsigned char ComingHomeVoltage;    // in 0,1V  0 -> disabled
283
    unsigned char AutoLandingVoltage; // in 0,1V  0 -> disabled
293
        unsigned char AutoPhotoAtitudes;
284
    unsigned char ComingHomeVoltage; // in 0,1V  0 -> disabled
294
        unsigned char SingleWpSpeed;
285
    //------------------------------------------------
295
        //------------------------------------------------
286
    unsigned char BitConfig; // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
296
        unsigned char BitConfig;          // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
287
    unsigned char ServoCompInvert; // //  0x01 = Nick, 0x02 = Roll, 0x04 = relative moving // WICHTIG!!! am Ende lassen
297
        unsigned char ServoCompInvert;    // //  0x01 = Nick, 0x02 = Roll, 0x04 = relative moving // WICHTIG!!! am Ende lassen
288
    unsigned char ExtraConfig; // bitcodiert
298
        unsigned char ExtraConfig;        // bitcodiert
289
    unsigned char GlobalConfig3; // bitcodiert
299
        unsigned char GlobalConfig3;      // bitcodiert
Line 290... Line 300...
290
    char Name[12];
300
        char Name[12];
291
    unsigned char crc; // must be the last byte!
301
        unsigned char crc;                                // must be the last byte!
292
} paramset_t; // 127 bytes 
302
} paramset_t; // 127 bytes
293
 
303