Rev 1378 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1378 | Rev 1550 | ||
---|---|---|---|
Line 7... | Line 7... | ||
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 long GIER_GRAD_FAKTOR; // Abhängigkeit zwischen GyroIntegral und Winkel |
9 | extern long GIER_GRAD_FAKTOR; // Abhängigkeit zwischen GyroIntegral und Winkel |
10 | #define STICK_GAIN 4 |
10 | #define STICK_GAIN 4 |
Line 11... | Line 11... | ||
11 | 11 | ||
12 | #define FLAG_MOTOR_RUN 1 |
12 | #define FCFLAG_MOTOR_RUN 0x01 |
13 | #define FLAG_FLY 2 |
13 | #define FCFLAG_FLY 0x02 |
14 | #define FLAG_CALIBRATE 4 |
14 | #define FCFLAG_CALIBRATE 0x04 |
15 | #define FLAG_START 8 |
15 | #define FCFLAG_START 0x08 |
16 | #define FLAG_NOTLANDUNG 16 |
16 | #define FCFLAG_NOTLANDUNG 0x10 |
- | 17 | #define FCFLAG_LOWBAT 0x20 |
|
- | 18 | #define FCFLAG_SPI_RX_ERR 0x40 |
|
- | 19 | #define FCFLAG_I2CERR 0x80 |
|
- | 20 | ||
- | 21 | #define Poti1 Poti[0] |
|
- | 22 | #define Poti2 Poti[1] |
|
- | 23 | #define Poti3 Poti[2] |
|
- | 24 | #define Poti4 Poti[3] |
|
- | 25 | #define Poti5 Poti[4] |
|
- | 26 | #define Poti6 Poti[5] |
|
- | 27 | #define Poti7 Poti[6] |
|
Line 17... | Line -... | ||
17 | #define FLAG_LOWBAT 32 |
- | |
18 | - | ||
19 | 28 | #define Poti8 Poti[7] |
|
Line 20... | Line 29... | ||
20 | #define MAX_MOTORS 12 |
29 | |
21 | 30 | ||
22 | #define CHECK_MIN_MAX(wert,min,max) {if(wert < min) wert = min; else if(wert > max) wert = max;} |
31 | #define CHECK_MIN_MAX(wert,min,max) {if(wert < min) wert = min; else if(wert > max) wert = max;} |
23 | 32 | ||
24 | extern volatile unsigned char MikroKopterFlags; |
33 | extern volatile unsigned char FCFlags; |
25 | extern volatile unsigned int I2CTimeout; |
34 | extern volatile unsigned int I2CTimeout; |
26 | extern unsigned char Sekunde,Minute; |
35 | extern unsigned char Sekunde,Minute; |
27 | extern unsigned int BaroExpandActive; |
36 | extern unsigned int BaroExpandActive; |
- | 37 | extern long IntegralNick,IntegralNick2; |
|
Line 28... | Line 38... | ||
28 | extern long IntegralNick,IntegralNick2; |
38 | extern long IntegralRoll,IntegralRoll2; |
29 | extern long IntegralRoll,IntegralRoll2; |
39 | //extern int IntegralNick,IntegralNick2; |
30 | //extern int IntegralNick,IntegralNick2; |
40 | //extern int IntegralRoll,IntegralRoll2; |
31 | //extern int IntegralRoll,IntegralRoll2; |
41 | extern unsigned char Poti[9]; |
Line 62... | Line 72... | ||
62 | 72 | ||
63 | extern unsigned char h,m,s; |
73 | extern unsigned char h,m,s; |
64 | extern volatile unsigned char Timeout ; |
74 | extern volatile unsigned char Timeout ; |
65 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
75 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
66 | extern int DiffNick,DiffRoll; |
76 | extern int DiffNick,DiffRoll; |
67 | extern int Poti1, Poti2, Poti3, Poti4; |
77 | //extern int Poti1, Poti2, Poti3, Poti4; |
68 | extern volatile unsigned char SenderOkay; |
78 | extern volatile unsigned char SenderOkay; |
69 | extern volatile unsigned char SenderRSSI; |
- | |
70 | extern unsigned char RequiredMotors; |
79 | extern volatile unsigned char SenderRSSI; |
71 | extern int StickNick,StickRoll,StickGier; |
80 | extern int StickNick,StickRoll,StickGier; |
72 | extern char MotorenEin; |
81 | extern char MotorenEin; |
73 | extern void DefaultKonstanten1(void); |
82 | extern void DefaultKonstanten1(void); |
74 | extern void DefaultKonstanten2(void); |
83 | extern void DefaultKonstanten2(void); |
75 | extern void DefaultKonstanten3(void); |
84 | extern void DefaultKonstanten3(void); |
- | 85 | extern void DefaultStickMapping(void); |
|
Line 76... | Line 86... | ||
76 | extern void DefaultStickMapping(void); |
86 | extern unsigned char Parameter_Servo3,Parameter_Servo4,Parameter_Servo5; |
77 | 87 | ||
78 | #define STRUCT_PARAM_LAENGE sizeof(EE_Parameter) |
88 | #define STRUCT_PARAM_LAENGE sizeof(EE_Parameter) |
79 | struct mk_param_struct |
89 | struct mk_param_struct |
80 | { |
90 | { |
81 | unsigned char Kanalbelegung[8]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3 |
91 | unsigned char Kanalbelegung[12]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3 |
82 | unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv |
92 | unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv |
83 | unsigned char Hoehe_MinGas; // Wert : 0-100 |
93 | unsigned char Hoehe_MinGas; // Wert : 0-100 |
84 | unsigned char Luftdruck_D; // Wert : 0-250 |
94 | unsigned char Luftdruck_D; // Wert : 0-250 |
Line 102... | Line 112... | ||
102 | unsigned char Gyro_Gier_P; // Wert : 10-250 |
112 | unsigned char Gyro_Gier_P; // Wert : 10-250 |
103 | unsigned char Gyro_Gier_I; // Wert : 0-250 |
113 | unsigned char Gyro_Gier_I; // Wert : 0-250 |
104 | unsigned char UnterspannungsWarnung; // Wert : 0-250 |
114 | unsigned char UnterspannungsWarnung; // Wert : 0-250 |
105 | unsigned char NotGas; // Wert : 0-250 //Gaswert bei Empängsverlust |
115 | unsigned char NotGas; // Wert : 0-250 //Gaswert bei Empängsverlust |
106 | unsigned char NotGasZeit; // Wert : 0-250 // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen |
116 | unsigned char NotGasZeit; // Wert : 0-250 // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen |
107 | unsigned char UfoAusrichtung; // X oder + Formation |
117 | unsigned char Receiver; // 0= Summensignal, 1= Spektrum, 2 =Jeti, 3=ACT DSL, 4=ACT S3D |
108 | unsigned char I_Faktor; // Wert : 0-250 |
118 | unsigned char I_Faktor; // Wert : 0-250 |
109 | unsigned char UserParam1; // Wert : 0-250 |
119 | unsigned char UserParam1; // Wert : 0-250 |
110 | unsigned char UserParam2; // Wert : 0-250 |
120 | unsigned char UserParam2; // Wert : 0-250 |
111 | unsigned char UserParam3; // Wert : 0-250 |
121 | unsigned char UserParam3; // Wert : 0-250 |
112 | unsigned char UserParam4; // Wert : 0-250 |
122 | unsigned char UserParam4; // Wert : 0-250 |
Line 118... | Line 128... | ||
118 | unsigned char ServoRollControl; // Wert : 0-250 // Stellung des Servos |
128 | unsigned char ServoRollControl; // Wert : 0-250 // Stellung des Servos |
119 | unsigned char ServoRollComp; // Wert : 0-250 |
129 | unsigned char ServoRollComp; // Wert : 0-250 |
120 | unsigned char ServoRollMin; // Wert : 0-250 |
130 | unsigned char ServoRollMin; // Wert : 0-250 |
121 | unsigned char ServoRollMax; // Wert : 0-250 |
131 | unsigned char ServoRollMax; // Wert : 0-250 |
122 | //--- |
132 | //--- |
123 | unsigned char ServoNickRefresh; // |
133 | unsigned char ServoNickRefresh; // Speed of the Servo |
- | 134 | unsigned char Servo3; // Value or mapping of the Servo Output |
|
- | 135 | unsigned char Servo4; // Value or mapping of the Servo Output |
|
- | 136 | unsigned char Servo5; // Value or mapping of the Servo Output |
|
124 | unsigned char LoopGasLimit; // Wert: 0-250 max. Gas während Looping |
137 | unsigned char LoopGasLimit; // Wert: 0-250 max. Gas während Looping |
125 | unsigned char LoopThreshold; // Wert: 0-250 Schwelle für Stickausschlag |
138 | unsigned char LoopThreshold; // Wert: 0-250 Schwelle für Stickausschlag |
126 | unsigned char LoopHysterese; // Wert: 0-250 Hysterese für Stickausschlag |
139 | unsigned char LoopHysterese; // Wert: 0-250 Hysterese für Stickausschlag |
127 | unsigned char AchsKopplung1; // Wert: 0-250 Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung) |
140 | unsigned char AchsKopplung1; // Wert: 0-250 Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung) |
128 | unsigned char AchsKopplung2; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden |
141 | unsigned char AchsKopplung2; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden |
Line 194... | Line 207... | ||
194 | extern unsigned char Parameter_J16Bitmask; // for the J16 Output |
207 | extern unsigned char Parameter_J16Bitmask; // for the J16 Output |
195 | extern unsigned char Parameter_J16Timing; // for the J16 Output |
208 | extern unsigned char Parameter_J16Timing; // for the J16 Output |
196 | extern unsigned char Parameter_J17Bitmask; // for the J17 Output |
209 | extern unsigned char Parameter_J17Bitmask; // for the J17 Output |
197 | extern unsigned char Parameter_J17Timing; // for the J17 Output |
210 | extern unsigned char Parameter_J17Timing; // for the J17 Output |
198 | extern signed char MixerTable[MAX_MOTORS][4]; |
211 | extern signed char MixerTable[MAX_MOTORS][4]; |
199 | extern unsigned char Motor[MAX_MOTORS]; |
- | |
200 | #endif //_FC_H |
212 | #endif //_FC_H |