Subversion Repositories FlightCtrl

Rev

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

Rev 1639 Rev 1654
Line 339... Line 339...
339
                    {
339
                    {
340
                                                tempchar1 = 0;
340
                                                tempchar1 = 0;
341
                                        }
341
                                        }
342
                                        while(!UebertragungAbgeschlossen);
342
                                        while(!UebertragungAbgeschlossen);
343
                                        SendOutData('M', FC_ADDRESS, 1, &tempchar1, sizeof(tempchar1));
343
                                        SendOutData('M', FC_ADDRESS, 1, &tempchar1, sizeof(tempchar1));
344
                                       
344
 
345
                                        break;
345
                                        break;
Line 346... Line 346...
346
 
346
 
347
                        case 'p': // get PPM Channels
347
                        case 'p': // get PPM Channels
348
                                        GetPPMChannelAnforderung = 1;
348
                                        GetPPMChannelAnforderung = 1;
Line 362... Line 362...
362
                                        ParamSet_ReadFromEEProm(pRxData[0]);
362
                                        ParamSet_ReadFromEEProm(pRxData[0]);
363
                                        tempchar1 = pRxData[0];
363
                                        tempchar1 = pRxData[0];
364
                                        while(!UebertragungAbgeschlossen);
364
                                        while(!UebertragungAbgeschlossen);
365
                                        SendOutData('Q', FC_ADDRESS, 2, &tempchar1, sizeof(tempchar1), (unsigned char *) &EE_Parameter, sizeof(EE_Parameter) - 1);
365
                                        SendOutData('Q', FC_ADDRESS, 2, &tempchar1, sizeof(tempchar1), (unsigned char *) &EE_Parameter, sizeof(EE_Parameter) - 1);
366
                                        Debug("Lese Setting %d", tempchar1);
366
                                        Debug("Lese Setting %d", tempchar1);
367
                                       
367
 
368
                                        break;
368
                                        break;
Line 369... Line 369...
369
 
369
 
370
                        case 's': // Parametersatz speichern
370
                        case 's': // Parametersatz speichern
371
                                        if((1 <= pRxData[0]) && (pRxData[0] <= 5) && (pRxData[1] == EEPARAM_REVISION)) // check for setting to be in range
371
                                        if((1 <= pRxData[0]) && (pRxData[0] <= 5) && (pRxData[1] == EEPARAM_REVISION)) // check for setting to be in range
Line 407... Line 407...
407
 
407
 
408
                switch(RxdBuffer[2])
408
                switch(RxdBuffer[2])
409
                {
409
                {
410
                        // 't' comand placed here only for compatibility to BL
410
                        // 't' comand placed here only for compatibility to BL
411
                        case 't':// Motortest
411
                        case 't':// Motortest
412
                                if(AnzahlEmpfangsBytes > 20) memcpy(&MotorTest[0], (unsigned char *)pRxData, sizeof(MotorTest));
412
                                if(AnzahlEmpfangsBytes > 10) memcpy(&MotorTest[0], (unsigned char *)pRxData, sizeof(MotorTest));
413
                                else memcpy(&MotorTest[0], (unsigned char *)pRxData, 4);
413
                                else memcpy(&MotorTest[0], (unsigned char *)pRxData, 4);
414
                                        while(!UebertragungAbgeschlossen);
414
                                        while(!UebertragungAbgeschlossen);
415
                                        SendOutData('T', MeineSlaveAdresse, 0);
415
                                        SendOutData('T', MeineSlaveAdresse, 0);
416
                                        PC_MotortestActive = 250;
416
                                        PC_MotortestActive = 250;
Line 613... Line 613...
613
     if(GetPPMChannelAnforderung && UebertragungAbgeschlossen)
613
     if(GetPPMChannelAnforderung && UebertragungAbgeschlossen)
614
     {
614
     {
615
                 SendOutData('P', FC_ADDRESS, 1, (unsigned char *) &PPM_in, sizeof(PPM_in));
615
                 SendOutData('P', FC_ADDRESS, 1, (unsigned char *) &PPM_in, sizeof(PPM_in));
616
                 GetPPMChannelAnforderung = 0;
616
                 GetPPMChannelAnforderung = 0;
617
         }
617
         }
618
         
618
 
619
#ifdef DEBUG                                                                                                                    // only include functions if DEBUG is defined
619
#ifdef DEBUG                                                                                                                    // only include functions if DEBUG is defined
620
     if(SendDebugOutput && UebertragungAbgeschlossen)
620
     if(SendDebugOutput && UebertragungAbgeschlossen)
621
     {
621
     {
622
                 SendOutData('0', FC_ADDRESS, 1, (unsigned char *) &tDebug, sizeof(tDebug));
622
                 SendOutData('0', FC_ADDRESS, 1, (unsigned char *) &tDebug, sizeof(tDebug));
623
                 SendDebugOutput = 0;
623
                 SendDebugOutput = 0;
624
         }
624
         }
625
#endif   
625
#endif
Line 626... Line 626...
626
 
626