Subversion Repositories FlightCtrl

Rev

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

Rev 1054 Rev 1055
Line 283... Line 283...
283
// --------------------------------------------------------------------------
283
// --------------------------------------------------------------------------
284
void BearbeiteRxDaten(void)
284
void BearbeiteRxDaten(void)
285
{
285
{
286
 if(!NeuerDatensatzEmpfangen) return;
286
 if(!NeuerDatensatzEmpfangen) return;
Line 287... Line 287...
287
 
287
 
288
        switch(RxdBuffer[1]) // check for Slave Address
288
        switch(RxdBuffer[1]-'a') // check for Slave Address
289
        {
289
        {
290
                case FC_ADDRESS: // FC special commands
290
                case FC_ADDRESS: // FC special commands
291
                Decode64(); // dekodiere datenblock im Empfangsbuffer
291
                Decode64(); // dekodiere datenblock im Empfangsbuffer
292
                switch(RxdBuffer[2])
292
                switch(RxdBuffer[2])
Line 369... Line 369...
369
                                        ConfirmFrame = ExternControl.Frame;
369
                                        ConfirmFrame = ExternControl.Frame;
370
                                        PcZugriff = 255;
370
                                        PcZugriff = 255;
371
                                        break;
371
                                        break;
372
                        case 'd': // Poll the debug data
372
                        case 'd': // Poll the debug data
373
                                        DebugDataIntervall = pRxData[0] * 10;
373
                                        DebugDataIntervall = pRxData[0] * 10;
374
                                        if (DebugDataIntervall) DebugDataAnforderung = 1;
374
                                        if (DebugDataIntervall>0) DebugDataAnforderung = 1;
375
                                        break;
375
                                        break;
Line 376... Line 376...
376
 
376
 
377
                        case 'h':// x-1 Displayzeilen
377
                        case 'h':// x-1 Displayzeilen
378
                                        RemoteKeys |= pRxData[0];
378
                                        RemoteKeys |= pRxData[0];
Line 474... Line 474...
474
                  WinkelOut.UserParameter[1] = Parameter_UserParam2;
474
                  WinkelOut.UserParameter[1] = Parameter_UserParam2;
475
          SendOutData('w', MK3MAG_ADDRESS, 1, (unsigned char *) &WinkelOut,sizeof(WinkelOut));
475
          SendOutData('w', MK3MAG_ADDRESS, 1, (unsigned char *) &WinkelOut,sizeof(WinkelOut));
476
          if(WinkelOut.CalcState > 4)  WinkelOut.CalcState = 6; // wird dann in SPI auf Null gesetzt
476
          if(WinkelOut.CalcState > 4)  WinkelOut.CalcState = 6; // wird dann in SPI auf Null gesetzt
477
          Kompass_Timer = SetDelay(99);
477
          Kompass_Timer = SetDelay(99);
478
         }
478
         }
479
    if((( DebugDataIntervall && CheckDelay(Debug_Timer)) || DebugDataAnforderung) && UebertragungAbgeschlossen)
479
    if((( DebugDataIntervall>0 && CheckDelay(Debug_Timer)) || DebugDataAnforderung) && UebertragungAbgeschlossen)
480
         {
480
         {
481
          SendOutData('D', FC_ADDRESS, 1, (unsigned char *) &DebugOut,sizeof(DebugOut));
481
          SendOutData('D', FC_ADDRESS, 1, (unsigned char *) &DebugOut,sizeof(DebugOut));
482
          DebugDataAnforderung = 0;
482
          DebugDataAnforderung = 0;
483
          if(DebugDataIntervall) Debug_Timer = SetDelay(DebugDataIntervall);
483
          if(DebugDataIntervall>0) Debug_Timer = SetDelay(DebugDataIntervall);
484
         }
484
         }
485
    if(DebugTextAnforderung != 255) // Texte für die Analogdaten
485
    if(DebugTextAnforderung != 255) // Texte für die Analogdaten
486
     {
486
     {
487
      SendOutData('A', FC_ADDRESS, 2, (unsigned char *)&DebugTextAnforderung, sizeof(DebugTextAnforderung),(unsigned char *) ANALOG_TEXT[DebugTextAnforderung], 16);
487
      SendOutData('A', FC_ADDRESS, 2, (unsigned char *)&DebugTextAnforderung, sizeof(DebugTextAnforderung),(unsigned char *) ANALOG_TEXT[DebugTextAnforderung], 16);
488
      DebugTextAnforderung = 255;
488
      DebugTextAnforderung = 255;