Subversion Repositories FlightCtrl

Rev

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

Rev 1111 Rev 1120
Line 4... Line 4...
4
 
4
 
5
#ifndef _FC_H
5
#ifndef _FC_H
6
#define _FC_H
6
#define _FC_H
7
//#define GIER_GRAD_FAKTOR 1291L // Abhängigkeit zwischen GyroIntegral und Winkel
7
//#define GIER_GRAD_FAKTOR 1291L // Abhängigkeit zwischen GyroIntegral und Winkel
8
//#define GIER_GRAD_FAKTOR 1160L 
8
//#define GIER_GRAD_FAKTOR 1160L 
9
extern unsigned int GIER_GRAD_FAKTOR; // Abhängigkeit zwischen GyroIntegral und Winkel
9
extern unsigned long GIER_GRAD_FAKTOR; // Abhängigkeit zwischen GyroIntegral und Winkel
Line 10... Line 10...
10
#define STICK_GAIN 4
10
#define STICK_GAIN 4
11
 
11
 
12
#define FLAG_MOTOR_RUN  1
12
#define FLAG_MOTOR_RUN  1
Line 61... Line 61...
61
extern int StickNick,StickRoll,StickGier;
61
extern int StickNick,StickRoll,StickGier;
62
extern char MotorenEin;
62
extern char MotorenEin;
63
extern void DefaultKonstanten1(void);
63
extern void DefaultKonstanten1(void);
64
extern void DefaultKonstanten2(void);
64
extern void DefaultKonstanten2(void);
Line -... Line 65...
-
 
65
 
65
 
66
 
66
#define  STRUCT_PARAM_LAENGE  86
67
#define  STRUCT_PARAM_LAENGE  92 
67
struct mk_param_struct
68
struct mk_param_struct
68
 {
69
 {
69
   unsigned char Kanalbelegung[8];       // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3
70
   unsigned char Kanalbelegung[8];       // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3
70
   unsigned char GlobalConfig;           // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv
71
   unsigned char GlobalConfig;           // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv
Line 81... Line 82...
81
   unsigned char Gas_Max;                // Wert : 33-250
82
   unsigned char Gas_Max;                // Wert : 33-250
82
   unsigned char GyroAccFaktor;          // Wert : 1-64
83
   unsigned char GyroAccFaktor;          // Wert : 1-64
83
   unsigned char KompassWirkung;         // Wert : 0-32
84
   unsigned char KompassWirkung;         // Wert : 0-32
84
   unsigned char Gyro_P;                 // Wert : 10-250
85
   unsigned char Gyro_P;                 // Wert : 10-250
85
   unsigned char Gyro_I;                 // Wert : 0-250
86
   unsigned char Gyro_I;                 // Wert : 0-250
-
 
87
   unsigned char Gyro_D;                 // Wert : 0-250
86
   unsigned char UnterspannungsWarnung;  // Wert : 0-250
88
   unsigned char UnterspannungsWarnung;  // Wert : 0-250
87
   unsigned char NotGas;                 // Wert : 0-250     //Gaswert bei Empängsverlust
89
   unsigned char NotGas;                 // Wert : 0-250     //Gaswert bei Empängsverlust
88
   unsigned char NotGasZeit;             // Wert : 0-250     // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen
90
   unsigned char NotGasZeit;             // Wert : 0-250     // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen
89
   unsigned char UfoAusrichtung;         // X oder + Formation
91
   unsigned char UfoAusrichtung;         // X oder + Formation
90
   unsigned char I_Faktor;               // Wert : 0-250
92
   unsigned char I_Faktor;               // Wert : 0-250
Line 99... Line 101...
99
   unsigned char ServoNickRefresh;       //
101
   unsigned char ServoNickRefresh;       //
100
   unsigned char LoopGasLimit;           // Wert: 0-250  max. Gas während Looping
102
   unsigned char LoopGasLimit;           // Wert: 0-250  max. Gas während Looping
101
   unsigned char LoopThreshold;          // Wert: 0-250  Schwelle für Stickausschlag
103
   unsigned char LoopThreshold;          // Wert: 0-250  Schwelle für Stickausschlag
102
   unsigned char LoopHysterese;          // Wert: 0-250  Hysterese für Stickausschlag
104
   unsigned char LoopHysterese;          // Wert: 0-250  Hysterese für Stickausschlag
103
   unsigned char AchsKopplung1;          // Wert: 0-250  Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung)
105
   unsigned char AchsKopplung1;          // Wert: 0-250  Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung)
104
   unsigned char AchsGegenKopplung1;     // Wert: 0-250  Faktor, mit dem Gier die Achsen Roll und Nick Gegenkoppelt (NickRollGegenkopplung)
106
   unsigned char AchsKopplung2;          // Wert: 0-250  Faktor, mit dem Nick und Roll verkoppelt werden
-
 
107
   unsigned char CouplingYawCorrection;  // Wert: 0-250  Faktor, mit dem Nick und Roll verkoppelt werden
105
   unsigned char WinkelUmschlagNick;     // Wert: 0-250  180°-Punkt
108
   unsigned char WinkelUmschlagNick;     // Wert: 0-250  180°-Punkt
106
   unsigned char WinkelUmschlagRoll;     // Wert: 0-250  180°-Punkt
109
   unsigned char WinkelUmschlagRoll;     // Wert: 0-250  180°-Punkt
107
   unsigned char GyroAccAbgleich;        // 1/k  (Koppel_ACC_Wirkung)
110
   unsigned char GyroAccAbgleich;        // 1/k  (Koppel_ACC_Wirkung)
108
   unsigned char Driftkomp;              
111
   unsigned char Driftkomp;              
109
   unsigned char DynamicStability;
112
   unsigned char DynamicStability;
Line 120... Line 123...
120
   unsigned char NaviGpsModeControl;     // Parameters for the Naviboard
123
   unsigned char NaviGpsModeControl;     // Parameters for the Naviboard
121
   unsigned char NaviGpsGain;    
124
   unsigned char NaviGpsGain;    
122
   unsigned char NaviGpsP;        
125
   unsigned char NaviGpsP;        
123
   unsigned char NaviGpsI;        
126
   unsigned char NaviGpsI;        
124
   unsigned char NaviGpsD;        
127
   unsigned char NaviGpsD;        
-
 
128
   unsigned char NaviGpsPLimit;        
-
 
129
   unsigned char NaviGpsILimit;        
-
 
130
   unsigned char NaviGpsDLimit;        
125
   unsigned char NaviGpsACC;        
131
   unsigned char NaviGpsACC;        
126
   unsigned char NaviGpsMinSat;        
132
   unsigned char NaviGpsMinSat;        
127
   unsigned char NaviStickThreshold;        
133
   unsigned char NaviStickThreshold;        
128
   unsigned char NaviWindCorrection;        
134
   unsigned char NaviWindCorrection;        
129
   unsigned char NaviSpeedCompensation;        
135
   unsigned char NaviSpeedCompensation;        
130
   unsigned char NaviOperatingRadius;        
136
   unsigned char NaviOperatingRadius;        
131
   unsigned char NaviAngleLimitation;
137
   unsigned char NaviAngleLimitation;
-
 
138
   unsigned char NaviPH_LoginTime;
132
//---Ext.Ctrl---------------------------------------------
139
//---Ext.Ctrl---------------------------------------------
133
   unsigned char ExternalControl;        // for serial Control
140
   unsigned char ExternalControl;        // for serial Control
134
//------------------------------------------------
141
//------------------------------------------------
135
   unsigned char BitConfig;             // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
142
   unsigned char BitConfig;             // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
136
   unsigned char ServoNickCompInvert;    // Wert : 0-250   0 oder 1  // WICHTIG!!! am Ende lassen
143
   unsigned char ServoNickCompInvert;    // Wert : 0-250   0 oder 1  // WICHTIG!!! am Ende lassen
Line 149... Line 156...
149
extern unsigned char Parameter_Gyro_P;
156
extern unsigned char Parameter_Gyro_P;
150
extern unsigned char Parameter_Gyro_I;
157
extern unsigned char Parameter_Gyro_I;
151
extern unsigned char Parameter_Gier_P;
158
extern unsigned char Parameter_Gier_P;
152
extern unsigned char Parameter_ServoNickControl;
159
extern unsigned char Parameter_ServoNickControl;
153
extern unsigned char Parameter_AchsKopplung1;
160
extern unsigned char Parameter_AchsKopplung1;
-
 
161
extern unsigned char Parameter_AchsKopplung2;
154
extern unsigned char Parameter_AchsGegenKopplung1;
162
//extern unsigned char Parameter_AchsGegenKopplung1;
155
extern unsigned char Parameter_J16Bitmask;             // for the J16 Output
163
extern unsigned char Parameter_J16Bitmask;             // for the J16 Output
156
extern unsigned char Parameter_J16Timing;              // for the J16 Output
164
extern unsigned char Parameter_J16Timing;              // for the J16 Output
157
extern unsigned char Parameter_J17Bitmask;             // for the J17 Output
165
extern unsigned char Parameter_J17Bitmask;             // for the J17 Output
158
extern unsigned char Parameter_J17Timing;              // for the J17 Output
166
extern unsigned char Parameter_J17Timing;              // for the J17 Output
159
/*
167
/*