1
0
Fork 0

Attempt #1 to sort out confusion between left / right / parking brake

controls in the cockpit vs. which wheels they apply to.  FlightGear now
sets /controls/gear/brake-left, /controls/gear/brake-right, and
/controls/gear/brake-parking.  It should be up to the FDM to sort out
which wheels under which circumstances are affected by these controls
and ultimately what happens to the physical motion of the aircraft.
This commit is contained in:
curt 2004-01-12 17:49:33 +00:00
parent e964239a14
commit f7c276944e
22 changed files with 209 additions and 315 deletions

View file

@ -16,7 +16,7 @@
<type>switch</type>
<layer>
<condition>
<property>/controls/gear/parking-brake</property> <!-- parking brake -->
<property>/controls/gear/brake-parking</property> <!-- parking brake -->
</condition>
<name>on</name>
<texture>
@ -73,7 +73,7 @@
<h>26</h>
<binding>
<command>property-toggle</command>
<property>/controls/gear/parking-brake</property>
<property>/controls/gear/brake-parking</property>
</binding>
</action>
</actions>

View file

@ -473,13 +473,13 @@ button:
&lt;desc&gt;Left brake&lt;/desc&gt;
&lt;binding&gt;
&lt;command&gt;property-assign&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[0]/brake&lt;/property&gt;
&lt;property&gt;/controls/gear/brake-left&lt;/property&gt;
&lt;value type="double"&gt;1.0&lt;/value&gt; &lt;!-- brakes are a toggle so 1.0 represents on --&gt;
&lt;/binding&gt;
&lt;mod-up&gt; &lt;!-- it's not a parking brake so we need to release it --&gt;
&lt;binding&gt;
&lt;command&gt;property-assign&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[0]/brake&lt;/property&gt;
&lt;property&gt;/controls/gear/brake-left&lt;/property&gt;
&lt;value type="double"&gt;0.0&lt;/value&gt; &lt;!-- 1.0 is on so 0.0 is off, right? --&gt;
&lt;/binding&gt;
&lt;/mod-up&gt;
@ -500,10 +500,10 @@ Here's the command-line equivalent:
</p>
<PRE>
--prop:/input/joysticks/js[0]/button[4]/binding/command=property-assign
--prop:/input/joysticks/js[0]/button[4]/binding/property=/controls/gear/wheel[0]/brake
--prop:/input/joysticks/js[0]/button[4]/binding/property=/controls/gear/brake-left
--prop:/input/joysticks/js[0]/button[4]/binding/value=1.0
--prop:/input/joysticks/js[0]/button[4]/mod-up/binding/command=property-assign
--prop:/input/joysticks/js[0]/button[4]/mod-up/binding/property=/controls/gear/wheel[0]/brake
--prop:/input/joysticks/js[0]/button[4]/mod-up/binding/property=/controls/gear/brake-left
--prop:/input/joysticks/js[0]/button[4]/mod-up/binding/value=0.0
</PRE>
<br>
@ -518,33 +518,23 @@ button 0 is pressed, and releases all three when button 0 is released:
&lt;desc&gt;Brakes&lt;/desc&gt;
&lt;binding&gt;
&lt;command&gt;property-assign&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[0]/brake&lt;/property&gt;
&lt;property&gt;/controls/gear/brake-left&lt;/property&gt;
&lt;value type="double"&gt;1.0&lt;/value&gt;
&lt;/binding&gt;
&lt;binding&gt;
&lt;command&gt;property-assign&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[1]/brake&lt;/property&gt;
&lt;value type="double"&gt;1.0&lt;/value&gt;
&lt;/binding&gt;
&lt;binding&gt;
&lt;command&gt;property-assign&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[2]/brake&lt;/property&gt;
&lt;property&gt;/controls/gear/brake-right&lt;/property&gt;
&lt;value type="double"&gt;1.0&lt;/value&gt;
&lt;/binding&gt;
&lt;mod-up&gt;
&lt;binding&gt;
&lt;command&gt;property-assign&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[0]/brake&lt;/property&gt;
&lt;property&gt;/controls/gear/brake-left&lt;/property&gt;
&lt;value type="double"&gt;0.0&lt;/value&gt;
&lt;/binding&gt;
&lt;binding&gt;
&lt;command&gt;property-assign&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[1]/brake&lt;/property&gt;
&lt;value type="double"&gt;0.0&lt;/value&gt;
&lt;/binding&gt;
&lt;binding&gt;
&lt;command&gt;property-assign&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[2]/brake&lt;/property&gt;
&lt;property&gt;/controls/gear/brake-right&lt;/property&gt;
&lt;value type="double"&gt;0.0&lt;/value&gt;
&lt;/binding&gt;
&lt;/mod-up&gt;
@ -558,13 +548,10 @@ XML will handle this automatically):
</P>
<PRE>
--prop:/input/joysticks/button[0]/binding[0]/command=property-assign
--prop:/input/joysticks/button[0]/binding[0]/property=/controls/gear/wheel[0]/brake
--prop:/input/joysticks/button[0]/binding[0]/property=/controls/gear/brake-left
--prop:/input/joysticks/button[0]/binding[0]/value=1.0
--prop:/input/joysticks/button[0]/binding[1]/command=property-assign
--prop:/input/joysticks/button[0]/binding[1]/property=/controls/gear/wheel[1]/brake
--prop:/input/joysticks/button[0]/binding[1]/value=1.0
--prop:/input/joysticks/button[0]/binding[2]/command=property-assign
--prop:/input/joysticks/button[0]/binding[2]/property=/controls/gear/wheel[2]/brake
--prop:/input/joysticks/button[0]/binding[1]/property=/controls/gear/brake-right
--prop:/input/joysticks/button[0]/binding[2]/value=1.0
--prop:/input/joysticks/button[0]/mod-up/binding[0]/command=property-assign
--prop:/input/joysticks/button[0]/mod-up/binding[0]/property=brakes[0]
@ -572,9 +559,6 @@ XML will handle this automatically):
--prop:/input/joysticks/button[0]/mod-up/binding[1]/command=property-assign
--prop:/input/joysticks/button[0]/mod-up/binding[1]/property=brakes[1]
--prop:/input/joysticks/button[0]/mod-up/binding[1]/value=0.0
--prop:/input/joysticks/button[0]/mod-up/binding[2]/command=property-assign
--prop:/input/joysticks/button[0]/mod-up/binding[2]/property=brakes[2]
--prop:/input/joysticks/button[0]/mod-up/binding[2]/value=0.0
</PRE>
<br>
<P>
@ -717,13 +701,13 @@ just as with the joystick:
&lt;desc&gt;Left brake&lt;/desc&gt;
&lt;binding&gt;
&lt;command&gt;property-assign&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[0]/brake&lt;/property&gt;
&lt;property&gt;/controls/gear/brake-left&lt;/property&gt;
&lt;value type="double"&gt;1.0&lt;/value&gt;
&lt;/binding&gt;
&lt;mod-up&gt;
&lt;binding&gt;
&lt;command&gt;property-assign&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[0]/brake&lt;/property&gt;
&lt;property&gt;/controls/gear/brake-left&lt;/property&gt;
&lt;value type="double"&gt;0.0&lt;/value&gt;
&lt;/binding&gt;
&lt;/mod-up&gt;
@ -741,15 +725,7 @@ no &lt;mod-up&gt; tag, so it *does* work like a parking brake.
&lt;desc&gt;Toggle parking brake on or off&lt;/desc&gt;
&lt;binding&gt;
&lt;command&gt;property-toggle&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[0]/brake&lt;/property&gt;
&lt;/binding&gt;
&lt;binding&gt;
&lt;command&gt;property-toggle&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[1]/brake&lt;/property&gt;
&lt;/binding&gt;
&lt;binding&gt;
&lt;command&gt;property-toggle&lt;/command&gt;
&lt;property&gt;/controls/gear/wheel[2]/brake&lt;/property&gt;
&lt;property&gt;/controls/gear/brake-parking&lt;/property&gt;
&lt;/binding&gt;
&lt;/key&gt;
</PRE>

View file

@ -503,7 +503,7 @@ of a switch see $FG_ROOT/Aircraft/c172/Instruments/brake.xml.
&lt;layer&gt;
&lt;name&gt;Brake light&lt;/name&gt;
&lt;type&gt;switch&lt;/type&gt; &lt;!-- define layer as a switch --&gt;
&lt;property&gt;/controls/gear/wheel[0]/brake&lt;/property&gt; &lt;!-- tie it to a property --&gt;
&lt;property&gt;/controls/gear/brake-left&lt;/property&gt; &lt;!-- tie it to a property --&gt;
&lt;layer1&gt; &lt;!-- layer for true state --&gt;
&lt;name&gt;on&lt;/name&gt; &lt;!-- label to make life easy --&gt;
&lt;texture&gt; &lt;!-- layer1 of switch is a texture layer --&gt;

View file

@ -23,7 +23,7 @@ $Id$
<axis n="0">
<binding>
<command>property-scale</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<offset>1.0</offset>
<factor>0.5</factor>
</binding>
@ -32,7 +32,7 @@ $Id$
<axis n="1">
<binding>
<command>property-scale</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<offset>1.0</offset>
<factor>0.5</factor>
</binding>

View file

@ -51,13 +51,25 @@ joystick, and that the first button is the trigger.
<button n="0">
<desc>Brakes</desc>
<binding>
<command>nasal</command>
<script>props.setAll("/controls/gear/wheel", "brake", 1)</script>
<command>property-assign</command>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>props.setAll("/controls/gear/wheel", "brake", 0)</script>
<command>property-assign</command>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
</button>

View file

@ -42,13 +42,25 @@ $Id$
<button n="0">
<desc>Brakes</desc>
<binding>
<command>nasal</command>
<script>props.setAll("/controls/gear/wheel", "brake", 1)</script>
<command>property-assign</command>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>props.setAll("/controls/gear/wheel", "brake", 0)</script>
<command>property-assign</command>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
</button>

View file

@ -146,33 +146,23 @@ $Id$
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -217,13 +207,13 @@ $Id$
<desc>Right brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -232,13 +222,13 @@ $Id$
<desc>Left brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -150,33 +150,23 @@ $Id$
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -226,13 +216,13 @@ $Id$
<desc>Right brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -242,13 +232,13 @@ $Id$
<desc>Left brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -127,33 +127,23 @@ $Id$
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -208,13 +198,13 @@ $Id$
<button n="5">
<binding>
<command>property-assign</command>
<property>/controls/wheel[0]/brake</property>
<property>/controls/brake-left</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/wheel[0]/brake</property>
<property>/controls/brake-left</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -223,13 +213,13 @@ $Id$
<button n="6">
<binding>
<command>property-assign</command>
<property>/controls/wheel[0]/brake</property>
<property>/controls/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/wheel[0]/brake</property>
<property>/controls/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -118,33 +118,23 @@ $Id$
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -199,13 +189,13 @@ $Id$
<button n="6">
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -214,13 +204,13 @@ $Id$
<button n="7">
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -209,13 +209,13 @@ $Id$
<repeatable>true</repeatable>
<binding>
<command>property-adjust</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<step>0.1</step>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value>0.0</value>
</binding>
</mod-up>
@ -225,13 +225,13 @@ $Id$
<repeatable>true</repeatable>
<binding>
<command>property-adjust</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<step>0.1</step>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value>0.0</value>
</binding>
</mod-up>

View file

@ -150,33 +150,23 @@
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -241,13 +231,13 @@
<desc>Right brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -257,13 +247,13 @@
<desc>Left brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -151,33 +151,23 @@ $Id:
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -227,13 +217,13 @@ $Id:
<desc>Right brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -243,13 +233,13 @@ $Id:
<desc>Left brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -150,33 +150,23 @@ $Id$
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -226,13 +216,13 @@ $Id$
<desc>Right brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -242,13 +232,13 @@ $Id$
<desc>Left brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -152,33 +152,23 @@ $Id$
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -228,13 +218,13 @@ $Id$
<desc>Right brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -244,13 +234,13 @@ $Id$
<desc>Left brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -102,33 +102,23 @@ $Id$
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -139,13 +129,13 @@ $Id$
<desc>Left brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -155,13 +145,13 @@ $Id$
<desc>Right brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -161,33 +161,23 @@ $Id$
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -206,13 +196,13 @@ $Id$
<desc>Left Brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -223,13 +213,13 @@ $Id$
<desc>Right Brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -157,33 +157,23 @@ This file defines primary flight-control bindings as follow:
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -85,10 +85,10 @@ $Id$
# In mode 3 (taxiing), map the wheelbrakes
if(getprop("/input/joysticks/js[0]/saitek-x45-mode") == 3) {
val = cmdarg().getNode("setting").getValue();
setprop("/controls/gear/wheel[0]/brake", 0);
setprop("/controls/gear/wheel[1]/brake", 0);
if(val > 0) { setprop("/controls/gear/wheel[1]/brake", val); }
else { setprop("/controls/gear/wheel[0]/brake", -val); }
setprop("/controls/gear/brake-left", 0);
setprop("/controls/gear/brake-right", 0);
if(val > 0) { setprop("/controls/gear/brake-right", val); }
else { setprop("/controls/gear/brake-left", -val); }
}
]]></script>
</binding>
@ -167,17 +167,25 @@ $Id$
<button n="0">
<desc>Brakes</desc>
<binding>
<command>nasal</command>
<script>
props.setAll("/controls/gear/wheel", "brake", 1);
</script>
<command>property-assign</command>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>
props.setAll("/controls/gear/wheel", "brake", 0);
</script>
<command>property-assign</command>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
</button>

View file

@ -147,33 +147,23 @@ $Id$
<desc>Brakes</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[2]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>

View file

@ -211,13 +211,13 @@ calculated by adding 256 to the GLUT key value in glut.h.
<desc>Left brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[0]/brake</property>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -228,13 +228,13 @@ calculated by adding 256 to the GLUT key value in glut.h.
<desc>Right brake</desc>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/gear/wheel[1]/brake</property>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
@ -428,7 +428,7 @@ calculated by adding 256 to the GLUT key value in glut.h.
<desc>Toggle parking brake on or off</desc>
<binding>
<command>property-toggle</command>
<property>/controls/gear/parking-brake</property>
<property>/controls/gear/brake-parking</property>
</binding>
</key>
@ -539,13 +539,25 @@ calculated by adding 256 to the GLUT key value in glut.h.
<name>b</name>
<desc>Apply all brakes.</desc>
<binding>
<command>nasal</command>
<script>props.setAll("/controls/gear/wheel", "brake", 1)</script>
<command>property-assign</command>
<property>/controls/gear/brake-left</property>
<value type="double">1.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-right</property>
<value type="double">1.0</value>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>props.setAll("/controls/gear/wheel", "brake", 0)</script>
<command>property-assign</command>
<property>/controls/gear/brake-left</property>
<value type="double">0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/gear/brake-right</property>
<value type="double">0.0</value>
</binding>
</mod-up>
</key>

View file

@ -498,15 +498,9 @@ Started September 2000 by David Megginson, david@megginson.com
</engines>
<gear>
<wheel n="0">
<brake type="double">0.0</brake>
</wheel>
<wheel n="1">
<brake type="double">0.0</brake>
</wheel>
<wheel n="2">
<brake type="double">0.0</brake>
</wheel>
<brake-left type="double">0.0</brake-left>
<brake-right type="double">0.0</brake-right>
<brake-parking type="double">0.0</brake-parking>
<gear-down type="bool">true</gear-down>
</gear>