Writing Joystick Code: Part 1: Difference between revisions

Jump to navigation Jump to search
→‎Aileron, elevator and rudder: Remove redundant and confusing "squared" in the elevator axis example (cancelled by "power"); explain what "squared" does
(→‎Aileron, elevator and rudder: Remove redundant and confusing "squared" in the elevator axis example (cancelled by "power"); explain what "squared" does)
Line 69: Line 69:
       ''<factor type="double">-1.0</factor>''
       ''<factor type="double">-1.0</factor>''
       ''<power type="int">3</power>''
       ''<power type="int">3</power>''
       ''<offset>0.0</offset>''
       ''<offset type="double">0.0</offset>''
      ''<squared type="bool">true</squared>''
     </binding>
     </binding>
   </axis>
   </axis>
Line 83: Line 82:


<power ...... : Sometimes the axes are too sensitive - a slight touch on aileron makes the plane barrel-roll. You can reduce this sensitivity by making the value of power more than 1. (It is a decimal number, so you can make small adjustments, but small adjustments are usually not enough to be noticible.) Never mind the maths, but the larger the value of power the less sensitive the aircraft will be to axis movement.
<power ...... : Sometimes the axes are too sensitive - a slight touch on aileron makes the plane barrel-roll. You can reduce this sensitivity by making the value of power more than 1. (It is a decimal number, so you can make small adjustments, but small adjustments are usually not enough to be noticible.) Never mind the maths, but the larger the value of power the less sensitive the aircraft will be to axis movement.
{{Note|In some joystick binding files, you'll find:
<pre>&lt;squared type="bool"&gt;true&lt;/squared&gt;</pre>
This is equivalent to:
<pre>&lt;power type="int"&gt;2&lt;/power&gt;</pre>
and not faster in any way, therefore I prefer using ''power'' since it's then easier to change the value if needed.}}


<offset ..... : If you find that in its center position the axes outputs a non-zero value, you can put that same value here, with opposite + or - sign, to counter-act this. The HUD will show you if you have an offset problem, and can be used to see if you have solved it.
<offset ..... : If you find that in its center position the axes outputs a non-zero value, you can put that same value here, with opposite + or - sign, to counter-act this. The HUD will show you if you have an offset problem, and can be used to see if you have solved it.
377

edits

Navigation menu