diff --git a/Input/Joysticks/ThrustMaster/Warthog/README b/Input/Joysticks/ThrustMaster/Warthog/README index fc0e4d898..a0aa1d4e5 100644 --- a/Input/Joysticks/ThrustMaster/Warthog/README +++ b/Input/Joysticks/ThrustMaster/Warthog/README @@ -33,3 +33,75 @@ axis definition uses the same index as the master file. The n-th uses etc. Nasal blocks are properly executed in the namespace of the master file, so you can access all its functions and variables. + + + + + + +Joystick configuration from within FlightGear under Linux: +-------------------------------------------------------------------------------- +This allows to set backlight brightness and LEDs from within FlightGear +without requiring any config application, by directly writing to the devices +via raw HID support. + + + +(1) Make sure your kernel has hidraw support compiled in: check if there is at + least one file listed with + + $ ls /dev/hidraw* + + or if your kernel .config contains: + + CONFIG_HIDRAW=y + + + +(2) To get a reliable, persistent file name for your Warthog devices, create + a file /etc/udev/rules.d/00-local.rules and add these lines: + + SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}!="?*", IMPORT{program}="input_id %p" + SUBSYSTEM=="hidraw", ENV{ID_SERIAL}!="?*", IMPORT{program}="usb_id --export %p" + SUBSYSTEM=="hidraw", SYMLINK+="input/hidraw/%E{ID_SERIAL}" + SUBSYSTEM=="hidraw", ENV{ID_INPUT_JOYSTICK}!="0", GROUP:="js" + + If you don't have a user group "js" (for joystick hardware access) either + create one or, in the fourth line, use a group instead where all joystick + users are member, e.g. GROUP:="users". Then plug your Warthog devices out + and in again and check if this created two device files under /dev/hid/: + + $ ls -l /dev/input/hidraw/* + lrwxrwxrwx 1 root root 10 Oct 2 14:23 Thrustmaster_Throttle_-_HOTAS_Warthog -> ../hidraw1 + lrwxrwxrwx 1 root root 10 Oct 2 14:23 Thustmaster_Joystick_-_HOTAS_Warthog -> ../hidraw0 + + Also check if the linked-to hidraw devices have proper permissions (rw for "js"): + + $ ls -l /dev/hidraw* + crw-rw---- 1 root js 251, 0 Oct 2 09:11 /dev/hidraw0 + crw-rw---- 1 root js 251, 1 Oct 2 14:23 /dev/hidraw1 + + + +(3) Allow FlightGear to write to the two devices. The best way to do this is + to edit a local copy of the global IOrules. Just copy the global file + to your FG_HOME directory: + + $ mkdir -p ~/.fgfs/Nasal + $ cp $FG_ROOT/Nasal/IOrules ~/.fgfs/Nasal + + Now add these two lines there: + + WRITE ALLOW /dev/input/hidraw/Thustmaster_Joystick_-_HOTAS_Warthog + WRITE ALLOW /dev/input/hidraw/Thrustmaster_Throttle_-_HOTAS_Warthog + + CAVE: Don't fix the bad spelling of "Thrustmaster", unless your stick + really uses that! + + + + +DISCLAIMER: Of course, you take all responsibility for any possible +damages to your hardware if you make these changes. Neither the +FlightGear project nor any of its developers and contributors are in +any way liable. diff --git a/Input/Joysticks/ThrustMaster/Warthog/Throttle/seahawk.xml b/Input/Joysticks/ThrustMaster/Warthog/Throttle/seahawk.xml index 2292941f4..b41ada8f4 100644 --- a/Input/Joysticks/ThrustMaster/Warthog/Throttle/seahawk.xml +++ b/Input/Joysticks/ThrustMaster/Warthog/Throttle/seahawk.xml @@ -4,11 +4,11 @@ diff --git a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml index fb86b6840..896b6192c 100644 --- a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml +++ b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml @@ -17,6 +17,10 @@ +