Subversion Repositories FlightCtrl

Rev

Rev 1180 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1180 Rev 1186
Line 667... Line 667...
667
        }
667
        }
Line 668... Line 668...
668
 
668
 
669
        #ifdef USE_MK3MAG
669
        #ifdef USE_MK3MAG
670
    if((CheckDelay(Compass_Timer)) && txd_complete)
670
    if((CheckDelay(Compass_Timer)) && txd_complete)
671
        {
671
        {
672
                ToMk3Mag.Attitude[0] = (int16_t) (IntegralNick / (GyroDegFactor/ 10));  // approx. 0.1 deg
672
                ToMk3Mag.Attitude[0] = (int16_t)((10 * IntegralGyroNick) / GYRO_DEG_FACTOR);  // approx. 0.1 deg
673
                ToMk3Mag.Attitude[1] = (int16_t) (IntegralRoll / (GyroDegFactor/ 10));  // approx. 0.1 deg
673
                ToMk3Mag.Attitude[1] = (int16_t)((10 * IntegralGyroRoll) / GYRO_DEG_FACTOR);  // approx. 0.1 deg
674
                ToMk3Mag.UserParam[0] = FCParam.UserParam1;
674
                ToMk3Mag.UserParam[0] = FCParam.UserParam1;
675
                ToMk3Mag.UserParam[1] = FCParam.UserParam2;
675
                ToMk3Mag.UserParam[1] = FCParam.UserParam2;
676
                ToMk3Mag.CalState = CompassCalState;
676
                ToMk3Mag.CalState = CompassCalState;
677
                SendOutData('w', MK3MAG_ADDRESS, 1,(uint8_t *) &ToMk3Mag,sizeof(ToMk3Mag));
677
                SendOutData('w', MK3MAG_ADDRESS, 1,(uint8_t *) &ToMk3Mag,sizeof(ToMk3Mag));