Subversion Repositories FlightCtrl

Rev

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

Rev 1081 Rev 1097
Line 87... Line 87...
87
{
87
{
88
        int16_t tmp;
88
        int16_t tmp;
89
        cli(); // stop all interrupts to avoid writing of new data during update of that packet.
89
        cli(); // stop all interrupts to avoid writing of new data during update of that packet.
Line 90... Line 90...
90
 
90
 
91
        // update content of packet to NaviCtrl
91
        // update content of packet to NaviCtrl
92
        ToNaviCtrl.IntegralNick = (int16_t) (IntegralNick / 108);
92
        ToNaviCtrl.IntegralNick = (int16_t) (IntegralNick / 130L);   // convert to multiple of 0.1°
93
        ToNaviCtrl.IntegralRoll  = (int16_t) (IntegralRoll  / 108);
93
        ToNaviCtrl.IntegralRoll  = (int16_t) (IntegralRoll  / 130L); // convert to multiple of 0.1°
94
        ToNaviCtrl.GyroHeading = YawGyroHeading / YAW_GYRO_DEG_FACTOR;
94
        ToNaviCtrl.GyroHeading = YawGyroHeading / YAW_GYRO_DEG_FACTOR;
95
        ToNaviCtrl.GyroNick = Reading_GyroNick;
95
        ToNaviCtrl.GyroNick = Reading_GyroNick;
96
        ToNaviCtrl.GyroRoll = Reading_GyroRoll;
96
        ToNaviCtrl.GyroRoll = Reading_GyroRoll;
97
        ToNaviCtrl.GyroYaw = Reading_GyroYaw;
97
        ToNaviCtrl.GyroYaw = Reading_GyroYaw;