Subversion Repositories NaviCtrl

Rev

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

Rev 342 Rev 345
Line 290... Line 290...
290
        if (SPI_RxBuffer_Request)
290
        if (SPI_RxBuffer_Request)
291
        {
291
        {
292
                // avoid sending data via SPI during the update of the  ToFlightCtrl structure
292
                // avoid sending data via SPI during the update of the  ToFlightCtrl structure
293
                VIC_ITCmd(SSP0_ITLine, DISABLE); // disable SPI interrupt
293
                VIC_ITCmd(SSP0_ITLine, DISABLE); // disable SPI interrupt
294
                ToFlightCtrl.CompassHeading = Compass_Heading;
294
                ToFlightCtrl.CompassHeading = Compass_Heading;
-
 
295
 
295
//ToFlightCtrl.CompassHeading += 360 + ((s32) FC.Poti[7] - 100);
296
//ToFlightCtrl.CompassHeading += 360 + ((s32) Poti8 - 128);
296
//ToFlightCtrl.CompassHeading %= 360;
297
//ToFlightCtrl.CompassHeading %= 360;
-
 
298
 
297
                DebugOut.Analog[10] = ToFlightCtrl.CompassHeading;
299
                DebugOut.Analog[10] = ToFlightCtrl.CompassHeading;
298
                if(ToFlightCtrl.CompassHeading >= 0) ToFlightCtrl.CompassHeading = (360 + ToFlightCtrl.CompassHeading + FromFlightCtrl.GyroYaw / 12) % 360;
300
                if(ToFlightCtrl.CompassHeading >= 0) ToFlightCtrl.CompassHeading = (360 + ToFlightCtrl.CompassHeading + FromFlightCtrl.GyroYaw / 12) % 360;
299
//              ToFlightCtrl.MagVecX = MagVector.X;
301
//              ToFlightCtrl.MagVecX = MagVector.X;
300
//              ToFlightCtrl.MagVecY = MagVector.Y;
302
//              ToFlightCtrl.MagVecY = MagVector.Y;
301
                ToFlightCtrl.MagVecZ = MagVector.Z;
303
                ToFlightCtrl.MagVecZ = MagVector.Z;