Board index FlightGear Support Hardware

about too sensitive joystick (FGFS on Ubuntu 18.04)

Joysticks, pedals, monitors.

about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby mauro451 » Sun Apr 14, 2019 9:06 am

Good morning all, I have read at all my best (being not english motherlanguage) the topics here about joystick set configuration to solve the known problem of excessive joystick reactivity.
I've applied the suggested additional control parameters in my joystick xml file, also matching with this page :
http://wiki.flightgear.org/Writing_Joys ... de:_Part_1

the problem is that nothing happens once saved the xml file with the new parameters, it is like having done nothing.

my changes are made in the only file appearing in ~/.fgfs/Input/Joysticks/ directory, its name is Thrustmaster,-Inc-USB-Game-Controllers.xml

the changes are effective, the file is saved with same name and when reopened it I found what I've just done.

Is there something else to know to make this work?
Thank you much
********************
EDIT: after editing some of the parameters shown on http://wiki.flightgear.org/Writing_Joys ... de:_Part_1 :

<axis
<desc>aileron</desc>
<dead-band type="double">0.3</dead-band>
<binding>
<command>property-scale</command>
<property>/controls/flight/elevator</property>
<offset type="double">0.85</offset>
<factor type="double">-1.0</factor>
<power type="int">1.9</power>
</binding>
</axis>

I've seen that adjusting the 1- <dead-band type="double">0.3</dead-band> and 2- <offset type="double">0.85</offset>parameters makes:

1- the stick dead zone at 30%, so the steering moves with some delay
2- the steering (both vertical and horizintal axis) stops his action a bit before the real end position, I believe 0.85 means that the excursion is 85% of the entire run

and this is already a step toward what needed.

but the <power type="int">1.9</power> setting (the one supposed to act directly on the sensitivity) does not make any difference in joystick behavior . How came?
mauro451
 
Posts: 5
Joined: Thu Apr 11, 2019 7:29 pm

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby sim » Sat Apr 20, 2019 1:33 pm

Are you sure Flightgear is reading the joystick.xml you have modified for less sensitivity? :wink:

THE CODE YOU POSTED CAN'T BE READ BY FLIGHTGEAR AS YOU FORGOT
TO NUMBER THE AXIS E.G.
<axis n="0">
<axis> <desc>aileron</desc>
<dead-band type="double">0.3</dead-band>
<binding>
<command>property-scale</command>
<property>/controls/flight/elevator</property>
<offset type="double">0.85</offset>
<factor type="double">-1.0</factor>
<power type="int">1.9</power>
</binding>
</axis>
ok, I've corrected the first axis value in <axis n="0"> in the file and saved, but it does nothing.
Thank you anyway

Glad to see Maerchenprinz has more Ubantu suggestions as mine is Windows 10.
Seems Flightgear is still not reading your joystick xml or it is reading it but the xml itself is not correctly written. You can test your joystick xml using the online "Validator" below
http://www.w3schools.com/XML/xml_validator.asp
Post a complete copy of your xml in a code box and we can take a look at it.
Last edited by sim on Sun Apr 21, 2019 10:27 am, edited 6 times in total.
User avatar
sim
 
Posts: 1431
Joined: Tue Jun 30, 2009 3:13 pm
Location: Shropshire England
Callsign: Fly4Fun
Version: 0.9.10 up
OS: 64 Win 10 HD6450

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby mauro451 » Sat Apr 20, 2019 10:03 pm

ok, I've corrected the first axis value in <axis n="0"> in the file and saved, but it does nothing.
Thank you anyway
mauro451
 
Posts: 5
Joined: Thu Apr 11, 2019 7:29 pm

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby Maerchenprinz » Sun Apr 21, 2019 12:42 am

Hi!

Do I get your EDIT right, and you finally notice your changes when you start FG? If not, may it be that you have forgotten to change the joysticks.xml in fgdata (or, in your case, in ~/fgfs)?
Else, (as you're on Linux, right?) you can install the "joystick" package, that helped me a lot (I'm running Ubuntu) - My pedals had a huge axis offset and my joystick a totally low range... After running jscal -c /dev/input/js0 (and js1), they worked much better, the pedals now only have a small offset (because they're old), and the joystick a nearly (because it's cheap :)) perfect range. So maybe you want to give that a try?

Ciao,
Adrian
User avatar
Maerchenprinz
 
Posts: 306
Joined: Thu Mar 15, 2007 6:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby sim » Sun Apr 21, 2019 7:34 pm

Thrustmaster,-Inc-USB-Game-Controllers.xml

Please copy your thrustmaster xml and post it here in a codebox.
User avatar
sim
 
Posts: 1431
Joined: Tue Jun 30, 2009 3:13 pm
Location: Shropshire England
Callsign: Fly4Fun
Version: 0.9.10 up
OS: 64 Win 10 HD6450

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby mauro451 » Mon Apr 22, 2019 4:15 pm

the file location is .FGFS/Input/Joysticks/Thrustmaster,-Inc-USB-Game-Controllers.xml

Code: Select all
<?xml version="1.0"?>

<PropertyList>
  <name type="string">Thrustmaster, Inc. USB Game Controllers</name>
  <axis>
    <desc type="string">Aileron</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/aileron</property>
      <factor type="double">0.85</factor>
      <offset type="double">0</offset>
      <power type="int">1.9</power>
    </binding>
  </axis>
  <axis n="1">
    <desc type="string">Elevator</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/elevator</property>
      <factor type="double">-0.85</factor>
      <offset type="double">0</offset>
      <power type="int">1.9</power>
    </binding>
  </axis>
  <axis n="2">
    <desc type="string">Throttle (all)</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.throttleAxis();</script>
    </binding>
  </axis>
  <axis n="3">
    <desc type="string">View (horizontal)</desc>
    <low>
      <binding>
        <command type="string">nasal</command>
        <script type="string">setprop("/sim/current-view/goal-heading-offset-deg", getprop("/sim/current-view/goal-heading-offset-deg") + 2);</script>
      </binding>
      <repeatable type="bool">true</repeatable>
    </low>
    <high>
      <binding>
        <command type="string">nasal</command>
        <script type="string">setprop("/sim/current-view/goal-heading-offset-deg", getprop("/sim/current-view/goal-heading-offset-deg") - 2);</script>
      </binding>
      <repeatable type="bool">true</repeatable>
    </high>
  </axis>
  <axis n="4">
    <desc type="string">View (vertical)</desc>
    <low>
      <binding>
        <command type="string">nasal</command>
        <script type="string">setprop("/sim/current-view/goal-pitch-offset-deg", getprop("/sim/current-view/goal-pitch-offset-deg") + 1);</script>
      </binding>
      <repeatable type="bool">true</repeatable>
    </low>
    <high>
      <binding>
        <command type="string">nasal</command>
        <script type="string">setprop("/sim/current-view/goal-pitch-offset-deg", getprop("/sim/current-view/goal-pitch-offset-deg") - 1);</script>
      </binding>
      <repeatable type="bool">true</repeatable>
    </high>
  </axis>
  <button>
    <desc type="string">Brakes</desc>
    <repeatable type="string">false</repeatable>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.applyBrakes(1);</script>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.applyBrakes(0);</script>
      </binding>
    </mod-up>
  </button>
  <button n="1">
    <desc type="string">View Increase</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">view.increase(0.75);</script>
    </binding>
    <repeatable type="double">1</repeatable>
  </button>
  <button n="2">
    <desc type="string">Elevator Trim Up</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.elevatorTrim(-1);</script>
    </binding>
    <repeatable type="double">1</repeatable>
  </button>
  <button n="3">
    <desc type="string">View Cycle Forwards</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">view.stepView(1);</script>
    </binding>
    <repeatable type="double">0</repeatable>
  </button>
</PropertyList>
mauro451
 
Posts: 5
Joined: Thu Apr 11, 2019 7:29 pm

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby sim » Thu Apr 25, 2019 12:57 pm

mauro451
4th line down in your code box <axis> should be <axis n="0"> or FlightGear will not see it! :wink:
Hate flying without aileron control! :roll:
User avatar
sim
 
Posts: 1431
Joined: Tue Jun 30, 2009 3:13 pm
Location: Shropshire England
Callsign: Fly4Fun
Version: 0.9.10 up
OS: 64 Win 10 HD6450

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby mauro451 » Sat Apr 27, 2019 1:07 pm

sim wrote in Thu Apr 25, 2019 12:57 pm:mauro451
4th line down in your code box <axis> should be <axis n="0"> or FlightGear will not see it! :wink:
Hate flying without aileron control! :roll:


Hi, just tried ailerons-rudder-elevator functionality, they all work.
Also tried to change the <offset type="double"> rate from 085 to 090, then to 050, then back to 085 and components behavior every time fully respond to the numeric change.
So it seems <axis> definition is ok.
mauro451
 
Posts: 5
Joined: Thu Apr 11, 2019 7:29 pm

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby sim » Mon Apr 29, 2019 10:29 am

Now it's working, have changing the numbers got the ailerons working better for you? :)
User avatar
sim
 
Posts: 1431
Joined: Tue Jun 30, 2009 3:13 pm
Location: Shropshire England
Callsign: Fly4Fun
Version: 0.9.10 up
OS: 64 Win 10 HD6450

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby mauro451 » Tue Apr 30, 2019 6:51 pm

well they get get me a bit closer to my target which is a reduced sensitivity to the stick movement. But what I'm trying to make doing his job is the <power type="int"> value, declared to be there specifically for this purpose. Nothing happens with any number I write (1.9, 0.66, 1.0, 2.6....)

just to point something maybe misunderstood: I tested aileron-rudder regular functionality without changing the <axis> string as it was: actually still without axis number value , and it works like it has to.
mauro451
 
Posts: 5
Joined: Thu Apr 11, 2019 7:29 pm

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby sim » Sun May 05, 2019 1:28 pm

Fair enough <axis> works for ailerons without specifying the axis number.
Seems from what you say Flightgear must default to zero if you don't specify.
Never Knew that. Will try it on my joystick code. Guess that should work for button 0 too! :wink:
User avatar
sim
 
Posts: 1431
Joined: Tue Jun 30, 2009 3:13 pm
Location: Shropshire England
Callsign: Fly4Fun
Version: 0.9.10 up
OS: 64 Win 10 HD6450

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby Krisbee » Fri Jun 14, 2019 1:37 am

Any update on this? I have the same joystick, same Ubuntu version and I still cant seem to get <power type=“int”> value to actually do anything, either... and its just a bit too sensitive at the stick for straight/level
Krisbee
 
Posts: 4
Joined: Fri Jun 14, 2019 1:34 am

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby Octal450 » Fri Jun 14, 2019 3:09 am

I never got power working either.

Try this:
Code: Select all
      <binding>
         <command type="string">nasal</command>
         <script type="string">
            <![CDATA[
               input = cmdarg().getNode("setting").getValue();
               gain = abs(input * 19) + 1;
               value = (input * gain) / 20;
               setprop("/controls/flight/rudder", value);
            ]]>
         </script>
      </binding>


This is what I do for my rudder pedals.

Kind Regards,
Josh
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5583
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby Krisbee » Sun Jun 16, 2019 3:42 pm

So - I just used <squared type="bool"> instead and it worked fine. That was stated in the faq/wiki that it is the same as <power type="int">2</power>
Last edited by Krisbee on Sun Jun 16, 2019 3:44 pm, edited 2 times in total.
Krisbee
 
Posts: 4
Joined: Fri Jun 14, 2019 1:34 am

Re: about too sensitive joystick (FGFS on Ubuntu 18.04)

Postby Krisbee » Sun Jun 16, 2019 3:43 pm

I also have elevator trim tied to the other two buttons on the stick, and it is set to a faster rate to be useable. I WILL in the future attach rudder and aileron trim to those buttons with a Shift and an ALT, but since I am flying 172p right now, I haven't done it.

The hat I have look at the sides of the plane, not a slow scroll so I can quickly peek out the sides...

Here is what I am using as my XML in case people are interested:
Code: Select all
<?xml version="1.0"?>

<PropertyList>
  <name type="string">Thrustmaster, Inc. USB Game Controllers</name>
  <axis>
    <desc type="string">Aileron</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/aileron</property>
      <factor type="double">1</factor>
      <offset type="double">0</offset>
      <squared type="bool">true</squared>
    </binding>
  </axis>
  <axis n="1">
    <desc type="string">Elevator</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/elevator</property>
      <factor type="double">-1</factor>
      <offset type="double">0</offset>
      <squared type="bool">true</squared>
    </binding>
  </axis>
  <axis n="2">
    <desc type="string">Throttle (all)</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.throttleAxis();</script>
    </binding>
  </axis>
  <axis n="3">
    <desc type="string">View (horizontal)</desc>
    <low>
      <binding>
        <command type="string">nasal</command>
        <script type="string">setprop("/sim/current-view/goal-heading-offset-deg", getprop("/sim/current-view/goal-heading-offset-deg") + 30);</script>
      </binding>
    </low>
    <high>
      <binding>
        <command type="string">nasal</command>
        <script type="string">setprop("/sim/current-view/goal-heading-offset-deg", getprop("/sim/current-view/goal-heading-offset-deg") - 30);</script>
      </binding>
    </high>
  </axis>
  <axis n="4">
    <desc type="string">View (vertical)</desc>
    <low>
      <binding>
        <command type="string">nasal</command>
        <script type="string">setprop("/sim/current-view/goal-pitch-offset-deg", getprop("/sim/current-view/goal-pitch-offset-deg") - 20);</script>
      </binding>
    </low>
    <high>
      <binding>
        <command type="string">nasal</command>
        <script type="string">setprop("/sim/current-view/goal-pitch-offset-deg", getprop("/sim/current-view/goal-pitch-offset-deg") + 20);</script>
      </binding>
    </high>
  </axis>
  <button>
    <desc type="string">Trigger</desc>
    <repeatable type="string">false</repeatable>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.trigger(1);</script>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.trigger(0);</script>
      </binding>
    </mod-up>
  </button>
  <button n="1">
    <desc type="string">Elevator Trim Down</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.elevatorTrim(7)</script>
    </binding>
    <repeatable type="double">1</repeatable>
  </button>
  <button n="3">
    <desc type="string">Elevator Trim Up</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.elevatorTrim(-7);</script>
    </binding>
    <repeatable type="double">1</repeatable>
  </button>
</PropertyList>
Krisbee
 
Posts: 4
Joined: Fri Jun 14, 2019 1:34 am

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 7 guests