Board index FlightGear Support Hardware

Joystick xml codes Library project - open for contributions  Topic is solved

Joysticks, pedals, monitors.

Re: Joystick xml codes Library project - open for contributi

Postby SurferTim » Sat Nov 16, 2019 12:02 am

Joystick file for Bodner BU0836. It has the 8 axis and 12 digital entries. Only a few assigned as examples.
In /Input/Joysticks , I created a folder named "Bodnar". In that folder goes this file named BU0836.xml
Code: Select all
<?xml version="1.0"?>

<PropertyList>
  <name type="string">Leo Bodnar Electronics BU0836 Interface</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">Axis 2</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string"></property>
      <setting type="double">0</setting>
    </binding>
    <low>
      <binding>
      </binding>
    </low>
  </axis>
  <axis n="3">
    <desc type="string">Axis 3</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string"></property>
      <setting type="double">0</setting>
    </binding>
    <low>
      <binding>
      </binding>
    </low>
  </axis>
  <axis n="4">
    <desc type="string">Axis 4</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string"></property>
    </binding>
    <low>
      <binding>
      </binding>
    </low>
  </axis>
  <axis n="5">
    <desc type="string">Axis 5</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string"></property>
    </binding>
    <low>
      <binding>
      </binding>
    </low>
  </axis>
  <axis n="6">
    <desc type="string">Axis 6</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string"></property>
    </binding>
    <low>
      <binding>
      </binding>
    </low>
  </axis>
  <axis n="7">
    <desc type="string">Axis 7</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string"></property>
    </binding>
    <low>
      <binding>
      </binding>
    </low>
  </axis>
  <button>
    <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>
  <button n="1">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">setprop("/controls/lighting/flight-comp", 1);</script>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">setprop("/controls/lighting/flight-comp", 0);</script>
      </binding>
    </mod-up>
  </button>
  <button n="2">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">property-toggle</command>
      <property type="string">/controls/lighting/flight-comp</property>
    </binding>
    <mod-up>
      <binding>
      </binding>
    </mod-up>
  </button>
  <button n="3">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string"></script>
      <module type="string">__js2</module>
    </binding>
    <mod-up>
      <binding>
      </binding>
    </mod-up>
  </button>
  <button n="4">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string"></script>
      <module type="string">__js2</module>
    </binding>
    <mod-up>
      <binding>
      </binding>
    </mod-up>
  </button>
  <button n="5">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string"></script>
      <module type="string">__js2</module>
    </binding>
    <mod-up>
      <binding>
      </binding>
    </mod-up>
  </button>
  <button n="6">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string"></script>
      <module type="string">__js2</module>
    </binding>
    <mod-up>
      <binding>
      </binding>
    </mod-up>
  </button>
  <button n="7">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string"></script>
      <module type="string">__js2</module>
    </binding>
    <mod-up>
      <binding>
      </binding>
    </mod-up>
  </button>
  <button n="8">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string"></script>
      <module type="string">__js2</module>
    </binding>
    <mod-up>
      <binding>
      </binding>
    </mod-up>
  </button>
  <button n="9">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string"></script>
      <module type="string">__js2</module>
    </binding>
    <mod-up>
      <binding>
      </binding>
    </mod-up>
  </button>
  <button n="10">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string"></script>
      <module type="string">__js2</module>
    </binding>
    <mod-up>
      <binding>
      </binding>
    </mod-up>
  </button>
  <button n="11">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string"></script>
      <module type="string">__js2</module>
    </binding>
    <mod-up>
      <binding>
      </binding>
    </mod-up>
  </button>
</PropertyList>
Fly low, fly slow, land on a dime. Twin Otter DHC6-300+.
User avatar
SurferTim
 
Posts: 852
Joined: Sun Dec 09, 2018 5:49 pm
Location: Miramar Beach, FL
Callsign: Pirate
Version: 2019.2.0
OS: Ubuntu 18.04

Re: Joystick xml codes Library project - open for contributi

Postby mercster » Sat Mar 07, 2020 1:23 pm

Hey folks, try as I might... can't find a TWCS-Throttle.xml. Can someone share or point me in the right direction? I'm using Linux, and I can edit the file if need be, but I'm too new to write it from scratch... need a skeleton or something. The throttle has some basic functionality, but I'd like to get it set up better (mostly the paddles for rudder control... seems some people use them for brakes, but you can't press both at the same time?) also wanna do the hats. Thank you. I'm going to cross post in the main hardware forum for more visibility.

EDIT: @dg-505 provided me his file, thank you very much! I post it here for future reference:

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

<PropertyList>
  <name type="string">Thrustmaster TWCS Throttle</name>
  <axis>
    <desc type="string">Nose wheel</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">controls/gear/tiller</property>
      <setting type="double">0</setting>
    </binding>
    <binding n="1">
      <command type="string">property-scale</command>
      <property type="string">controls/gear/tiller-cmd-norm</property>
      <setting type="double">0</setting>
    </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="5">
    <desc type="string">View Horizontal Axis</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/sim/current-view/goal-heading-offset-deg</property>
      <factor type="double">-60</factor>
      <offset type="double">0</offset>
    </binding>
  </axis>
  <axis n="7">
    <desc type="string">Flaps</desc>
    <binding>
      <command type="string">property-scale</command>
      <property type="string">/controls/flight/flaplever</property>
      <factor type="double">0.5</factor>
      <offset type="double">1</offset>
    </binding>
    <binding>
                <condition>
                    <property>controls/flight/flaps-serviceable</property>
                </condition>
                <command>nasal</command>
                <script>gui.popupTip(sprintf("Flaps: %3.1f deg", 37.5*getprop("/controls/flight/flaps")));</script>
            </binding>
            <binding>
                <condition>
                    <not>
                        <property>controls/flight/flaps-serviceable</property>
                    </not>
                </condition>
                <command>nasal</command>
                <script>gui.popupTip("Flap operation requires hydraulic pressure!");</script>
            </binding>
  </axis>
  <button>
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">pause</command>
      <offset type="double">1</offset>
    </binding>
  </button>
  <button n="1">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.applyBrakes(1, -1)</script>
      <module type="string">__js1</module>
      <offset type="double">1</offset>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.applyBrakes(0, -1)</script>
        <module type="string">__js1</module>
        <offset type="double">1</offset>
      </binding>
    </mod-up>
  </button>
  <button n="2">
    <desc type="string">Custom</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">controls.applyBrakes(1, 1)</script>
      <module type="string">__js1</module>
      <offset type="double">1</offset>
    </binding>
    <mod-up>
      <binding>
        <command type="string">nasal</command>
        <script type="string">controls.applyBrakes(0, 1)</script>
        <module type="string">__js1</module>
        <offset type="double">1</offset>
      </binding>
    </mod-up>
  </button>
  <button n="3">
    <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="4">
    <desc type="string">View Decrease</desc>
    <binding>
      <command type="string">nasal</command>
      <script type="string">view.decrease(0.75);</script>
    </binding>
    <repeatable type="double">1</repeatable>
  </button>
</PropertyList>
mercster
 
Posts: 38
Joined: Sat Mar 07, 2020 1:12 pm

Re: Joystick xml codes Library project - open for contributi

Postby Johan G » Sun Mar 15, 2020 2:21 pm

mercster wrote in Sat Mar 07, 2020 1:23 pm:I post it here for future reference

Thank you! :)
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5618
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Previous

Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest