sar2
sar2 copied to clipboard
HOTAS joystick support
Hello,
I experienced an issue with my Thrustmaster T.16000M FCS HOTAS Joystick. I configured the stick unit as "Joystick 1" "USB" "2D with hat", and the throttle unit as "Joystick 2" "USB" "As throttle & rudder".
On "Joystick 1", pitch, bank and hat work as expected. But on "Joystick 2", throttle and rudder don't work as expected: these functions seems to be affected to axis 0 and 1, but on my throttle unit, the throttle is axis 2 and the rudder axis 5.
I remapped the throttle unit axes with jstest-gtk and checked for the result: it works with the "joystick tool" of my Mageia 6 Linux distro, but not with Sar2.
I think it's because throttle and heading axes numbers are hard coded in gctl.c:
/* Throttle and rudder unit? */
if(axis_role & GCTL_JS_AXIS_ROLE_AS_THROTTLE_AND_RUDDER)
{
joystick->axis_heading = 0;
joystick->axis_throttle = 1;
}
It will be great if it was possible to remap axes numbers -at least in sar2.ini file-, as it is partially possible to do it for some buttons.
BR