Rev 683 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 683 | Rev 685 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | // + www.MikroKopter.com |
4 | // + www.MikroKopter.com |
5 | // + see the File "License.txt" for further Informations |
5 | // + see the File "License.txt" for further Informations |
6 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
6 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
Line 7... | Line 7... | ||
7 | 7 | ||
- | 8 | #include "main.h" |
|
- | 9 | #include "menu.h" |
|
8 | #include "main.h" |
10 | #include "timer0.h" |
- | 11 | #include "uart.h" |
|
- | 12 | #include "fc.h" |
|
- | 13 | #include "_Settings.h" |
|
- | 14 | #include "rc.h" |
|
Line 9... | Line 15... | ||
9 | #include "uart.h" |
15 | |
10 | 16 | ||
11 | unsigned char DebugGetAnforderung = 0,DebugDisplayAnforderung = 0,DebugDataAnforderung = 0,GetVersionAnforderung = 0; |
17 | unsigned char DebugGetAnforderung = 0,DebugDisplayAnforderung = 0,DebugDataAnforderung = 0,GetVersionAnforderung = 0; |
12 | unsigned volatile char SioTmp = 0; |
18 | unsigned volatile char SioTmp = 0; |
Line 293... | Line 299... | ||
293 | Decode64((uint8_t *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
299 | Decode64((uint8_t *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
294 | DebugTextAnforderung = tmp_char_arr2[0]; |
300 | DebugTextAnforderung = tmp_char_arr2[0]; |
295 | break; |
301 | break; |
296 | case 'b': |
302 | case 'b': |
297 | Decode64((uint8_t *) &ExternControl,sizeof(ExternControl),3,AnzahlEmpfangsBytes); |
303 | Decode64((uint8_t *) &ExternControl,sizeof(ExternControl),3,AnzahlEmpfangsBytes); |
298 | RemoteTasten |= ExternControl.RemoteTasten; |
304 | RemoteButtons |= ExternControl.RemoteButtons; |
299 | ConfirmFrame = ExternControl.Frame; |
305 | ConfirmFrame = ExternControl.Frame; |
300 | break; |
306 | break; |
301 | case 'c': |
307 | case 'c': |
302 | Decode64((uint8_t *) &ExternControl,sizeof(ExternControl),3,AnzahlEmpfangsBytes); |
308 | Decode64((uint8_t *) &ExternControl,sizeof(ExternControl),3,AnzahlEmpfangsBytes); |
303 | RemoteTasten |= ExternControl.RemoteTasten; |
309 | RemoteButtons |= ExternControl.RemoteButtons; |
304 | ConfirmFrame = ExternControl.Frame; |
310 | ConfirmFrame = ExternControl.Frame; |
305 | DebugDataAnforderung = 1; |
311 | DebugDataAnforderung = 1; |
306 | break; |
312 | break; |
307 | case 'h':// x-1 Displayzeilen |
313 | case 'h':// x-1 Displayzeilen |
308 | Decode64((uint8_t *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
314 | Decode64((uint8_t *) &tmp_char_arr2[0],sizeof(tmp_char_arr2),3,AnzahlEmpfangsBytes); |
309 | RemoteTasten |= tmp_char_arr2[0]; |
315 | RemoteButtons |= tmp_char_arr2[0]; |
310 | if(tmp_char_arr2[1] == 255) NurKanalAnforderung = 1; else NurKanalAnforderung = 0; // keine Displaydaten |
316 | if(tmp_char_arr2[1] == 255) NurKanalAnforderung = 1; else NurKanalAnforderung = 0; // keine Displaydaten |
311 | DebugDisplayAnforderung = 1; |
317 | DebugDisplayAnforderung = 1; |
312 | break; |
318 | break; |
313 | case 't':// Motortest |
319 | case 't':// Motortest |
314 | Decode64((uint8_t *) &MotorTest[0],sizeof(MotorTest),3,AnzahlEmpfangsBytes); |
320 | Decode64((uint8_t *) &MotorTest[0],sizeof(MotorTest),3,AnzahlEmpfangsBytes); |
Line 413... | Line 419... | ||
413 | ConfirmFrame = 0; |
419 | ConfirmFrame = 0; |
414 | UDR0 = txd_buffer[0]; |
420 | UDR0 = txd_buffer[0]; |
415 | } |
421 | } |
416 | if(DebugDisplayAnforderung && UebertragungAbgeschlossen) |
422 | if(DebugDisplayAnforderung && UebertragungAbgeschlossen) |
417 | { |
423 | { |
418 | Menu(); |
424 | LCD_PrintMenu(); |
419 | DebugDisplayAnforderung = 0; |
425 | DebugDisplayAnforderung = 0; |
420 | if(++RemotePollDisplayLine == 4 || NurKanalAnforderung) |
426 | if(++RemotePollDisplayLine == 4 || NurKanalAnforderung) |
421 | { |
427 | { |
422 | SendOutData('4',0,(uint8_t *)&PPM_in,sizeof(PPM_in)); // DisplayZeile übertragen |
428 | SendOutData('4',0,(uint8_t *)&PPM_in,sizeof(PPM_in)); // DisplayZeile übertragen |
423 | RemotePollDisplayLine = -1; |
429 | RemotePollDisplayLine = -1; |