Apologies guys for not providing "diff" files for previous suggestions
on joysticks.
Wanted to see if anyone was interested before I did so!
Here we go:
For Nasal/controls.nas:
diff -up controls.nas.orig controls.nas
--- controls.nas.orig Sat Jun 18 15:50:59 2005
+++ controls.nas Sat Jun 18 16:02:44 2005
@@ -76,6 +76,12 @@ propellerAxis = func {
if(size(arg) > 0) { val = -val; }
props.setAll("/controls/engines/engine", "propeller-pitch", (1 -
val)/2);
}
+carbheatAxis = func {
+ val = cmdarg().getNode("setting").getValue();
+ if(size(arg) > 0) { val = -val; }
+ props.setAll("/controls/anti-ice/engine", "carb-heat", (1 -
val)/2);
+}
+
##
# Wrapper around stepProps() which emulates the "old" flap behavior for
For Input/Joysticks/Saitek/X45.xml:
diff -up X45.xml.orig X45.xml
--- X45.xml.orig Mon May 10 16:30:02 2004
+++ X45.xml Sat Jun 18 16:18:30 2005
@@ -10,16 +10,19 @@ Only a few stick controls have been mapp
+ Stick button "A": Gear toggle
+ Stick button "C": Reset view (hackish)
+Corrections here when Plib fixed to recognise dial
+([EMAIL PROTECTED] 17/6/2005)
+
Linux/Windows/Mac Axis Numbers:
0 Roll (positive == right)
1 Pitch (positive == down/back/nose-up)
- 2/5/4 top "rotary dial" on the throttle (positive == CCW)
+ 2/5/5 top "rotary dial" on the throttle (positive == CCW)
3 Rocker switch ("rudder" control) on the throttle (positive ==
right)
4/2/2 Throttle (positive == back/down/idle)
- 5/4/? Bottom "rotary dial" on the throttle (positive == CW)
+ 5/4/4 Bottom "rotary dial" on the throttle (positive == CW)
Strange this axis doesn't seem to exist on Mac OS X!
- 6/6/5 Lower right hat horizontal axis (positive == right)
- 7/7/6 Lower right hat vertical axis (positive == down (Mac positive
is UP))
+ 6/6/6 Lower right hat horizontal axis (positive == right)
+ 7/7/7 Lower right hat vertical axis (positive == down (Mac positive
is UP))
Button Numbers (Identical b/w Linux/Windows/Mac):
0 Trigger
@@ -55,6 +58,7 @@ $Id: X45.xml,v 1.11 2004/05/06 16:12:32
<name>Saitek X45</name>
<name>Saitek Saitek X45</name>
<name>Saitek X45 Flight Controller USB</name>
+ <name>Saitek X45 Flight Control Stick </name>
<axis n="0">
<desc>Aileron</desc>
@@ -103,7 +107,7 @@ $Id: X45.xml,v 1.11 2004/05/06 16:12:32
<number>
<unix>6</unix>
<windows>6</windows>
- <mac>5</mac>
+ <mac>6</mac>
</number>
<desc>View Direction</desc>
<low>
@@ -127,7 +131,7 @@ $Id: X45.xml,v 1.11 2004/05/06 16:12:32
<number>
<unix>7</unix>
<windows>7</windows>
- <mac>6</mac>
+ <mac>7</mac>
</number>
<low>
<repeatable>true</repeatable>
@@ -163,6 +167,7 @@ $Id: X45.xml,v 1.11 2004/05/06 16:12:32
<number>
<unix>2</unix>
<windows>5</windows>
+ <mac>5</mac>
</number>
<binding>
<command>nasal</command>
@@ -175,11 +180,11 @@ $Id: X45.xml,v 1.11 2004/05/06 16:12:32
<number>
<unix>5</unix>
<windows>4</windows>
-<!-- <mac>???</mac> -->
+ <mac>4</mac>
</number>
<binding>
<command>nasal</command>
- <script>controls.propellerAxis(-1)</script>
+ <script>controls.carbheatAxis()</script>
</binding>
</axis>
For plib-1.8.4/src/js/jsMacOSX.cxx :
diff -up jsMacOSX.cxx.orig jsMacOSX.cxx
--- jsMacOSX.cxx.orig Tue Sep 21 12:45:55 2004
+++ jsMacOSX.cxx Mon Jun 20 17:14:46 2005
@@ -183,7 +183,7 @@ void jsJoystick::open()
&plugin, &score);
if (rv != kIOReturnSuccess) {
- ulSetError(UL_WARNING, "error creting plugin for io
device");
+ ulSetError(UL_WARNING, "error creating plugin for io
device");
return;
}
@@ -275,7 +275,7 @@ void os_specific_s::enumerateElements(js
&elementEnumerator, joy);
}
-static void os_specific_s::elementEnumerator( const void *element,
void* vjs)
+void os_specific_s::elementEnumerator( const void *element, void* vjs)
{
if (CFGetTypeID((CFTypeRef) element) !=
CFDictionaryGetTypeID()) {
ulSetError(UL_WARNING, "element enumerator passed
non-dictionary value");
@@ -315,6 +315,7 @@ void os_specific_s::parseElement(jsJoyst
case kHIDUsage_GD_Ry:
case kHIDUsage_GD_Rz:
case kHIDUsage_GD_Slider: // for
throttle / trim controls
+ case kHIDUsage_GD_Dial:
//printf(" axis\n");
/*joy->os->*/addAxisElement(joy, (CFDictionaryRef) element);
break;
cheers
Jim
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d