Thrustmaster Hotas Warthog Flight Stick (Hall effect) calibration without deadzone.This joystick has ranges from 0 to 65536 for the X and Y axes, with 0 to the left and 65536 to the right for the X axis, 0 forward and 65536 backward for the Y axis.
Warning: the jstest-gtk calibration program gives incorrect values by not allowing 65536 value (max 32767).
The calibration is done directly in "/var/lib/joystick/joystick.state" and you must give it writing rights in console by:
- Code: Select all
sudo chmod go+w /var/lib/joystick/joystick.state
If it does not exist, connect the joystick and write to the console:
- Code: Select all
sudo jscale-store /dev/input/js0
Then open the joystick.state file (text file). Example:
- Code: Select all
NAME="Saitek Saitek Pro Flight Yoke"
VENDOR="06a3"
PRODUCT="0bac"
jscal -u 7,0,1,2,3,4,16,17,23,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,704,705,706,707,708,709,710
jscal -s 7,1,0,512,512,1048544,1048544,1,0,512,512,1048544,1048544,1,0,127,127,4227201,4194176,0,0,0,0,0,0,0,0
NAME="Thustmaster Joystick - HOTAS Warthog"
VENDOR="044f"
PRODUCT="0402"
jscal -u 4,0,1,16,17,19,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,704,705,706
jscal -s 4,1,255,31400,31400,19576,19576,1,255,32768,32768,19576,19576,1,0,0,0,536870912,536870912,1,0,0,0,536870912,536870912
This is the last one we will modify (HOTAS Warthog).
We will be interested in the jscal -s line:
"4" is the number of axes present on the joystick.
"1" is the start of the code strings, the first "1" is for axis 0 (X axis), the second "1", for axis 1 (Y axis) etc ...
The first number after the "1" is the precision (255).
The next number (31400) is the minimum value of the "dead zone" and the one just after (also 31400), the maximum value of the "dead zone". The two digits being equal, there is no more "dead zone".
Note : The operating range being 65536, the middle of the range should be 32768 (as on the Y axis) but my tests led me to reduce these values to correctly centre the joystick.
I used the property "/input/joysticks/js(the number of your joystick)/axis/binding/setting" (in the property tree) for this, which must be as close as possible to 0.
With my joystick, the values of 31400 for the X axis give me a "setting" of -0.0071.This is very acceptable, given the sensibility of the joystick.
The following values (19576) are coefficients making it possible to cover the whole range from -1 to +1 of the "setting" with the joystick at the maximum on each side.
The Y axis codes start at the second "1" and we can see that this is centred with the values at 32768 (half of 65536), resulting in a "setting" of -0.0074.
Probably the x-axis has a little manufacturing offset (???).
The 3rd and 4th "1", with the codes which follow, correspond to the multidirectional button of the trimmers, treated as two axes. We don't have to touch them.
Once the calibration is complete, do not forget to relock the file by:
- Code: Select all
sudo chmod go-w /var/lib/joystick/joystick.state