Subversion Repositories FlightCtrl

Rev

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

Rev 1391 Rev 1399
Line 39... Line 39...
39
struct str_ExternControl  ExternControl;
39
struct str_ExternControl  ExternControl;
40
struct str_VersionInfo VersionInfo;
40
struct str_VersionInfo VersionInfo;
41
struct str_WinkelOut WinkelOut;
41
struct str_WinkelOut WinkelOut;
42
struct str_Data3D Data3D;
42
struct str_Data3D Data3D;
Line 43... Line 43...
43
 
43
 
44
int Debug_Timer,Kompass_Timer,Timer3D;
44
int Display_Timer, Debug_Timer,Kompass_Timer,Timer3D;
Line 45... Line 45...
45
unsigned int DebugDataIntervall = 200, Intervall3D = 0;
45
unsigned int DebugDataIntervall = 200, Intervall3D = 0, Display_Interval = 0;
46
 
46
 
47
const unsigned char ANALOG_TEXT[32][16] =
47
const unsigned char ANALOG_TEXT[32][16] =
48
{
48
{
Line 410... Line 410...
410
                        case 'c': // Poll the 3D-Data
410
                        case 'c': // Poll the 3D-Data
411
                    if(!Intervall3D) { if(pRxData[0]) Timer3D = SetDelay(pRxData[0] * 10);}
411
                    if(!Intervall3D) { if(pRxData[0]) Timer3D = SetDelay(pRxData[0] * 10);}
412
                                        Intervall3D = pRxData[0] * 10;
412
                                        Intervall3D = pRxData[0] * 10;
413
                                        break;
413
                                        break;
414
                        case 'd': // Poll the debug data
414
                        case 'd': // Poll the debug data
415
                                        DebugDataIntervall = pRxData[0] * 10;
415
                                        DebugDataIntervall = (unsigned int)pRxData[0] * 10;
416
                                        if(DebugDataIntervall > 0) DebugDataAnforderung = 1;
416
                                        if(DebugDataIntervall > 0) DebugDataAnforderung = 1;
417
                                        break;
417
                                        break;
Line 418... Line 418...
418
 
418
 
419
                        case 'h':// x-1 Displayzeilen
419
                        case 'h':// x-1 Displayzeilen
-
 
420
                                PcZugriff = 255;
-
 
421
                                if((pRxData[0] & 0x80) == 0x00) // old format
-
 
422
                                        {
-
 
423
                                                DisplayLine = 2;
-
 
424
                                                Display_Interval = 0;
-
 
425
                                        }
-
 
426
                                        else // new format
420
                                PcZugriff = 255;
427
                                        {
-
 
428
                                                RemoteKeys |= ~pRxData[0];
421
                                        RemoteKeys |= pRxData[0];
429
                                                Display_Interval = (unsigned int)pRxData[1] * 10;
-
 
430
                                                DisplayLine = 4;
422
                                        if(RemoteKeys) DisplayLine = 0;
431
                                        }
423
                                        DebugDisplayAnforderung = 1;
432
                                        DebugDisplayAnforderung = 1;
Line 424... Line 433...
424
                                        break;
433
                                        break;
425
 
434
 
Line 503... Line 512...
503
//---------------------------------------------------------------------------------------------
512
//---------------------------------------------------------------------------------------------
504
void DatenUebertragung(void)
513
void DatenUebertragung(void)
505
{
514
{
506
 if(!UebertragungAbgeschlossen) return;
515
 if(!UebertragungAbgeschlossen) return;
Line 507... Line 516...
507
 
516
 
508
        if(DebugDisplayAnforderung && UebertragungAbgeschlossen)
517
        if(((Display_Interval>0 && CheckDelay(Display_Timer)) || DebugDisplayAnforderung) && UebertragungAbgeschlossen)
-
 
518
        {
-
 
519
                if(DisplayLine > 3)// new format
509
        {
520
                {
510
                Menu();
521
                        Menu();
-
 
522
                        SendOutData('H', FC_ADDRESS, 1, (uint8_t *)DisplayBuff, 80);
511
                SendOutData('H', FC_ADDRESS, 2, &DisplayLine, sizeof(DisplayLine), &DisplayBuff[DisplayLine * 20], 20);
523
                }
-
 
524
                else // old format
-
 
525
                {
-
 
526
                        LCD_printfxy(0,0,"!!! INCOMPATIBLE !!!");
512
                DisplayLine++;
527
                        SendOutData('H', FC_ADDRESS, 2, &DisplayLine, sizeof(DisplayLine), (uint8_t *)DisplayBuff, 20);
-
 
528
                        if(DisplayLine++ > 3) DisplayLine = 0;
-
 
529
                }
513
                if(DisplayLine >= 4) DisplayLine = 0;
530
                Display_Timer = SetDelay(Display_Interval);
514
                DebugDisplayAnforderung = 0;
531
                DebugDisplayAnforderung = 0;
515
        }
532
        }
516
        if(DebugDisplayAnforderung1 && UebertragungAbgeschlossen)
533
        if(DebugDisplayAnforderung1 && UebertragungAbgeschlossen)
517
        {
534
        {