Subversion Repositories FlightCtrl

Rev

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

Rev 871 Rev 921
Line 5... Line 5...
5
#ifndef _FC_H
5
#ifndef _FC_H
6
#define _FC_H
6
#define _FC_H
7
//#define GIER_GRAD_FAKTOR 1450L // Abhängigkeit wzischen GyroIntegral und Winkel
7
//#define GIER_GRAD_FAKTOR 1450L // Abhängigkeit wzischen GyroIntegral und Winkel
8
#define GIER_GRAD_FAKTOR 1550L // Abhängigkeit wzischen GyroIntegral und Winkel
8
#define GIER_GRAD_FAKTOR 1550L // Abhängigkeit wzischen GyroIntegral und Winkel
9
#define STICK_GAIN 4
9
#define STICK_GAIN 4
-
 
10
 
-
 
11
#define FLAG_MOTOR_RUN  1
-
 
12
#define FLAG_FLY        2
-
 
13
#define FLAG_CALIBRATE  4
-
 
14
#define FLAG_START      8
-
 
15
extern unsigned char MikroKopterFlags;
-
 
16
 
10
extern volatile unsigned int I2CTimeout;
17
extern volatile unsigned int I2CTimeout;
11
extern unsigned char Sekunde,Minute;
18
extern unsigned char Sekunde,Minute;
12
extern long IntegralNick,IntegralNick2;
19
extern long IntegralNick,IntegralNick2;
13
extern long IntegralRoll,IntegralRoll2;
20
extern long IntegralRoll,IntegralRoll2;
14
extern long Mess_IntegralNick,Mess_IntegralNick2;
21
extern long Mess_IntegralNick,Mess_IntegralNick2;
Line 52... Line 59...
52
extern int StickNick,StickRoll,StickGier;
59
extern int StickNick,StickRoll,StickGier;
53
extern char MotorenEin;
60
extern char MotorenEin;
54
extern void DefaultKonstanten1(void);
61
extern void DefaultKonstanten1(void);
55
extern void DefaultKonstanten2(void);
62
extern void DefaultKonstanten2(void);
Line 56... Line 63...
56
 
63
 
57
#define  STRUCT_PARAM_LAENGE  71
64
#define  STRUCT_PARAM_LAENGE  83
58
struct mk_param_struct
65
struct mk_param_struct
59
 {
66
 {
60
   unsigned char Kanalbelegung[8];        // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3
67
   unsigned char Kanalbelegung[8];       // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3
61
   unsigned char GlobalConfig;            // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv
68
   unsigned char GlobalConfig;           // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv
62
   unsigned char Hoehe_MinGas;            // Wert : 0-100
69
   unsigned char Hoehe_MinGas;           // Wert : 0-100
63
   unsigned char Luftdruck_D;             // Wert : 0-250
70
   unsigned char Luftdruck_D;            // Wert : 0-250
64
   unsigned char MaxHoehe;                // Wert : 0-32
71
   unsigned char MaxHoehe;               // Wert : 0-32
65
   unsigned char Hoehe_P;                 // Wert : 0-32
72
   unsigned char Hoehe_P;                // Wert : 0-32
66
   unsigned char Hoehe_Verstaerkung;      // Wert : 0-50
73
   unsigned char Hoehe_Verstaerkung;     // Wert : 0-50
67
   unsigned char Hoehe_ACC_Wirkung;      // Wert : 0-250
74
   unsigned char Hoehe_ACC_Wirkung;      // Wert : 0-250
68
   unsigned char Stick_P;                // Wert : 1-6
75
   unsigned char Stick_P;                // Wert : 1-6
69
   unsigned char Stick_D;                // Wert : 0-64
76
   unsigned char Stick_D;                // Wert : 0-64
70
   unsigned char Gier_P;                 // Wert : 1-20
77
   unsigned char Gier_P;                 // Wert : 1-20
Line 100... Line 107...
100
   unsigned char DynamicStability;
107
   unsigned char DynamicStability;
101
   unsigned char UserParam5;             // Wert : 0-250
108
   unsigned char UserParam5;             // Wert : 0-250
102
   unsigned char UserParam6;             // Wert : 0-250
109
   unsigned char UserParam6;             // Wert : 0-250
103
   unsigned char UserParam7;             // Wert : 0-250
110
   unsigned char UserParam7;             // Wert : 0-250
104
   unsigned char UserParam8;             // Wert : 0-250
111
   unsigned char UserParam8;             // Wert : 0-250
-
 
112
//---Output ---------------------------------------------
-
 
113
   unsigned char J16Bitmask;             // for the J16 Output
-
 
114
   unsigned char J16Timing;              // for the J16 Output
-
 
115
   unsigned char J17Bitmask;             // for the J17 Output
-
 
116
   unsigned char J17Timing;              // for the J17 Output
-
 
117
//---NaviCtrl---------------------------------------------
105
 
-
 
-
 
118
   unsigned char NaviGpsModeControl;     // Parameters for the Naviboard
-
 
119
   unsigned char NaviGpsGain;    
-
 
120
   unsigned char NaviGpsP;        
-
 
121
   unsigned char NaviGpsI;        
-
 
122
   unsigned char NaviGpsD;        
-
 
123
   unsigned char NaviGpsACC;        
-
 
124
   unsigned char NaviGpsMinSat;        
-
 
125
   unsigned char NaviStickThreshold;        
-
 
126
//---Ext.Ctrl---------------------------------------------
-
 
127
   unsigned char ExternalControl;        // for serial Control
106
//------------------------------------------------
128
//------------------------------------------------
107
   unsigned char LoopConfig;             // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
129
   unsigned char LoopConfig;             // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
108
   unsigned char ServoNickCompInvert;    // Wert : 0-250   0 oder 1  // WICHTIG!!! am Ende lassen
130
   unsigned char ServoNickCompInvert;    // Wert : 0-250   0 oder 1  // WICHTIG!!! am Ende lassen
109
   unsigned char Reserved[4];
131
   unsigned char Reserved[4];
110
   char Name[12];
132
   char Name[12];
Line 134... Line 156...
134
extern unsigned char Parameter_Gyro_I;
156
extern unsigned char Parameter_Gyro_I;
135
extern unsigned char Parameter_Gier_P;
157
extern unsigned char Parameter_Gier_P;
136
extern unsigned char Parameter_ServoNickControl;
158
extern unsigned char Parameter_ServoNickControl;
137
extern unsigned char Parameter_AchsKopplung1;
159
extern unsigned char Parameter_AchsKopplung1;
138
extern unsigned char Parameter_AchsGegenKopplung1;
160
extern unsigned char Parameter_AchsGegenKopplung1;
-
 
161
extern unsigned char Parameter_J16Bitmask;             // for the J16 Output
-
 
162
extern unsigned char Parameter_J16Timing;              // for the J16 Output
-
 
163
extern unsigned char Parameter_J17Bitmask;             // for the J17 Output
-
 
164
extern unsigned char Parameter_J17Timing;              // for the J17 Output
-
 
165
extern unsigned char Parameter_NaviGpsModeControl;     // Parameters for the Naviboard
-
 
166
extern unsigned char Parameter_NaviGpsGain;    
139
 
-
 
140
 
-
 
-
 
167
extern unsigned char Parameter_NaviGpsP;        
-
 
168
extern unsigned char Parameter_NaviGpsI;        
-
 
169
extern unsigned char Parameter_NaviGpsD;        
-
 
170
extern unsigned char Parameter_NaviGpsACC;        
141
#endif //_FC_H
171
#endif //_FC_H