mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +01:00
GCS Control Gadget: After double checks on actual quad, correct pitch sign now implemented.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2266 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
390a355c57
commit
da3d4cdab8
@ -96,19 +96,19 @@ void GCSControlGadget::manualControlCommandUpdated(UAVObject * obj) {
|
|||||||
switch (controlsMode) {
|
switch (controlsMode) {
|
||||||
case 1:
|
case 1:
|
||||||
// Mode 1: LeftX = Yaw, LeftY = Pitch, RightX = Roll, RightY = Throttle
|
// Mode 1: LeftX = Yaw, LeftY = Pitch, RightX = Roll, RightY = Throttle
|
||||||
emit sticksChangedRemotely(yaw,pitch,roll,throttle);
|
emit sticksChangedRemotely(yaw,-pitch,roll,throttle);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// Mode 2: LeftX = Yaw, LeftY = Throttle, RightX = Roll, RightY = Pitch
|
// Mode 2: LeftX = Yaw, LeftY = Throttle, RightX = Roll, RightY = Pitch
|
||||||
emit sticksChangedRemotely(yaw,throttle,roll,pitch);
|
emit sticksChangedRemotely(yaw,throttle,roll,-pitch);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
// Mode 3: LeftX = Roll, LeftY = Pitch, RightX = Yaw, RightY = Throttle
|
// Mode 3: LeftX = Roll, LeftY = Pitch, RightX = Yaw, RightY = Throttle
|
||||||
emit sticksChangedRemotely(roll,pitch,yaw,throttle);
|
emit sticksChangedRemotely(roll,-pitch,yaw,throttle);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
// Mode 4: LeftX = Roll, LeftY = Throttle, RightX = Yaw, RightY = Pitch;
|
// Mode 4: LeftX = Roll, LeftY = Throttle, RightX = Yaw, RightY = Pitch;
|
||||||
emit sticksChangedRemotely(roll,throttle,yaw,pitch);
|
emit sticksChangedRemotely(roll,throttle,yaw,-pitch);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -133,28 +133,28 @@ void GCSControlGadget::sticksChangedLocally(double leftX, double leftY, double r
|
|||||||
case 1:
|
case 1:
|
||||||
// Mode 1: LeftX = Yaw, LeftY = Pitch, RightX = Roll, RightY = Throttle
|
// Mode 1: LeftX = Yaw, LeftY = Pitch, RightX = Roll, RightY = Throttle
|
||||||
newRoll = rightX;
|
newRoll = rightX;
|
||||||
newPitch = leftY;
|
newPitch = -leftY;
|
||||||
newYaw = leftX;
|
newYaw = leftX;
|
||||||
newThrottle = rightY;
|
newThrottle = rightY;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// Mode 2: LeftX = Yaw, LeftY = Throttle, RightX = Roll, RightY = Pitch
|
// Mode 2: LeftX = Yaw, LeftY = Throttle, RightX = Roll, RightY = Pitch
|
||||||
newRoll = rightX;
|
newRoll = rightX;
|
||||||
newPitch = rightY;
|
newPitch = -rightY;
|
||||||
newYaw = leftX;
|
newYaw = leftX;
|
||||||
newThrottle = leftY;
|
newThrottle = leftY;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
// Mode 3: LeftX = Roll, LeftY = Pitch, RightX = Yaw, RightY = Throttle
|
// Mode 3: LeftX = Roll, LeftY = Pitch, RightX = Yaw, RightY = Throttle
|
||||||
newRoll = leftX;
|
newRoll = leftX;
|
||||||
newPitch = leftY;
|
newPitch = -leftY;
|
||||||
newYaw = rightX;
|
newYaw = rightX;
|
||||||
newThrottle = rightY;
|
newThrottle = rightY;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
// Mode 4: LeftX = Roll, LeftY = Throttle, RightX = Yaw, RightY = Pitch;
|
// Mode 4: LeftX = Roll, LeftY = Throttle, RightX = Yaw, RightY = Pitch;
|
||||||
newRoll = leftX;
|
newRoll = leftX;
|
||||||
newPitch = rightY;
|
newPitch = -rightY;
|
||||||
newYaw = rightX;
|
newYaw = rightX;
|
||||||
newThrottle = leftY;
|
newThrottle = leftY;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user