Board index FlightGear Support Hardware

GamePad Logitech Dual Action - joystick.xml

Joysticks, pedals, monitors.

GamePad Logitech Dual Action - joystick.xml

Postby cora2017 » Thu Feb 09, 2017 1:53 pm

Hello FG users

First of all - i am a beginner in fgfs. My one and only attempt is to land a Cessna 172P w/o crashing the aircraft. If this won't work i will never proceed with any other topic like VFR and so on.

Problem is the sensitivity of the joystick, or i am doing something completely wrong.
I already read a lot about the theory ( flaps,speed,rudder usage at the ground, use trim to control the final descent etc etc ) but from my >250 trials it was a crash in 99%. I also tried different button/axis configs to better adopt them to my fingers but still no success. May be i put the wrong parms in the xml file, but i need a better explanation what to use for the certain syntax statements ( factor,double etc etc ) .
Trial and error is OK, but to save time sometimes one need some hints.


When ever needed i will supply more data.
Thx in advance.
cora2017
 
Posts: 4
Joined: Thu Feb 09, 2017 11:36 am
Location: Germany
Version: 4.4
OS: W10 ; Fedora 25

Re: GamePad Logitech Dual Action - joystick.xml

Postby yanes » Thu Feb 09, 2017 4:17 pm

If I understand you correctly , the problem should be in power or factor of controls input ,
In what axes you feel your JS is violent ?
you may want to post your joystick.xml and I and may be other community members will help you tuning your controls .
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: GamePad Logitech Dual Action - joystick.xml

Postby cora2017 » Thu Feb 09, 2017 5:36 pm

Hello Yanes.
Thx for your reply.
The joystick.xml will show you, that i have:
4 Buttons for view direction
2 Buttons Flaps UP and Down
Aileron and Elevator on the left mini joystick ( they are a bit too nervous )
Rudder and Rudder Trim on the right mini joystick. Taxiing and control before takeoff and after touch down are somewhat difficult.
My biggest problem is Aileron and Elevator trim. They are to slow to control the final descent. ( they are associated with the eightdirectional switch )
And there are some more buttons for brake and throttle.

Please see my xml file attached. ( pasted because i can't find a way for attaching it )
Code: Select all
<?xml version="1.0"?>

<PropertyList>
  <name type="string">Logitech Dual Action USB</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>
    </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>
    </binding>
  </axis>
  <axis n="2">
    <desc type="string">Rudder</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/rudder</property>
      <factor type="double">1</factor>
      <offset type="double">0</offset>
    </binding>
  </axis>
  <axis n="3">
    <desc type="string">Rudder Trim</desc>
    <low>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.rudderTrim(-1);</script>
      </binding>
    </low>
    <high>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.rudderTrim(1);</script>
      </binding>
    </high>
  </axis>
  <axis n="6">
    <desc type="string">Aileron Trim</desc>
    <low>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.aileronTrim(-1);</script>
      </binding>
    </low>
    <high>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.aileronTrim(1);</script>
      </binding>
    </high>
  </axis>
  <axis n="7">
    <desc type="string">Elevator Trim</desc>
    <low>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.elevatorTrim(-1);</script>
      </binding>
    </low>
    <high>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.elevatorTrim(1);</script>
      </binding>
    </high>
  </axis>
  <button>
    <desc type="string">View Left</desc>
    <binding>
      <command type="string">property-adjust</command>
      <property type="string">/sim/current-view/goal-heading-offset-deg</property>
      <step type="string">30.0</step>
    </binding>
  </button>
  <button n="1">
    <desc type="string">View Down</desc>
    <binding>
      <command type="string">property-adjust</command>
      <property type="string">/sim/current-view/goal-pitch-offset-deg</property>
      <step type="string">-20.0</step>
    </binding>
  </button>
  <button n="2">
    <desc type="string">View Right</desc>
    <binding>
      <command type="string">property-adjust</command>
      <property type="string">/sim/current-view/goal-heading-offset-deg</property>
      <step type="string">-30.0</step>
    </binding>
  </button>
  <button n="3">
    <desc type="string">View Up</desc>
    <binding>
      <command type="string">property-adjust</command>
      <property type="string">/sim/current-view/goal-pitch-offset-deg</property>
      <step type="string">20.0</step>
    </binding>
  </button>
  <button n="4">
    <desc type="string">Throttle Up</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.incThrottle(0.01, 1.0);</script>
    </binding>
    <repeatable type="double">1</repeatable>
  </button>
  <button n="5">
    <desc type="string">Throttle Down</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.incThrottle(-0.01, -1.0);</script>
    </binding>
    <repeatable type="double">1</repeatable>
  </button>
  <button n="6">
    <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="7">
    <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="10">
    <desc type="string">Flaps Up</desc>
    <repeatable type="string">false</repeatable>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.flapsDown(-1);</script>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.flapsDown(0);</script>
      </binding>
    </mod-up>
  </button>
  <button n="11">
    <desc type="string">Flaps Down</desc>
    <repeatable type="string">false</repeatable>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.flapsDown(1);</script>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.flapsDown(0);</script>
      </binding>
    </mod-up>
  </button>
</PropertyList>
Last edited by Johan G on Thu Feb 09, 2017 6:53 pm, edited 1 time in total.
Reason: [code] tags instead of [quote] tags. They can be added manually or with the slightly obscure [^_ ] button.
cora2017
 
Posts: 4
Joined: Thu Feb 09, 2017 11:36 am
Location: Germany
Version: 4.4
OS: W10 ; Fedora 25

Re: GamePad Logitech Dual Action - joystick.xml

Postby cora2017 » Thu Feb 09, 2017 5:37 pm

.. i forgot: Thx in advance. Greetings. Maybe you can bring some light in...
cora2017
 
Posts: 4
Joined: Thu Feb 09, 2017 11:36 am
Location: Germany
Version: 4.4
OS: W10 ; Fedora 25

Re: GamePad Logitech Dual Action - joystick.xml

Postby yanes » Thu Feb 09, 2017 10:40 pm

Ok , you config looks normal but this depends on your experience 'cause I don't have a similar device :
cora2017 wrote in Thu Feb 09, 2017 5:36 pm:My biggest problem is Aileron and Elevator trim. They are to slow to control the final descent. ( they are associated with the eightdirectional switch )


The trimmers are often slower than the actual control surfaces , You shouldn't use them mainly for flying controls.
anyway , I replaced their bindings with "property-scale" style commands ,(lines 50 to 69 in the edited code below ).
if they become too nervous try uncommenting the <power> tags .
cora2017 wrote in Thu Feb 09, 2017 5:36 pm:...Aileron and Elevator on the left mini joystick ( they are a bit too nervous )


for controls 'nervosity' I added a <power> tag that will split the inputs by 1.8 (lines 11 and 21) try increasing for slowdown inputs and respectively decrease for raise

this is an edited version , try to adjust values by yourself , it all depends on your experience
Good luck
Code: Select all
<?xml version="1.0"?>

<PropertyList>
  <name type="string">Logitech Dual Action USB</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>
      <power>1.8</power>
      <offset type="double">0</offset>
    </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>
      <power>1.8</power>
      <offset type="double">0</offset>
    </binding>
  </axis>
  <axis n="2">
    <desc type="string">Rudder</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/rudder</property>
      <factor type="double">1</factor>
      <offset type="double">0</offset>
    </binding>
  </axis>
  <axis n="3">
    <desc type="string">Rudder Trim</desc>
    <low>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.rudderTrim(-1);</script>
      </binding>
    </low>
    <high>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.rudderTrim(1);</script>
      </binding>
    </high>
  </axis>

  <axis n="6">
    <desc type="string">Aileron Trim</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/aileron-trim</property>
         <!--<power>1.8</power>-->
      <factor type="double">1</factor>
    </binding>
  </axis>
 
 
  <axis n="7">
    <desc type="string">Elevator Trim</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/elevator-trim</property>
        <!--<power>1.5</power>  -->
      <factor type="double">-1.8</factor>
    </binding>
  </axis>
 
  <button>
    <desc type="string">View Left</desc>
    <binding>
      <command type="string">property-adjust</command>
      <property type="string">/sim/current-view/goal-heading-offset-deg</property>
      <step type="string">30.0</step>
    </binding>
  </button>
  <button n="1">
    <desc type="string">View Down</desc>
    <binding>
      <command type="string">property-adjust</command>
      <property type="string">/sim/current-view/goal-pitch-offset-deg</property>
      <step type="string">-20.0</step>
    </binding>
  </button>
  <button n="2">
    <desc type="string">View Right</desc>
    <binding>
      <command type="string">property-adjust</command>
      <property type="string">/sim/current-view/goal-heading-offset-deg</property>
      <step type="string">-30.0</step>
    </binding>
  </button>
  <button n="3">
    <desc type="string">View Up</desc>
    <binding>
      <command type="string">property-adjust</command>
      <property type="string">/sim/current-view/goal-pitch-offset-deg</property>
      <step type="string">20.0</step>
    </binding>
  </button>
  <button n="4">
    <desc type="string">Throttle Up</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.incThrottle(0.01, 1.0);</script>
    </binding>
    <repeatable type="double">1</repeatable>
  </button>
  <button n="5">
    <desc type="string">Throttle Down</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.incThrottle(-0.01, -1.0);</script>
    </binding>
    <repeatable type="double">1</repeatable>
  </button>
  <button n="6">
    <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="7">
    <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="10">
    <desc type="string">Flaps Up</desc>
    <repeatable type="string">false</repeatable>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.flapsDown(-1);</script>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.flapsDown(0);</script>
      </binding>
    </mod-up>
  </button>
  <button n="11">
    <desc type="string">Flaps Down</desc>
    <repeatable type="string">false</repeatable>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.flapsDown(1);</script>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.flapsDown(0);</script>
      </binding>
    </mod-up>
  </button>
</PropertyList>
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: GamePad Logitech Dual Action - joystick.xml

Postby cora2017 » Fri Feb 10, 2017 12:01 pm

Hello Yanes

Thx a lot. I'll try to modify and test my settings during the weekend. I will post the results asap.
Regards
cora2017
 
Posts: 4
Joined: Thu Feb 09, 2017 11:36 am
Location: Germany
Version: 4.4
OS: W10 ; Fedora 25


Return to Hardware

Who is online

Users browsing this forum: No registered users and 5 guests