Subversion Repositories FlightCtrl

Rev

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

Rev 683 Rev 685
Line -... Line 1...
-
 
1
#include "fc.h"
-
 
2
#include "_Settings.h"
-
 
3
#include "main.h"
-
 
4
 
1
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2
// + Konstanten 
6
// + Konstanten
3
// + 0-250 -> normale Werte
7
// + 0-250 -> normale Werte
4
// + 251 -> Poti1
8
// + 251 -> Poti1
5
// + 252 -> Poti2
9
// + 252 -> Poti2
6
// + 253 -> Poti3
10
// + 253 -> Poti3
7
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Line 13... Line 17...
13
 EE_Parameter.Kanalbelegung[K_GIER]  = 4;
17
 EE_Parameter.Kanalbelegung[K_GIER]  = 4;
14
 EE_Parameter.Kanalbelegung[K_POTI1] = 5;
18
 EE_Parameter.Kanalbelegung[K_POTI1] = 5;
15
 EE_Parameter.Kanalbelegung[K_POTI2] = 6;
19
 EE_Parameter.Kanalbelegung[K_POTI2] = 6;
16
 EE_Parameter.Kanalbelegung[K_POTI3] = 7;
20
 EE_Parameter.Kanalbelegung[K_POTI3] = 7;
17
 EE_Parameter.Kanalbelegung[K_POTI4] = 8;
21
 EE_Parameter.Kanalbelegung[K_POTI4] = 8;
18
 EE_Parameter.GlobalConfig = CFG_ACHSENKOPPLUNG_AKTIV;//CFG_HOEHENREGELUNG | /*CFG_HOEHEN_SCHALTER |*/ CFG_KOMPASS_AKTIV | CFG_KOMPASS_FIX;//0x01;    
22
 EE_Parameter.GlobalConfig = CFG_ACHSENKOPPLUNG_AKTIV;//CFG_HOEHENREGELUNG | /*CFG_HOEHEN_SCHALTER |*/ CFG_KOMPASS_AKTIV | CFG_KOMPASS_FIX;//0x01;
19
 EE_Parameter.Hoehe_MinGas = 30;
23
 EE_Parameter.Hoehe_MinGas = 30;
20
 EE_Parameter.MaxHoehe     = 251;      // Wert : 0-250   251 -> Poti1
24
 EE_Parameter.MaxHoehe     = 251;      // Wert : 0-250   251 -> Poti1
21
 EE_Parameter.Hoehe_P      = 10;       // Wert : 0-32
25
 EE_Parameter.Hoehe_P      = 10;       // Wert : 0-32
22
 EE_Parameter.Luftdruck_D  = 30;       // Wert : 0-250
26
 EE_Parameter.Luftdruck_D  = 30;       // Wert : 0-250
23
 EE_Parameter.Hoehe_ACC_Wirkung = 30;  // Wert : 0-250
27
 EE_Parameter.Hoehe_ACC_Wirkung = 30;  // Wert : 0-250
Line 56... Line 60...
56
 EE_Parameter.LoopConfig = 0;             // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
60
 EE_Parameter.LoopConfig = 0;             // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
57
 EE_Parameter.AchsKopplung1 = 90;
61
 EE_Parameter.AchsKopplung1 = 90;
58
 EE_Parameter.AchsGegenKopplung1 = 5;
62
 EE_Parameter.AchsGegenKopplung1 = 5;
59
 EE_Parameter.WinkelUmschlagNick = 100;
63
 EE_Parameter.WinkelUmschlagNick = 100;
60
 EE_Parameter.WinkelUmschlagRoll = 100;
64
 EE_Parameter.WinkelUmschlagRoll = 100;
61
 EE_Parameter.GyroAccAbgleich = 16;        // 1/k 
65
 EE_Parameter.GyroAccAbgleich = 16;        // 1/k
62
 EE_Parameter.Driftkomp = 4;              
66
 EE_Parameter.Driftkomp = 4;
63
 EE_Parameter.DynamicStability = 100;
67
 EE_Parameter.DynamicStability = 100;
64
 memcpy(EE_Parameter.Name, "Sport\0", 12);  
68
 memcpy(EE_Parameter.Name, "Sport\0", 12);
65
}
69
}
66
void DefaultKonstanten2(void)
70
void DefaultKonstanten2(void)
67
{
71
{
68
 EE_Parameter.Kanalbelegung[K_NICK]  = 1;
72
 EE_Parameter.Kanalbelegung[K_NICK]  = 1;
69
 EE_Parameter.Kanalbelegung[K_ROLL]  = 2;
73
 EE_Parameter.Kanalbelegung[K_ROLL]  = 2;
Line 71... Line 75...
71
 EE_Parameter.Kanalbelegung[K_GIER]  = 4;
75
 EE_Parameter.Kanalbelegung[K_GIER]  = 4;
72
 EE_Parameter.Kanalbelegung[K_POTI1] = 5;
76
 EE_Parameter.Kanalbelegung[K_POTI1] = 5;
73
 EE_Parameter.Kanalbelegung[K_POTI2] = 6;
77
 EE_Parameter.Kanalbelegung[K_POTI2] = 6;
74
 EE_Parameter.Kanalbelegung[K_POTI3] = 7;
78
 EE_Parameter.Kanalbelegung[K_POTI3] = 7;
75
 EE_Parameter.Kanalbelegung[K_POTI4] = 8;
79
 EE_Parameter.Kanalbelegung[K_POTI4] = 8;
76
 EE_Parameter.GlobalConfig = CFG_ACHSENKOPPLUNG_AKTIV;//CFG_HOEHENREGELUNG | /*CFG_HOEHEN_SCHALTER |*/ CFG_KOMPASS_AKTIV;//0x01;    
80
 EE_Parameter.GlobalConfig = CFG_ACHSENKOPPLUNG_AKTIV;//CFG_HOEHENREGELUNG | /*CFG_HOEHEN_SCHALTER |*/ CFG_KOMPASS_AKTIV;//0x01;
77
 EE_Parameter.Hoehe_MinGas = 30;
81
 EE_Parameter.Hoehe_MinGas = 30;
78
 EE_Parameter.MaxHoehe     = 251;         // Wert : 0-250   251 -> Poti1
82
 EE_Parameter.MaxHoehe     = 251;         // Wert : 0-250   251 -> Poti1
79
 EE_Parameter.Hoehe_P      = 10;          // Wert : 0-32
83
 EE_Parameter.Hoehe_P      = 10;          // Wert : 0-32
80
 EE_Parameter.Luftdruck_D  = 30;          // Wert : 0-250
84
 EE_Parameter.Luftdruck_D  = 30;          // Wert : 0-250
81
 EE_Parameter.Hoehe_ACC_Wirkung = 30;     // Wert : 0-250
85
 EE_Parameter.Hoehe_ACC_Wirkung = 30;     // Wert : 0-250
Line 109... Line 113...
109
 EE_Parameter.ServoNickMax = 150;         // Wert : 0-250     // Anschlag
113
 EE_Parameter.ServoNickMax = 150;         // Wert : 0-250     // Anschlag
110
 EE_Parameter.ServoNickRefresh = 5;
114
 EE_Parameter.ServoNickRefresh = 5;
111
 EE_Parameter.LoopGasLimit = 50;
115
 EE_Parameter.LoopGasLimit = 50;
112
 EE_Parameter.LoopThreshold = 90;         // Wert: 0-250  Schwelle für Stickausschlag
116
 EE_Parameter.LoopThreshold = 90;         // Wert: 0-250  Schwelle für Stickausschlag
113
 EE_Parameter.LoopHysterese = 50;
117
 EE_Parameter.LoopHysterese = 50;
114
 EE_Parameter.LoopConfig = 0;             // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts 
118
 EE_Parameter.LoopConfig = 0;             // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts
115
 EE_Parameter.AchsKopplung1 = 90;        // Faktor, mit dem Gier die Achsen Roll und Nick verkoppelt
119
 EE_Parameter.AchsKopplung1 = 90;        // Faktor, mit dem Gier die Achsen Roll und Nick verkoppelt
116
 EE_Parameter.AchsGegenKopplung1 = 5;
120
 EE_Parameter.AchsGegenKopplung1 = 5;
117
 EE_Parameter.WinkelUmschlagNick = 100;
121
 EE_Parameter.WinkelUmschlagNick = 100;
118
 EE_Parameter.WinkelUmschlagRoll = 100;
122
 EE_Parameter.WinkelUmschlagRoll = 100;
119
 EE_Parameter.GyroAccAbgleich = 32;        // 1/k 
123
 EE_Parameter.GyroAccAbgleich = 32;        // 1/k
120
 EE_Parameter.Driftkomp = 4;              
124
 EE_Parameter.Driftkomp = 4;
121
 EE_Parameter.DynamicStability = 75;
125
 EE_Parameter.DynamicStability = 75;
122
 memcpy(EE_Parameter.Name, "Normal\0", 12);  
126
 memcpy(EE_Parameter.Name, "Normal\0", 12);
123
}
127
}
Line 124... Line 128...
124
 
128
 
125
void DefaultKonstanten3(void)
129
void DefaultKonstanten3(void)
126
{
130
{
Line 130... Line 134...
130
 EE_Parameter.Kanalbelegung[K_GIER]  = 4;
134
 EE_Parameter.Kanalbelegung[K_GIER]  = 4;
131
 EE_Parameter.Kanalbelegung[K_POTI1] = 5;
135
 EE_Parameter.Kanalbelegung[K_POTI1] = 5;
132
 EE_Parameter.Kanalbelegung[K_POTI2] = 6;
136
 EE_Parameter.Kanalbelegung[K_POTI2] = 6;
133
 EE_Parameter.Kanalbelegung[K_POTI3] = 7;
137
 EE_Parameter.Kanalbelegung[K_POTI3] = 7;
134
 EE_Parameter.Kanalbelegung[K_POTI4] = 8;
138
 EE_Parameter.Kanalbelegung[K_POTI4] = 8;
135
 EE_Parameter.GlobalConfig = CFG_DREHRATEN_BEGRENZER | CFG_ACHSENKOPPLUNG_AKTIV;///*CFG_HOEHEN_SCHALTER |*/ CFG_KOMPASS_AKTIV;//0x01;    
139
 EE_Parameter.GlobalConfig = CFG_DREHRATEN_BEGRENZER | CFG_ACHSENKOPPLUNG_AKTIV;///*CFG_HOEHEN_SCHALTER |*/ CFG_KOMPASS_AKTIV;//0x01;
136
 EE_Parameter.Hoehe_MinGas = 30;
140
 EE_Parameter.Hoehe_MinGas = 30;
137
 EE_Parameter.MaxHoehe     = 251;         // Wert : 0-250   251 -> Poti1
141
 EE_Parameter.MaxHoehe     = 251;         // Wert : 0-250   251 -> Poti1
138
 EE_Parameter.Hoehe_P      = 10;          // Wert : 0-32
142
 EE_Parameter.Hoehe_P      = 10;          // Wert : 0-32
139
 EE_Parameter.Luftdruck_D  = 30;          // Wert : 0-250
143
 EE_Parameter.Luftdruck_D  = 30;          // Wert : 0-250
140
 EE_Parameter.Hoehe_ACC_Wirkung = 30;     // Wert : 0-250
144
 EE_Parameter.Hoehe_ACC_Wirkung = 30;     // Wert : 0-250
Line 168... Line 172...
168
 EE_Parameter.ServoNickMax = 150;         // Wert : 0-250     // Anschlag
172
 EE_Parameter.ServoNickMax = 150;         // Wert : 0-250     // Anschlag
169
 EE_Parameter.ServoNickRefresh = 5;
173
 EE_Parameter.ServoNickRefresh = 5;
170
 EE_Parameter.LoopGasLimit = 50;
174
 EE_Parameter.LoopGasLimit = 50;
171
 EE_Parameter.LoopThreshold = 90;         // Wert: 0-250  Schwelle für Stickausschlag
175
 EE_Parameter.LoopThreshold = 90;         // Wert: 0-250  Schwelle für Stickausschlag
172
 EE_Parameter.LoopHysterese = 50;
176
 EE_Parameter.LoopHysterese = 50;
173
 EE_Parameter.LoopConfig = 0;             // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts 
177
 EE_Parameter.LoopConfig = 0;             // Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts
174
 EE_Parameter.AchsKopplung1 = 90;        // Faktor, mit dem Gier die Achsen Roll und Nick verkoppelt
178
 EE_Parameter.AchsKopplung1 = 90;        // Faktor, mit dem Gier die Achsen Roll und Nick verkoppelt
175
 EE_Parameter.AchsGegenKopplung1 = 5;
179
 EE_Parameter.AchsGegenKopplung1 = 5;
176
 EE_Parameter.WinkelUmschlagNick = 100;
180
 EE_Parameter.WinkelUmschlagNick = 100;
177
 EE_Parameter.WinkelUmschlagRoll = 100;
181
 EE_Parameter.WinkelUmschlagRoll = 100;
178
 EE_Parameter.GyroAccAbgleich = 32;        // 1/k 
182
 EE_Parameter.GyroAccAbgleich = 32;        // 1/k
179
 EE_Parameter.Driftkomp = 4;              
183
 EE_Parameter.Driftkomp = 4;
180
 EE_Parameter.DynamicStability = 50;
184
 EE_Parameter.DynamicStability = 50;
181
 memcpy(EE_Parameter.Name, "Beginner\0", 12);  
185
 memcpy(EE_Parameter.Name, "Beginner\0", 12);
182
}
186
}