From 712b246dd6839f5423db0c20c94ea26df5cae19b Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 23 Jan 2018 12:56:42 +0100 Subject: [PATCH] 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". --- panda/src/device/evdevInputDevice.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/device/evdevInputDevice.cxx b/panda/src/device/evdevInputDevice.cxx index cf20e57261..115ce8ee77 100644 --- a/panda/src/device/evdevInputDevice.cxx +++ b/panda/src/device/evdevInputDevice.cxx @@ -518,9 +518,9 @@ init_device() { // 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 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) || - (_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); } if (axis == C_throttle && (quirks & QB_centered_throttle) != 0) {