Rev 1600 | Rev 1639 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1600 | Rev 1622 | ||
---|---|---|---|
Line 26... | Line 26... | ||
26 | #define Poti6 Poti[5] |
26 | #define Poti6 Poti[5] |
27 | #define Poti7 Poti[6] |
27 | #define Poti7 Poti[6] |
28 | #define Poti8 Poti[7] |
28 | #define Poti8 Poti[7] |
Line 29... | Line -... | ||
29 | - | ||
30 | - | ||
31 | #define CHECK_MIN_MAX(wert,min,max) {if(wert < min) wert = min; else if(wert > max) wert = max;} |
29 | |
32 | 30 | ||
33 | extern volatile unsigned char FCFlags; |
31 | extern volatile unsigned char FCFlags; |
34 | extern volatile unsigned int I2CTimeout; |
32 | extern volatile unsigned int I2CTimeout; |
35 | extern unsigned char Sekunde,Minute; |
33 | extern unsigned char Sekunde,Minute; |
Line 63... | Line 61... | ||
63 | extern unsigned char Parameter_UserParam1,Parameter_UserParam2,Parameter_UserParam3,Parameter_UserParam4,Parameter_UserParam5,Parameter_UserParam6,Parameter_UserParam7,Parameter_UserParam8; |
61 | extern unsigned char Parameter_UserParam1,Parameter_UserParam2,Parameter_UserParam3,Parameter_UserParam4,Parameter_UserParam5,Parameter_UserParam6,Parameter_UserParam7,Parameter_UserParam8; |
64 | extern int NaviAccNick,NaviAccRoll,NaviCntAcc; |
62 | extern int NaviAccNick,NaviAccRoll,NaviCntAcc; |
65 | extern unsigned int modell_fliegt; |
63 | extern unsigned int modell_fliegt; |
66 | void MotorRegler(void); |
64 | void MotorRegler(void); |
67 | void SendMotorData(void); |
65 | void SendMotorData(void); |
68 | void CalibrierMittelwert(void); |
66 | //void CalibrierMittelwert(void); |
69 | void Mittelwert(void); |
67 | //void Mittelwert(void); |
70 | void SetNeutral(void); |
68 | void SetNeutral(unsigned char AccAdjustment); |
71 | void Piep(unsigned char Anzahl, unsigned int dauer); |
69 | void Piep(unsigned char Anzahl, unsigned int dauer); |
Line 72... | Line 70... | ||
72 | 70 | ||
73 | extern unsigned char h,m,s; |
71 | extern unsigned char h,m,s; |
74 | extern volatile unsigned char Timeout ; |
72 | extern volatile unsigned char Timeout ; |
75 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
73 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
76 | extern int DiffNick,DiffRoll; |
74 | extern int DiffNick,DiffRoll; |
77 | //extern int Poti1, Poti2, Poti3, Poti4; |
75 | //extern int Poti1, Poti2, Poti3, Poti4; |
78 | extern volatile unsigned char SenderOkay; |
76 | extern volatile unsigned char SenderOkay; |
79 | extern int StickNick,StickRoll,StickGier; |
77 | extern int StickNick,StickRoll,StickGier; |
80 | extern char MotorenEin; |
- | |
81 | extern void DefaultKonstanten1(void); |
- | |
82 | extern void DefaultKonstanten2(void); |
78 | extern char MotorenEin; |
83 | extern void DefaultKonstanten3(void); |
- | |
84 | extern void DefaultStickMapping(void); |
79 | extern unsigned char RequiredMotors; |
85 | extern unsigned char Parameter_Servo3,Parameter_Servo4,Parameter_Servo5; |
80 | extern unsigned char Parameter_Servo3,Parameter_Servo4,Parameter_Servo5; |
Line 86... | Line -... | ||
86 | extern char VarioCharacter; |
- | |
87 | - | ||
88 | - | ||
89 | #define STRUCT_PARAM_LAENGE sizeof(EE_Parameter) |
- | |
90 | struct mk_param_struct |
- | |
91 | { |
- | |
92 | unsigned char Kanalbelegung[12]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3 |
- | |
93 | unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv |
- | |
94 | unsigned char Hoehe_MinGas; // Wert : 0-100 |
- | |
95 | unsigned char Luftdruck_D; // Wert : 0-250 |
- | |
96 | unsigned char MaxHoehe; // Wert : 0-32 |
- | |
97 | unsigned char Hoehe_P; // Wert : 0-32 |
- | |
98 | unsigned char Hoehe_Verstaerkung; // Wert : 0-50 |
- | |
99 | unsigned char Hoehe_ACC_Wirkung; // Wert : 0-250 |
- | |
100 | unsigned char Hoehe_HoverBand; // Wert : 0-250 |
- | |
101 | unsigned char Hoehe_GPS_Z; // Wert : 0-250 |
- | |
102 | unsigned char Hoehe_StickNeutralPoint;// Wert : 0-250 |
- | |
103 | unsigned char Stick_P; // Wert : 1-6 |
- | |
104 | unsigned char Stick_D; // Wert : 0-64 |
- | |
105 | unsigned char Gier_P; // Wert : 1-20 |
- | |
106 | unsigned char Gas_Min; // Wert : 0-32 |
- | |
107 | unsigned char Gas_Max; // Wert : 33-250 |
- | |
108 | unsigned char GyroAccFaktor; // Wert : 1-64 |
- | |
109 | unsigned char KompassWirkung; // Wert : 0-32 |
- | |
110 | unsigned char Gyro_P; // Wert : 10-250 |
- | |
111 | unsigned char Gyro_I; // Wert : 0-250 |
- | |
112 | unsigned char Gyro_D; // Wert : 0-250 |
- | |
113 | unsigned char Gyro_Gier_P; // Wert : 10-250 |
- | |
114 | unsigned char Gyro_Gier_I; // Wert : 0-250 |
- | |
115 | unsigned char UnterspannungsWarnung; // Wert : 0-250 |
- | |
116 | unsigned char NotGas; // Wert : 0-250 //Gaswert bei Empängsverlust |
- | |
117 | unsigned char NotGasZeit; // Wert : 0-250 // Zeitbis auf NotGas geschaltet wird, wg. Rx-Problemen |
- | |
118 | unsigned char Receiver; // 0= Summensignal, 1= Spektrum, 2 =Jeti, 3=ACT DSL, 4=ACT S3D |
- | |
119 | unsigned char I_Faktor; // Wert : 0-250 |
- | |
120 | unsigned char UserParam1; // Wert : 0-250 |
- | |
121 | unsigned char UserParam2; // Wert : 0-250 |
- | |
122 | unsigned char UserParam3; // Wert : 0-250 |
- | |
123 | unsigned char UserParam4; // Wert : 0-250 |
- | |
124 | unsigned char ServoNickControl; // Wert : 0-250 // Stellung des Servos |
- | |
125 | unsigned char ServoNickComp; // Wert : 0-250 // Einfluss Gyro/Servo |
- | |
126 | unsigned char ServoNickMin; // Wert : 0-250 // Anschlag |
- | |
127 | unsigned char ServoNickMax; // Wert : 0-250 // Anschlag |
- | |
128 | //--- Seit V0.75 |
- | |
129 | unsigned char ServoRollControl; // Wert : 0-250 // Stellung des Servos |
- | |
130 | unsigned char ServoRollComp; // Wert : 0-250 |
- | |
131 | unsigned char ServoRollMin; // Wert : 0-250 |
- | |
132 | unsigned char ServoRollMax; // Wert : 0-250 |
- | |
133 | //--- |
- | |
134 | unsigned char ServoNickRefresh; // Speed of the Servo |
- | |
135 | unsigned char Servo3; // Value or mapping of the Servo Output |
- | |
136 | unsigned char Servo4; // Value or mapping of the Servo Output |
- | |
137 | unsigned char Servo5; // Value or mapping of the Servo Output |
- | |
138 | unsigned char LoopGasLimit; // Wert: 0-250 max. Gas während Looping |
- | |
139 | unsigned char LoopThreshold; // Wert: 0-250 Schwelle für Stickausschlag |
- | |
140 | unsigned char LoopHysterese; // Wert: 0-250 Hysterese für Stickausschlag |
- | |
141 | unsigned char AchsKopplung1; // Wert: 0-250 Faktor, mit dem Gier die Achsen Roll und Nick koppelt (NickRollMitkopplung) |
- | |
142 | unsigned char AchsKopplung2; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden |
- | |
143 | unsigned char CouplingYawCorrection; // Wert: 0-250 Faktor, mit dem Nick und Roll verkoppelt werden |
- | |
144 | unsigned char WinkelUmschlagNick; // Wert: 0-250 180°-Punkt |
- | |
145 | unsigned char WinkelUmschlagRoll; // Wert: 0-250 180°-Punkt |
- | |
146 | unsigned char GyroAccAbgleich; // 1/k (Koppel_ACC_Wirkung) |
- | |
147 | unsigned char Driftkomp; |
- | |
148 | unsigned char DynamicStability; |
- | |
149 | unsigned char UserParam5; // Wert : 0-250 |
- | |
150 | unsigned char UserParam6; // Wert : 0-250 |
- | |
151 | unsigned char UserParam7; // Wert : 0-250 |
- | |
152 | unsigned char UserParam8; // Wert : 0-250 |
- | |
153 | //---Output --------------------------------------------- |
- | |
154 | unsigned char J16Bitmask; // for the J16 Output |
- | |
155 | unsigned char J16Timing; // for the J16 Output |
- | |
156 | unsigned char J17Bitmask; // for the J17 Output |
- | |
157 | unsigned char J17Timing; // for the J17 Output |
- | |
158 | // seit version V0.75c |
- | |
159 | unsigned char WARN_J16_Bitmask; // for the J16 Output |
- | |
160 | unsigned char WARN_J17_Bitmask; // for the J17 Output |
- | |
161 | //---NaviCtrl--------------------------------------------- |
- | |
162 | unsigned char NaviGpsModeControl; // Parameters for the Naviboard |
- | |
163 | unsigned char NaviGpsGain; |
- | |
164 | unsigned char NaviGpsP; |
- | |
165 | unsigned char NaviGpsI; |
- | |
166 | unsigned char NaviGpsD; |
- | |
167 | unsigned char NaviGpsPLimit; |
- | |
168 | unsigned char NaviGpsILimit; |
- | |
169 | unsigned char NaviGpsDLimit; |
- | |
170 | unsigned char NaviGpsACC; |
- | |
171 | unsigned char NaviGpsMinSat; |
- | |
172 | unsigned char NaviStickThreshold; |
- | |
173 | unsigned char NaviWindCorrection; |
- | |
174 | unsigned char NaviSpeedCompensation; |
- | |
175 | unsigned char NaviOperatingRadius; |
- | |
176 | unsigned char NaviAngleLimitation; |
- | |
177 | unsigned char NaviPH_LoginTime; |
- | |
178 | //---Ext.Ctrl--------------------------------------------- |
- | |
179 | unsigned char ExternalControl; // for serial Control |
- | |
180 | //------------------------------------------------ |
- | |
181 | unsigned char BitConfig; // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt |
- | |
182 | unsigned char ServoCompInvert; // // 0x01 = Nick, 0x02 = Roll 0 oder 1 // WICHTIG!!! am Ende lassen |
- | |
183 | unsigned char ExtraConfig; // bitcodiert |
- | |
184 | char Name[12]; |
- | |
185 | }; |
- | |
186 | - | ||
187 | struct |
- | |
188 | { |
- | |
189 | char Revision; |
- | |
190 | char Name[12]; |
- | |
191 | signed char Motor[16][4]; |
- | |
192 | } Mixer; |
81 | extern char VarioCharacter; |
193 | 82 | ||
194 | extern struct mk_param_struct EE_Parameter; |
83 | |
195 | extern unsigned char Parameter_Luftdruck_D; |
84 | extern unsigned char Parameter_Luftdruck_D; |
196 | extern unsigned char Parameter_MaxHoehe; |
85 | extern unsigned char Parameter_MaxHoehe; |