From f7c276944ead5a6e7170d81bf0e09ffa3c72816a Mon Sep 17 00:00:00 2001
From: curt
Date: Mon, 12 Jan 2004 17:49:33 +0000
Subject: [PATCH] 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.
---
Aircraft/Instruments/brakes.xml | 4 +-
Docs/README.Joystick.html | 50 ++++----------
Docs/README.xmlpanel.html | 2 +-
Input/Joysticks/CH/pro-pedals-usb.xml | 4 +-
.../Joysticks/Default/four-axis-joystick.xml | 22 +++++--
Input/Joysticks/Default/joystick.xml | 22 +++++--
Input/Joysticks/Logitech/extreme-3d-win.xml | 66 ++++++++-----------
.../wingman-extreme-digital-3d-win.xml | 26 +++-----
.../Logitech/wingman-extreme-digital-3d.xml | 26 +++-----
Input/Joysticks/Logitech/wingman-force.xml | 26 +++-----
.../Logitech/wingman-rumblepad-usb.xml | 8 +--
.../Joysticks/Microsoft/sidewinder-3d-pro.xml | 26 +++-----
.../Microsoft/sidewinder-force-feed-pro.xml | 26 +++-----
.../Microsoft/sidewinder-force-feed.xml | 26 +++-----
.../Microsoft/sidewinder-precision-pro.xml | 26 +++-----
Input/Joysticks/Microsoft/sidewinder.xml | 26 +++-----
.../Saitek/Cyborg-3d-Rumble-Force.xml | 26 +++-----
Input/Joysticks/Saitek/Cyborg-Gold-3d-USB.xml | 18 ++---
Input/Joysticks/Saitek/X45.xml | 34 ++++++----
Input/Joysticks/Saitek/X8-30.xml | 18 ++---
keyboard.xml | 30 ++++++---
preferences.xml | 12 +---
22 files changed, 209 insertions(+), 315 deletions(-)
diff --git a/Aircraft/Instruments/brakes.xml b/Aircraft/Instruments/brakes.xml
index 0a5c9a39b..9a3aadb1c 100644
--- a/Aircraft/Instruments/brakes.xml
+++ b/Aircraft/Instruments/brakes.xml
@@ -16,7 +16,7 @@
switch
- /controls/gear/parking-brake
+ /controls/gear/brake-parking
on
@@ -73,7 +73,7 @@
26
property-toggle
- /controls/gear/parking-brake
+ /controls/gear/brake-parking
diff --git a/Docs/README.Joystick.html b/Docs/README.Joystick.html
index 262d527c3..566aba777 100644
--- a/Docs/README.Joystick.html
+++ b/Docs/README.Joystick.html
@@ -473,13 +473,13 @@ button:
<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> <!-- brakes are a toggle so 1.0 represents on -->
</binding>
<mod-up> <!-- it's not a parking brake so we need to release it -->
<binding>
<command>property-assign</command>
- <property>/controls/gear/wheel[0]/brake</property>
+ <property>/controls/gear/brake-left</property>
<value type="double">0.0</value> <!-- 1.0 is on so 0.0 is off, right? -->
</binding>
</mod-up>
@@ -500,10 +500,10 @@ Here's the command-line equivalent:
--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
@@ -518,33 +518,23 @@ button 0 is pressed, and releases all three when button 0 is released:
<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>
@@ -558,13 +548,10 @@ XML will handle this automatically):
--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
@@ -717,13 +701,13 @@ just as with the joystick:
<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>
@@ -741,15 +725,7 @@ no <mod-up> tag, so it *does* work like a parking brake.
<desc>Toggle parking brake on or off</desc>
<binding>
<command>property-toggle</command>
- <property>/controls/gear/wheel[0]/brake</property>
- </binding>
- <binding>
- <command>property-toggle</command>
- <property>/controls/gear/wheel[1]/brake</property>
- </binding>
- <binding>
- <command>property-toggle</command>
- <property>/controls/gear/wheel[2]/brake</property>
+ <property>/controls/gear/brake-parking</property>
</binding>
</key>
diff --git a/Docs/README.xmlpanel.html b/Docs/README.xmlpanel.html
index 1cfb31ecb..529844394 100644
--- a/Docs/README.xmlpanel.html
+++ b/Docs/README.xmlpanel.html
@@ -503,7 +503,7 @@ of a switch see $FG_ROOT/Aircraft/c172/Instruments/brake.xml.
<layer>
<name>Brake light</name>
<type>switch</type> <!-- define layer as a switch -->
- <property>/controls/gear/wheel[0]/brake</property> <!-- tie it to a property -->
+ <property>/controls/gear/brake-left</property> <!-- tie it to a property -->
<layer1> <!-- layer for true state -->
<name>on</name> <!-- label to make life easy -->
<texture> <!-- layer1 of switch is a texture layer -->
diff --git a/Input/Joysticks/CH/pro-pedals-usb.xml b/Input/Joysticks/CH/pro-pedals-usb.xml
index 7c666e745..99d7fd1f3 100644
--- a/Input/Joysticks/CH/pro-pedals-usb.xml
+++ b/Input/Joysticks/CH/pro-pedals-usb.xml
@@ -23,7 +23,7 @@ $Id$
property-scale
- /controls/gear/wheel[0]/brake
+ /controls/gear/brake-left
1.0
0.5
@@ -32,7 +32,7 @@ $Id$
property-scale
- /controls/gear/wheel[1]/brake
+ /controls/gear/brake-right
1.0
0.5
diff --git a/Input/Joysticks/Default/four-axis-joystick.xml b/Input/Joysticks/Default/four-axis-joystick.xml
index 0c49c54bd..e5c8cca8c 100644
--- a/Input/Joysticks/Default/four-axis-joystick.xml
+++ b/Input/Joysticks/Default/four-axis-joystick.xml
@@ -51,13 +51,25 @@ joystick, and that the first button is the trigger.
diff --git a/Input/Joysticks/Default/joystick.xml b/Input/Joysticks/Default/joystick.xml
index dfe6d2d50..20ac3c873 100644
--- a/Input/Joysticks/Default/joystick.xml
+++ b/Input/Joysticks/Default/joystick.xml
@@ -42,13 +42,25 @@ $Id$
diff --git a/Input/Joysticks/Logitech/extreme-3d-win.xml b/Input/Joysticks/Logitech/extreme-3d-win.xml
index 5364f0359..b839d3ee4 100644
--- a/Input/Joysticks/Logitech/extreme-3d-win.xml
+++ b/Input/Joysticks/Logitech/extreme-3d-win.xml
@@ -143,40 +143,30 @@ $Id$
+ Brakes
+
+ property-assign
+ /controls/gear/brake-left
+ 1.0
+
+
+ property-assign
+ /controls/gear/brake-right
+ 1.0
+
+
+
+ property-assign
+ /controls/gear/brake-left
+ 0.0
+
+
+ property-assign
+ /controls/gear/brake-right
+ 0.0
+
+
+