Subversion Repositories FlightCtrl

Rev

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

Rev 1078 Rev 1081
Line 58... Line 58...
58
uint8_t ConfirmFrame;
58
uint8_t ConfirmFrame;
Line 59... Line 59...
59
 
59
 
60
typedef struct
60
typedef struct
61
{
61
{
62
        int16_t Heading;
62
        int16_t Heading;
Line 63... Line 63...
63
} Heading_t;
63
} __attribute__((packed)) Heading_t;
64
 
64
 
65
DebugOut_t              DebugOut;
65
DebugOut_t              DebugOut;
Line 436... Line 436...
436
 
436
 
437
                switch(rxd_buffer[2])
437
                switch(rxd_buffer[2])
438
                {
438
                {
439
                        #ifdef USE_MK3MAG
439
                        #ifdef USE_MK3MAG
440
                        case 'K':// compass value
-
 
441
                                Heading_t*      pMK3MagHeading;
440
                        case 'K':// compass value
442
                                pMK3MagHeading = (Heading_t *) pRxData;
-
 
443
                                CompassHeading = *pMK3MagHeading;
441
                                CompassHeading = ((Heading_t *)pRxData)->Heading;
444
                                CompassOffCourse = ((540 + CompassHeading - CompassCourse) % 360) - 180;
442
                                CompassOffCourse = ((540 + CompassHeading - CompassCourse) % 360) - 180;
445
                                break;
443
                                break;
Line 446... Line 444...
446
                        #endif
444
                        #endif
Line 497... Line 495...
497
 
495
 
Line 498... Line 496...
498
                default: // any Slave Address
496
                default: // any Slave Address
499
 
497
 
500
                switch(rxd_buffer[2])
-
 
501
                {
-
 
502
                        // only for compatibility to old MK3Mag Version taht does not send the right Slave Address
-
 
503
                        #ifdef USE_MK3MAG
-
 
504
                        case 'K':// compass value
-
 
505
                                Heading_t*      pMK3MagHeading;
-
 
506
                                pMK3MagHeading = (Heading_t *) pRxData;
-
 
507
                                CompassHeading = *pMK3MagHeading;
-
 
508
                                CompassOffCourse = ((540 + CompassHeading - CompassCourse) % 360) - 180;
-
 
509
                                break;
498
                switch(rxd_buffer[2])
510
                        #endif
499
                {
511
                        case 'a':// request for labels of the analog debug outputs
500
                        case 'a':// request for labels of the analog debug outputs
512
                                Request_DebugLabel = pRxData[0];
501
                                Request_DebugLabel = pRxData[0];
513
                                if(Request_DebugLabel > 31) Request_DebugLabel = 31;
502
                                if(Request_DebugLabel > 31) Request_DebugLabel = 31;