Attachment 'MK_FC0.82b_cyphy.patch'
Download 1 diff -ur ./V0.82b_orig//fc.c ./V0.82b_cyphy//fc.c
2 --- ./V0.82b_orig//fc.c 2011-08-16 16:58:27.000000000 +1000
3 +++ ./V0.82b_cyphy//fc.c 2011-06-21 11:54:11.000000000 +1000
4 @@ -78,6 +78,7 @@
5 long SummeNick=0,SummeRoll=0;
6 volatile long Mess_Integral_Hoch = 0;
7 int KompassValue = 0;
8 +int ExternOn =0;
9 int KompassStartwert = 0;
10 int KompassRichtung = 0;
11 unsigned int KompassSignalSchlecht = 500;
12 @@ -164,6 +165,10 @@
13 #define LIMIT_MAX(value, max) {if(value >= max) value = max;}
14 #define LIMIT_MIN_MAX(value, min, max) {if(value <= min) value = min; else if(value >= max) value = max;}
15
16 +signed int My_Pitch;
17 +signed int My_Roll;
18 +
19 +
20
21 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22 // Debugwerte zuordnen
23 @@ -176,20 +181,35 @@
24 DebugOut.Analog[3] = Mittelwert_AccRoll / 4;
25 DebugOut.Analog[4] = (signed int) AdNeutralGier - AdWertGier;
26 DebugOut.Analog[5] = HoehenWert/5;
27 - DebugOut.Analog[6] = AdWertAccHoch;//(Mess_Integral_Hoch / 512);// Aktuell_az;
28 - DebugOut.Analog[8] = KompassValue;
29 - DebugOut.Analog[9] = UBat;
30 + //DebugOut.Analog[5] = StickGas;
31 + DebugOut.Analog[11] = AdWertAccHoch;//(Mess_Integral_Hoch / 512);// Aktuell_az; AD value acc high
32 + DebugOut.Analog[6] = Aktuell_az; //AD value acc high
33 +
34 + DebugOut.Analog[8] = UBat;
35 + //DebugOut.Analog[8] = ExternOn;
36 + //DebugOut.Analog[9] = UBat;
37 + DebugOut.Analog[9] = StickGas;
38 + //DebugOut.Analog[9] = 100;
39 +
40 DebugOut.Analog[10] = SenderOkay;
41 - DebugOut.Analog[11] = ErsatzKompass / GIER_GRAD_FAKTOR;
42 +// DebugOut.Analog[11] = ErsatzKompass / GIER_GRAD_FAKTOR;
43 DebugOut.Analog[12] = Motor[0].SetPoint;
44 DebugOut.Analog[13] = Motor[1].SetPoint;
45 DebugOut.Analog[14] = Motor[2].SetPoint;
46 DebugOut.Analog[15] = Motor[3].SetPoint;
47 - DebugOut.Analog[20] = ServoNickValue;
48 + //DebugOut.Analog[20] = ServoNickValue;
49 + DebugOut.Analog[20] = UBat;
50 DebugOut.Analog[22] = Capacity.ActualCurrent;
51 - DebugOut.Analog[23] = Capacity.UsedCapacity;
52 + //DebugOut.Analog[23] = Capacity.UsedCapacity;
53 +
54 // DebugOut.Analog[22] = FromNaviCtrl_Value.GpsZ;
55 // DebugOut.Analog[29] = FromNaviCtrl_Value.SerialDataOkay;
56 + DebugOut.Analog[23] = StickGier;
57 + DebugOut.Analog[24] = StickNick;
58 + DebugOut.Analog[25] = StickRoll;
59 +
60 +
61 +
62 DebugOut.Analog[29] = Capacity.MinOfMaxPWM;
63 DebugOut.Analog[30] = GPS_Nick;
64 DebugOut.Analog[31] = GPS_Roll;
65 @@ -368,9 +388,9 @@
66 static signed long tmpl,tmpl2,tmpl3,tmpl4;
67 static signed int oldNick, oldRoll, d2Roll, d2Nick;
68 signed long winkel_nick, winkel_roll;
69 - unsigned char i;
70 MesswertGier = (signed int) AdNeutralGier - AdWertGier;
71 MesswertNick = (signed int) AdWertNickFilter / 8;
72 +// printf("MesswertNick=%d\r\n",MesswertNick);
73 MesswertRoll = (signed int) AdWertRollFilter / 8;
74 RohMesswertNick = MesswertNick;
75 RohMesswertRoll = MesswertRoll;
76 @@ -643,7 +663,7 @@
77 static char NeueKompassRichtungMerken = 0;
78 static long ausgleichNick, ausgleichRoll;
79 int IntegralNickMalFaktor,IntegralRollMalFaktor;
80 - unsigned char i;
81 + unsigned long i=0;
82 Mittelwert();
83 GRN_ON;
84 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
85 @@ -828,9 +848,13 @@
86 if(!NewPpmData-- || (FC_StatusFlags & FC_STATUS_EMERGENCY_LANDING))
87 {
88 static int stick_nick,stick_roll;
89 + static int extern_stick_nick,extern_stick_roll;
90 + static struct str_error previous_error;
91 ParameterZuordnung();
92 stick_nick = (stick_nick * 3 + PPM_in[EE_Parameter.Kanalbelegung[K_NICK]] * EE_Parameter.Stick_P) / 4;
93 stick_nick += PPM_diff[EE_Parameter.Kanalbelegung[K_NICK]] * EE_Parameter.Stick_D;
94 +// printf("PPM_diff[EE_Parameter.Kanalbelegung[K_NICK]] = %d\r\n",PPM_diff[EE_Parameter.Kanalbelegung[K_NICK]]);
95 +// printf("stick_nick =%d\r\n",stick_nick);
96 stick_roll = (stick_roll * 3 + PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]] * EE_Parameter.Stick_P) / 4;
97 stick_roll += PPM_diff[EE_Parameter.Kanalbelegung[K_ROLL]] * EE_Parameter.Stick_D;
98
99 @@ -851,8 +875,37 @@
100 FromNC_Rotate_S = sintab[EE_Parameter.OrientationAngle];
101 StickNick = ((FromNC_Rotate_C * stick_nick) + (FromNC_Rotate_S * stick_roll)) / 8;
102 StickRoll = ((FromNC_Rotate_C * stick_roll) - (FromNC_Rotate_S * stick_nick)) / 8;
103 +// printf("stick_nick = %d stick_Roll=%d\r\n",StickNick,StickRoll);
104 }
105
106 +
107 +//=============================================================================================
108 +// Simple PD Position control part by enddl22 Jan.10.2011
109 +//=============================================================================================
110 +
111 +#if 0
112 +
113 + error.y = CurrentPosition.y-TargetPosition.y;
114 + error.x = CurrentPosition.x-TargetPosition.x;
115 + My_Pitch = MY_PITCH_P*(CurrentPosition.y-TargetPosition.y)+MY_PITCH_D*(error.y-previous_error.y);
116 + My_Roll = MY_ROLL_P*(CurrentPosition.x-TargetPosition.x)+MY_ROLL_D*(error.x-previous_error.x);
117 +
118 + My_Pitch = My_Pitch/PITCH_SCALE;
119 + My_Roll = My_Roll/PITCH_SCALE;
120 +
121 + //printf("My_Pitch = %d My_Roll =%d \n\r",My_Pitch,My_Roll);
122 +
123 +
124 + previous_error = error;
125 +
126 + StickNick -= My_Pitch;
127 + StickRoll += My_Roll;
128 +
129 +#endif
130 +
131 +//=============================================================================================
132 +
133 +
134 StickGier = -PPM_in[EE_Parameter.Kanalbelegung[K_GIER]];
135 if(StickGier > 2) StickGier -= 2; else
136 if(StickGier < -2) StickGier += 2; else StickGier = 0;
137 @@ -861,22 +914,91 @@
138 StickRoll -= (GPS_Roll + GPS_Roll2);
139 StickGas = PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] + 120;
140
141 + //printf("StickNick =%d\r\n",StickNick);
142 +
143 GyroFaktor = (Parameter_Gyro_P + 10.0);
144 IntegralFaktor = Parameter_Gyro_I;
145 GyroFaktorGier = (Parameter_Gyro_Gier_P + 10.0);
146 IntegralFaktorGier = Parameter_Gyro_Gier_I;
147
148 + //StickNick += (int) ExternControl.Nick * (int) EE_Parameter.Stick_P;
149 + //StickRoll += (int) ExternControl.Roll * (int) EE_Parameter.Stick_P;
150 +
151 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
152 //+ Analoge Steuerung per Seriell
153 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
154 - if(ExternControl.Config & 0x01 && Parameter_ExternalControl > 128)
155 +// if(ExternControl.Config & 0x01 && Parameter_ExternalControl > 128)
156 + if(PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] > 128)
157 +
158 +// if((ExternControl.Config ==1) && (PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] > 128))
159 {
160 +
161 + ExternOn =1; // to get the initial position of the stick_gas value in the air.
162 +//enddl22_21.12.2010[[
163 +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
164 +// Original code from Mikrokopter
165 +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
166 StickNick += (int) ExternControl.Nick * (int) EE_Parameter.Stick_P;
167 StickRoll += (int) ExternControl.Roll * (int) EE_Parameter.Stick_P;
168 +
169 +// StickNick += (int) ExternControl.Nick;
170 +// StickRoll += (int) ExternControl.Roll;
171 +
172 +
173 + // 2Bytes resolution nick/roll
174 + // printf("ExternControl.Nick=%\n\r",ExternControl.Nick);
175 + // printf("ExternControl.Roll=%\n\r",ExternControl.Roll);
176 + //enddl22_03.02.2011 Nick/Roll input data range extension -4096 ~ 4096.
177 + // The range was -128 ~ 128
178 +// printf("ExternControl.Nick=%d,ExternControl.Roll=%d\n\r",ExternControl.Nick,ExternControl.Roll);
179 +// printf("StickNick=%d,StickRoll=%d\n\r",StickNick,StickRoll);
180 +
181 + //StickNick += (int) ExternControl.Nick;
182 + //StickRoll += (int) ExternControl.Roll;
183 +
184 +// extern_stick_nick = (extern_stick_nick * 3 + (int) ExternControl.Nick * (EE_Parameter.Stick_P-2)) / 4;
185 +// extern_stick_nick += (ExternControl.Nick-post_ExternControl.Nick)* (EE_Parameter.Stick_D-4);
186 +// printf("Ext =%d , Ext diff = %d \r\n",ExternControl.Nick,ExternControl.Nick-post_ExternControl.Nick);
187 +
188 +// extern_stick_roll = (extern_stick_roll * 3 + (int) ExternControl.Roll * (EE_Parameter.Stick_P-2)) / 4;
189 +// extern_stick_roll += (ExternControl.Roll-post_ExternControl.Roll)* (EE_Parameter.Stick_D-4);
190 +
191 +// printf("ExtStickNick =%d , ExtStickRoll = %d \r\n",stick_ExternControl.Nick,ExternControl.Nick-post_ExternControl.Nick);
192 + #if 0
193 + stick_roll = (stick_roll * 3 + (int) ExternControl.Roll * EE_Parameter.Stick_P) / 4;
194 + stick_roll += PPM_diff[EE_Parameter.Kanalbelegung[K_ROLL]] * EE_Parameter.Stick_D;
195 + #endif
196 +
197 +// StickNick=extern_stick_nick;
198 +// StickRoll=extern_stick_roll;
199 +
200 +// printf("extern_stick_nick =%d , extern_stick_roll = %d \r\n",extern_stick_nick,extern_stick_roll);
201 +// post_ExternControl = ExternControl;
202 +//enddl22_21.12.2010]]
203 +
204 +#if 0
205 + printf("pitch=%d roll=%d yaw=%d height=%d \n",
206 + ExternControl.Nick,
207 + ExternControl.Roll,
208 + ExternControl.Gier,
209 + ExternControl.Hight);
210 +#endif
211 +
212 + //printf("GasMischanteil=%d PPM=%d\n",GasMischanteil , PPM_in[EE_Parameter.Kanalbelegung[K_GAS]]);
213 +
214 StickGier += ExternControl.Gier;
215 ExternHoehenValue = (int) ExternControl.Hight * (int)EE_Parameter.Hoehe_Verstaerkung;
216 - if(ExternControl.Gas < StickGas) StickGas = ExternControl.Gas;
217 + //StickGas = ExternControl.Gas;
218 +
219 + if(ExternControl.Gas>=130) StickGas = 130;
220 + if(ExternControl.Gas<=0) StickGas=0;
221 + StickGas = ExternControl.Gas;
222 +
223 + //if(ExternControl.Gas < StickGas) StickGas = ExternControl.Gas;
224 }
225 +
226 + else ExternOn =0;
227 +
228 if(StickGas < 0) StickGas = 0;
229
230 if(EE_Parameter.GlobalConfig & CFG_HEADING_HOLD) IntegralFaktor = 0;
231 @@ -1280,7 +1402,8 @@
232 // Die Höhenregelung schwächt lediglich das Gas ab, erhöht es allerdings nicht
233 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
234 if(UBat > BattLowVoltageWarning) GasMischanteil = ((unsigned int)GasMischanteil * BattLowVoltageWarning) / UBat; // Gas auf das aktuelle Spannungvieveau beziehen
235 - GasMischanteil *= STICK_GAIN;
236 +// GasMischanteil *= STICK_GAIN;
237 + GasMischanteil *= 1;
238 // if height control is activated
239 if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG) && !(Looping_Roll || Looping_Nick)) // Höhenregelung
240 {
241 @@ -1626,6 +1749,7 @@
242 LIMIT_MIN(GasMischanteil, (MIN_GAS + 10) * STICK_GAIN);
243 if(GasMischanteil > (MAX_GAS - 20) * STICK_GAIN) GasMischanteil = (MAX_GAS - 20) * STICK_GAIN;
244
245 +//printf("MIN_GAS=%d MAX_GAS=%d \n",MIN_GAS,MAX_GAS);
246 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
247 // all BL-Ctrl connected?
248 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
249 @@ -1638,7 +1762,8 @@
250 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
251 // + Mischer und PI-Regler
252 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
253 - DebugOut.Analog[7] = GasMischanteil;
254 + DebugOut.Analog[7] = GasMischanteil; // Gas Mixer Input
255 + //printf("GasMischanteil=%d\n",GasMischanteil);
256 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
257 // Gier-Anteil
258 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
259 diff -ur ./V0.82b_orig//fc.h ./V0.82b_cyphy//fc.h
260 --- ./V0.82b_orig//fc.h 2011-08-16 16:58:27.000000000 +1000
261 +++ ./V0.82b_cyphy//fc.h 2011-01-11 16:21:41.000000000 +1000
262 @@ -22,6 +22,27 @@
263
264 extern volatile unsigned char FC_StatusFlags;
265
266 +//[[ enddl22_0110.2011
267 +#define MY_PITCH_P 50
268 +#define MY_PITCH_D 25
269 +#define MY_ROLL_P 50
270 +#define MY_ROLL_D 25
271 +
272 +#define PITCH_SCALE 255
273 +#define ROLL_SCALE 255
274 +
275 +struct str_error
276 +{
277 + int x;
278 + int y;
279 + int yaw;
280 +};
281 +struct str_error error;
282 +
283 +
284 +
285 +//]]
286 +
287
288 #define Poti1 Poti[0]
289 #define Poti2 Poti[1]
290 diff -ur ./V0.82b_orig//GPS.c ./V0.82b_cyphy//GPS.c
291 --- ./V0.82b_orig//GPS.c 2011-08-16 16:58:27.000000000 +1000
292 +++ ./V0.82b_cyphy//GPS.c 2011-01-10 23:06:21.000000000 +1000
293 @@ -8,6 +8,7 @@
294
295 signed int GPS_Nick = 0;
296 signed int GPS_Roll = 0;
297 +
298 signed int GPS_Nick2 = 0;
299 signed int GPS_Roll2 = 0;
300 long GpsAktuell_X = 0;
301 Only in ./V0.82b_orig/: License.txt
302 Only in ./V0.82b_cyphy/: LICENSE.TXT
303 diff -ur ./V0.82b_orig//main.c ./V0.82b_cyphy//main.c
304 --- ./V0.82b_orig//main.c 2011-08-16 16:58:27.000000000 +1000
305 +++ ./V0.82b_cyphy//main.c 2011-03-10 17:40:48.000000000 +1000
306 @@ -141,6 +141,19 @@
307 WDTCSR |= (1<<WDCE)|(1<<WDE);
308 WDTCSR = 0;
309
310 + TargetPosition.x =0;
311 + TargetPosition.y =0;
312 + TargetPosition.yaw =0;
313 +
314 + CurrentPosition.x =0;
315 + CurrentPosition.y =0;
316 + CurrentPosition.yaw =0;
317 +
318 + PostPosition.x =0;
319 + PostPosition.y =0;
320 + PostPosition.yaw =0;
321 +
322 +
323 beeptime = 2500;
324 StickGier = 0; PPM_in[K_GAS] = 0; StickRoll = 0; StickNick = 0;
325 if(PlatinenVersion >= 20) GIER_GRAD_FAKTOR = 1220; else GIER_GRAD_FAKTOR = 1291; // unterschiedlich für ME und ENC
326 @@ -328,9 +341,11 @@
327 else
328 {
329 ExternControl.Config = 0;
330 + ExternControl.Gas = 0;
331 ExternStickNick = 0;
332 ExternStickRoll = 0;
333 ExternStickGier = 0;
334 +
335 if(BeepMuster == 0xffff && SenderOkay == 0)
336 {
337 beeptime = 15000;
338 diff -ur ./V0.82b_orig//makefile ./V0.82b_cyphy//makefile
339 --- ./V0.82b_orig//makefile 2011-08-16 16:58:27.000000000 +1000
340 +++ ./V0.82b_cyphy//makefile 2010-12-21 19:43:12.000000000 +1000
341 @@ -1,7 +1,7 @@
342 #--------------------------------------------------------------------
343 # MCU name
344 -#MCU = atmega1284p
345 -MCU = atmega644p
346 +MCU = atmega1284p
347 +#MCU = atmega644p
348 F_CPU = 20000000
349 #-------------------------------------------------------------------
350 VERSION_MAJOR = 0
351 diff -ur ./V0.82b_orig//uart.c ./V0.82b_cyphy//uart.c
352 --- ./V0.82b_orig//uart.c 2011-08-16 16:58:27.000000000 +1000
353 +++ ./V0.82b_cyphy//uart.c 2011-06-20 23:41:24.000000000 +1000
354 @@ -68,6 +68,9 @@
355 unsigned char ConfirmFrame;
356 struct str_DebugOut DebugOut;
357 struct str_ExternControl ExternControl;
358 +struct str_Position CurrentPosition;
359 +struct str_Position TargetPosition;
360 +struct str_Position PostPosition;
361 struct str_VersionInfo VersionInfo;
362 struct str_WinkelOut WinkelOut;
363 struct str_Data3D Data3D;
364 @@ -104,8 +107,8 @@
365 "Hovergas ",
366 "Current [0.1A] ",
367 "Capacity [mAh] ",
368 - "24 ",
369 - "25 ", //25
370 + "StickNick ",
371 + "StickRoll ", //25
372 "26 ",
373 "27 ",
374 "I2C-Error ",
375 @@ -335,7 +338,16 @@
376 {
377 case FC_ADDRESS: // FC special commands
378 switch(RxdBuffer[2])
379 +
380 +
381 {
382 + case 'e': // Retrieve the current position of the quadrotor.
383 + memcpy((unsigned char *)&CurrentPosition , (unsigned char *)pRxData, sizeof(CurrentPosition));
384 +// printf("FC_x=%d FC_y=%d FC_yaw=%d \r\n",CurrentPosition.x,CurrentPosition.y,CurrentPosition.yaw);
385 + // printf("FC_sizeof=%d , FC_sizeof CurrentPosition=%d\r\n",sizeof(CurrentPosition.x),sizeof(CurrentPosition));
386 +
387 + break;
388 +
389 case 'K':// Kompasswert
390 memcpy((unsigned char *)&KompassValue , (unsigned char *)pRxData, sizeof(KompassValue));
391 KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180;
392 @@ -554,6 +566,11 @@
393 break;
394 case 'b':
395 memcpy((unsigned char *)&ExternControl, (unsigned char *)pRxData, sizeof(ExternControl));
396 + //printf("Ext.Nick=%d Ext.Roll=%d,StickNick=%d,StickRoll=%d\n\r",ExternControl.Nick,ExternControl.Roll,StickNick,StickRoll);
397 + //GPS_Nick=ExternControl.Nick;
398 + //GPS_Roll=ExternControl.Roll;
399 +
400 +
401 ConfirmFrame = ExternControl.Frame;
402 PcZugriff = 255;
403 break;
404 @@ -568,7 +585,6 @@
405 if(DebugDataIntervall > 0) DebugDataAnforderung = 1;
406 AboTimeOut = SetDelay(ABO_TIMEOUT);
407 break;
408 -
409 case 'h':// x-1 Displayzeilen
410 PcZugriff = 255;
411 if((pRxData[0] & 0x80) == 0x00) // old format
412 @@ -667,6 +683,7 @@
413 Intervall3D = 0;
414 }
415
416 +#if 1
417 if(((Display_Interval>0 && CheckDelay(Display_Timer)) || DebugDisplayAnforderung) && UebertragungAbgeschlossen)
418 {
419 if(DisplayLine > 3)// new format
420 @@ -711,13 +728,17 @@
421 if(WinkelOut.CalcState > 4) WinkelOut.CalcState = 6; // wird dann in SPI auf Null gesetzt
422 Kompass_Timer = SetDelay(99);
423 }
424 + #endif
425 if(((DebugDataIntervall>0 && CheckDelay(Debug_Timer)) || DebugDataAnforderung) && UebertragungAbgeschlossen)
426 {
427 CopyDebugValues();
428 - SendOutData('D', FC_ADDRESS, 1, (unsigned char *) &DebugOut,sizeof(DebugOut));
429 + SendOutData('D', FC_ADDRESS, 1, (unsigned char *) &DebugOut,sizeof(DebugOut)-38);
430 +// SendOutData('D', FC_ADDRESS, 1, (unsigned char *) &DebugOut,sizeof(DebugOut)-18);
431 +
432 DebugDataAnforderung = 0;
433 if(DebugDataIntervall>0) Debug_Timer = SetDelay(DebugDataIntervall);
434 }
435 + #if 1
436 if(Intervall3D > 0 && CheckDelay(Timer3D) && UebertragungAbgeschlossen)
437 {
438 Data3D.Winkel[0] = (int) (IntegralNick / (EE_Parameter.GyroAccFaktor * 4)); // etwa in 0.1 Grad
439 @@ -756,6 +777,8 @@
440 }
441 #endif
442
443 +#endif
444 +
445 }
446
447
448 diff -ur ./V0.82b_orig//uart.h ./V0.82b_cyphy//uart.h
449 --- ./V0.82b_orig//uart.h 2011-08-16 16:58:27.000000000 +1000
450 +++ ./V0.82b_cyphy//uart.h 2011-06-21 00:12:29.000000000 +1000
451 @@ -49,6 +49,7 @@
452 };
453 extern struct str_Data3D Data3D;
454
455 +#if 0
456 struct str_ExternControl
457 {
458 unsigned char Digital[2];
459 @@ -62,8 +63,56 @@
460 unsigned char Frame;
461 unsigned char Config;
462 };
463 +#endif
464 +
465 +#if 0
466 +struct str_ExternControl
467 +{
468 + unsigned char Digital[2];
469 + unsigned char RemoteTasten;
470 + signed char Nick;
471 + signed char Roll;
472 + signed char Gier;
473 + unsigned char Gas;
474 + signed char Hight;
475 + unsigned char free;
476 + unsigned char Frame;
477 + unsigned char Config;
478 +};
479 +
480 +#endif
481 +
482 +struct str_ExternControl
483 +{
484 + unsigned int Gas;
485 + unsigned char Digital[2];
486 + unsigned char RemoteTasten;
487 + signed char Nick;
488 + signed char Roll;
489 + signed char Gier;
490 + unsigned char Hight;
491 + unsigned char free;
492 + unsigned char Frame;
493 + unsigned char Config;
494 + unsigned char dummy;
495 +};
496 +
497 +
498 +
499 extern struct str_ExternControl ExternControl;
500
501 +struct str_Position
502 +{
503 + int x;
504 + int y;
505 + int yaw;
506 +};
507 +extern struct str_Position CurrentPosition;
508 +extern struct str_Position TargetPosition;
509 +extern struct str_Position PostPosition;
510 +
511 +
512 +
513 // FC hardware errors
514
515 // bitmask for UART_VersionInfo_t.HardwareError[0]
516 @@ -102,6 +151,7 @@
517 //#define USART0_BAUD 28800
518 //#define USART0_BAUD 38400
519 #define USART0_BAUD 57600
520 +//#define USART0_BAUD 115200
521
522
523 #endif //_UART_H
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.