Subversion Repositories FlightCtrl

Rev

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

Rev 2122 Rev 2126
Line 113... Line 113...
113
 
113
 
114
        // These params are just left the same in all modes. In MANUAL and RATE the results are ignored anyway.
114
        // These params are just left the same in all modes. In MANUAL and RATE the results are ignored anyway.
Line 115... Line 115...
115
        int32_t tmp;
115
        int32_t tmp;
116
 
116
 
Line 117... Line 117...
117
        tmp = ((int32_t)controls[CONTROL_ELEVATOR] * staticParams.stickIElevator) >> LOG_STICK_SCALE;
117
        tmp = ((int32_t)controls[CONTROL_ELEVATOR] * staticParams.stickIElevator) >> LOG_STICK_SCALE;
118
        if (reverse[PITCH]) target[PITCH] -= tmp; else target[PITCH] += tmp;
118
        if (reverse[PITCH]) target[PITCH] += tmp; else target[PITCH] -= tmp;
Line 119... Line 119...
119
 
119
 
120
        tmp = ((int32_t)controls[CONTROL_AILERONS] * staticParams.stickIAilerons) >> LOG_STICK_SCALE;
120
        tmp = ((int32_t)controls[CONTROL_AILERONS] * staticParams.stickIAilerons) >> LOG_STICK_SCALE;
Line 121... Line 121...
121
        if (reverse[ROLL]) target[ROLL] -= tmp; else target[ROLL] += tmp;
121
        if (reverse[ROLL]) target[ROLL] += tmp; else target[ROLL] -= tmp;
122
 
122
 
123
        tmp = ((int32_t)controls[CONTROL_RUDDER] * staticParams.stickIRudder) >> LOG_STICK_SCALE;
123
        tmp = ((int32_t)controls[CONTROL_RUDDER] * staticParams.stickIRudder) >> LOG_STICK_SCALE;
124
        if (reverse[YAW]) target[YAW] -= tmp; else target[YAW] += tmp;
124
        if (reverse[YAW]) target[YAW] += tmp; else target[YAW] -= tmp;