Browse Source

input: reverse rudder direction to match yaw, reverse 3D mouse roll

Although having the rudder reversed is less intuitive, this makes it match the Panda convention for "heading".
rdb 8 years ago
parent
commit
712b246dd6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      panda/src/device/evdevInputDevice.cxx

+ 2 - 2
panda/src/device/evdevInputDevice.cxx

@@ -518,9 +518,9 @@ init_device() {
           // We'd like to reverse the Y axis to match the XInput behavior.
           // We'd like to reverse the Y axis to match the XInput behavior.
           // Also reverse the yaw axis to match right-hand coordinate system.
           // Also reverse the yaw axis to match right-hand coordinate system.
           // Also T.Flight Hotas X throttle is reversed and can go backwards.
           // Also T.Flight Hotas X throttle is reversed and can go backwards.
-          if (axis == C_yaw || axis == C_left_y || axis == C_right_y ||
+          if (axis == C_yaw || axis == C_rudder || axis == C_left_y || axis == C_right_y ||
               (axis == C_throttle && (quirks & QB_reversed_throttle) != 0) ||
               (axis == C_throttle && (quirks & QB_reversed_throttle) != 0) ||
-              (_device_class == DC_3d_mouse && (axis == C_y || axis == C_z))) {
+              (_device_class == DC_3d_mouse && (axis == C_y || axis == C_z || axis == C_roll))) {
             swap(absinfo.maximum, absinfo.minimum);
             swap(absinfo.maximum, absinfo.minimum);
           }
           }
           if (axis == C_throttle && (quirks & QB_centered_throttle) != 0) {
           if (axis == C_throttle && (quirks & QB_centered_throttle) != 0) {