Subversion Repositories FlightCtrl

Rev

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

Rev 304 Rev 396
Line 9... Line 9...
9
extern unsigned char Sekunde,Minute;
9
extern unsigned char Sekunde,Minute;
10
extern volatile long IntegralNick,IntegralNick2;
10
extern volatile long IntegralNick,IntegralNick2;
11
extern volatile long IntegralRoll,IntegralRoll2;
11
extern volatile long IntegralRoll,IntegralRoll2;
12
extern volatile long Mess_IntegralNick,Mess_IntegralNick2;
12
extern volatile long Mess_IntegralNick,Mess_IntegralNick2;
13
extern volatile long Mess_IntegralRoll,Mess_IntegralRoll2;
13
extern volatile long Mess_IntegralRoll,Mess_IntegralRoll2;
-
 
14
extern volatile long IntegralAccNick,IntegralAccRoll;
14
extern volatile long Mess_Integral_Hoch;
15
extern volatile long Mess_Integral_Hoch;
15
extern volatile long Integral_Gier,Mess_Integral_Gier,Mess_Integral_Gier2;
16
extern volatile long Integral_Gier,Mess_Integral_Gier,Mess_Integral_Gier2;
16
extern volatile int  KompassValue;
17
extern volatile int  KompassValue;
17
extern volatile int  KompassStartwert;
18
extern volatile int  KompassStartwert;
18
extern volatile int  KompassRichtung;
19
extern volatile int  KompassRichtung;
Line 20... Line 21...
20
extern int SollHoehe;
21
extern int SollHoehe;
21
extern volatile int MesswertNick,MesswertRoll,MesswertGier;
22
extern volatile int MesswertNick,MesswertRoll,MesswertGier;
22
extern volatile int AdNeutralNick,AdNeutralRoll,AdNeutralGier, Mittelwert_AccNick, Mittelwert_AccRoll;
23
extern volatile int AdNeutralNick,AdNeutralRoll,AdNeutralGier, Mittelwert_AccNick, Mittelwert_AccRoll;
23
extern volatile int NeutralAccX, NeutralAccY,Mittelwert_AccHoch;
24
extern volatile int NeutralAccX, NeutralAccY,Mittelwert_AccHoch;
24
extern volatile float NeutralAccZ;
25
extern volatile float NeutralAccZ;
25
 
-
 
-
 
26
extern long Umschlag180Nick, Umschlag180Roll;
Line 26... Line 27...
26
 
27
 
27
void MotorRegler(void);
28
void MotorRegler(void);
28
void SendMotorData(void);
29
void SendMotorData(void);
29
void CalibrierMittelwert(void);
30
void CalibrierMittelwert(void);
Line 48... Line 49...
48
extern volatile unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links, Count;
49
extern volatile unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links, Count;
49
extern unsigned char MotorWert[5];
50
extern unsigned char MotorWert[5];
50
extern volatile unsigned char SenderOkay;
51
extern volatile unsigned char SenderOkay;
51
extern int StickNick,StickRoll,StickGier;
52
extern int StickNick,StickRoll,StickGier;
52
extern char MotorenEin;
53
extern char MotorenEin;
-
 
54
extern void DefaultKonstanten1(void);
-
 
55
extern void DefaultKonstanten2(void);
Line 53... Line -...
53
 
-
 
54
 
56
 
55
#define  STRUCT_PARAM_LAENGE  58
57
#define  STRUCT_PARAM_LAENGE  65
56
struct mk_param_struct
58
struct mk_param_struct
57
 {
59
 {
58
   unsigned char Kanalbelegung[8];        // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3
60
   unsigned char Kanalbelegung[8];        // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3
59
   unsigned char GlobalConfig;            // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv
61
   unsigned char GlobalConfig;            // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv
Line 86... Line 88...
86
   unsigned char ServoNickMin;           // Wert : 0-250     // Anschlag
88
   unsigned char ServoNickMin;           // Wert : 0-250     // Anschlag
87
   unsigned char ServoNickMax;           // Wert : 0-250     // Anschlag
89
   unsigned char ServoNickMax;           // Wert : 0-250     // Anschlag
88
   unsigned char ServoNickRefresh;       //
90
   unsigned char ServoNickRefresh;       //
89
   unsigned char LoopGasLimit;           // Wert: 0-250  max. Gas während Looping
91
   unsigned char LoopGasLimit;           // Wert: 0-250  max. Gas während Looping
90
   unsigned char LoopThreshold;          // Wert: 0-250  Schwelle für Stickausschlag
92
   unsigned char LoopThreshold;          // Wert: 0-250  Schwelle für Stickausschlag
-
 
93
   unsigned char LoopHysterese;          // Wert: 0-250  Hysterese für Stickausschlag
-
 
94
   unsigned char AchsKopplung1;          // Wert: 0-250  Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung)
-
 
95
   unsigned char AchsGegenKopplung1;     // Wert: 0-250  Faktor, mit dem Gier die Achsen Roll und Nick Gegenkoppelt (NickRollGegenkopplung)
-
 
96
   unsigned char WinkelUmschlagNick;     // Wert: 0-250  180°-Punkt
-
 
97
   unsigned char WinkelUmschlagRoll;     // Wert: 0-250  180°-Punkt
-
 
98
   unsigned char GyroAccAbgleich;        // 1/k  (Koppel_ACC_Wirkung)
-
 
99
   unsigned char Driftkomp;
-
 
100
 
91
//------------------------------------------------
101
//------------------------------------------------
92
   unsigned char LoopConfig;             // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
102
   unsigned char LoopConfig;             // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
93
   unsigned char ServoNickCompInvert;    // Wert : 0-250   0 oder 1  // WICHTIG!!! am Ende lassen
103
   unsigned char ServoNickCompInvert;    // Wert : 0-250   0 oder 1  // WICHTIG!!! am Ende lassen
94
   unsigned char Reserved[4];
104
   unsigned char Reserved[4];
95
   char Name[12];
105
   char Name[12];
96
 };
106
 };
Line -... Line 107...
-
 
107
 
97
 
108
 
98
/*
109
/*
99
unsigned char ServoNickMax;           // Wert : 0-250
110
unsigned char ServoNickMax;           // Wert : 0-250
100
    unsigned char ServoNickRefresh;       //
111
    unsigned char ServoNickRefresh;       //
101
    unsigned char LoopGasLimit;           // Wert: 0-250  max. Gas während Looping
112
    unsigned char LoopGasLimit;           // Wert: 0-250  max. Gas während Looping
Line 116... Line 127...
116
extern unsigned char Parameter_KompassWirkung;
127
extern unsigned char Parameter_KompassWirkung;
117
extern unsigned char Parameter_Gyro_P;
128
extern unsigned char Parameter_Gyro_P;
118
extern unsigned char Parameter_Gyro_I;
129
extern unsigned char Parameter_Gyro_I;
119
extern unsigned char Parameter_Gier_P;
130
extern unsigned char Parameter_Gier_P;
120
extern unsigned char Parameter_ServoNickControl;
131
extern unsigned char Parameter_ServoNickControl;
-
 
132
extern unsigned char Parameter_AchsKopplung1;
-
 
133
extern unsigned char Parameter_AchsGegenKopplung1;
-
 
134
 
Line 121... Line 135...
121
 
135