Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
308 | osiair | 1 | /*####################################################################################### |
2 | Flight Control |
||
3 | #######################################################################################*/ |
||
4 | |||
5 | #ifndef _FC_H |
||
6 | #define _FC_H |
||
7 | |||
8 | extern volatile unsigned char Timeout; |
||
9 | extern unsigned char Sekunde,Minute; |
||
10 | extern volatile long IntegralNick,IntegralNick2; |
||
11 | extern volatile long IntegralRoll,IntegralRoll2; |
||
12 | extern volatile long Mess_IntegralNick,Mess_IntegralNick2; |
||
13 | extern volatile long Mess_IntegralRoll,Mess_IntegralRoll2; |
||
14 | extern volatile long Mess_Integral_Hoch; |
||
15 | extern volatile long Integral_Gier,Mess_Integral_Gier,Mess_Integral_Gier2; |
||
16 | extern volatile int KompassValue; |
||
17 | extern volatile int KompassStartwert; |
||
18 | extern volatile int KompassRichtung; |
||
19 | extern int HoehenWert; |
||
20 | extern int SollHoehe; |
||
21 | extern volatile int MesswertNick,MesswertRoll,MesswertGier; |
||
22 | extern volatile int AdNeutralNick,AdNeutralRoll,AdNeutralGier, Mittelwert_AccNick, Mittelwert_AccRoll; |
||
23 | extern volatile int NeutralAccX, NeutralAccY,Mittelwert_AccHoch; |
||
24 | extern volatile float NeutralAccZ; |
||
25 | |||
26 | extern unsigned int modell_fliegt_gps;//(030907Kr) |
||
27 | extern unsigned char Limit_D_Anteil;//(210907Kr) |
||
28 | |||
29 | void MotorRegler(void); |
||
30 | void SendMotorData(void); |
||
31 | void CalibrierMittelwert(void); |
||
32 | void Mittelwert(void); |
||
33 | void SetNeutral(void); |
||
34 | void Piep(unsigned char Anzahl); |
||
35 | void DefaultKonstanten1(void); |
||
36 | void DefaultKonstanten2(void); |
||
37 | |||
38 | unsigned char h,m,s; |
||
39 | volatile unsigned char Timeout ; |
||
40 | unsigned char CosinusNickWinkel, CosinusRollWinkel; |
||
41 | volatile long IntegralNick,IntegralNick2; |
||
42 | volatile long IntegralRoll,IntegralRoll2; |
||
43 | volatile long Integral_Gier; |
||
44 | volatile long Mess_IntegralNick,Mess_IntegralNick2; |
||
45 | volatile long Mess_IntegralRoll,Mess_IntegralRoll2; |
||
46 | volatile long Mess_Integral_Gier; |
||
47 | volatile int DiffNick,DiffRoll; |
||
48 | extern int Poti1, Poti2, Poti3, Poti4, Poti5, Poti6, Poti7, Poti8; |
||
49 | volatile unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links, Count; |
||
50 | unsigned char MotorWert[5]; |
||
51 | volatile unsigned char SenderOkay; |
||
52 | int StickNick,StickRoll,StickGier; |
||
53 | char MotorenEin; |
||
54 | extern void DefaultKonstanten(void); |
||
55 | |||
56 | #define STRUCT_PARAM_LAENGE 58 |
||
57 | struct mk_param_struct |
||
58 | { |
||
59 | unsigned char Kanalbelegung[8]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3 |
||
60 | unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv |
||
61 | unsigned char Hoehe_MinGas; // Wert : 0-100 |
||
62 | unsigned char Luftdruck_D; // Wert : 0-250 |
||
63 | unsigned char MaxHoehe; // Wert : 0-32 |
||
64 | unsigned char Hoehe_P; // Wert : 0-32 |
||
65 | unsigned char Hoehe_Verstaerkung; // Wert : 0-50 |
||
66 | unsigned char Hoehe_ACC_Wirkung; // Wert : 0-250 |
||
67 | unsigned char Stick_P; // Wert : 1-6 |
||
68 | unsigned char Stick_D; // Wert : 0-64 |
||
69 | unsigned char Gier_P; // Wert : 1-20 |
||
70 | unsigned char Gas_Min; // Wert : 0-32 |
||
71 | unsigned char Gas_Max; // Wert : 33-250 |
||
72 | unsigned char GyroAccFaktor; // Wert : 1-64 |
||
73 | unsigned char KompassWirkung; // Wert : 0-32 |
||
74 | unsigned char Gyro_P; // Wert : 10-250 |
||
75 | unsigned char Gyro_I; // Wert : 0-250 |
||
76 | unsigned char UnterspannungsWarnung; // Wert : 0-250 |
||
77 | unsigned char NotGas; // Wert : 0-250 //Gaswert bei Empängsverlust |
||
78 | unsigned char NotGasZeit; // Wert : 0-250 // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen |
||
79 | unsigned char UfoAusrichtung; // X oder + Formation |
||
80 | unsigned char I_Faktor; // Wert : 0-250 |
||
81 | unsigned char UserParam1; // Wert : 0-250 |
||
82 | unsigned char UserParam2; // Wert : 0-250 |
||
83 | unsigned char UserParam3; // Wert : 0-250 |
||
84 | unsigned char UserParam4; // Wert : 0-250 |
||
85 | unsigned char ServoNickControl; // Wert : 0-250 // Stellung des Servos |
||
86 | unsigned char ServoNickComp; // Wert : 0-250 // Einfluss Gyro/Servo |
||
87 | unsigned char ServoNickMin; // Wert : 0-250 // Anschlag |
||
88 | unsigned char ServoNickMax; // Wert : 0-250 // Anschlag |
||
89 | unsigned char ServoNickRefresh; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
||
90 | unsigned char ServoNickCompInvert; // Wert : 0-250 // Richtung Einfluss Gyro/Servo |
||
91 | unsigned char Reserved[7]; |
||
92 | char Name[12]; |
||
93 | }; |
||
94 | |||
95 | |||
96 | |||
97 | |||
98 | extern struct mk_param_struct EE_Parameter; |
||
99 | |||
100 | extern unsigned char Parameter_Luftdruck_D; |
||
101 | extern unsigned char Parameter_MaxHoehe; |
||
102 | extern unsigned char Parameter_Hoehe_P; |
||
103 | extern unsigned char Parameter_Hoehe_ACC_Wirkung; |
||
104 | extern unsigned char Parameter_KompassWirkung; |
||
105 | extern unsigned char Parameter_Gyro_P; |
||
106 | extern unsigned char Parameter_Gyro_I; |
||
107 | extern unsigned char Parameter_Gier_P; |
||
108 | extern unsigned char Parameter_ServoNickControl; |
||
109 | |||
110 | #endif //_FC_H |
||
111 |