1
0
Fork 0

Merge branch 'master' of gitorious.org:fg/fgdata into work

This commit is contained in:
Vivian Meazza 2011-12-11 00:14:40 +00:00
commit 01006c88b0
3 changed files with 73 additions and 2 deletions

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- flight recorder configuration -->
<!-- NAV/COMM radio, matches Aircraft/Instruments-3d/kx165 -->
<PropertyList>
<signal>
<type>bool</type>
<property type="string">/instrumentation/comm[%i]/serviceable</property>
</signal>
<signal>
<type>bool</type>
<property type="string">/instrumentation/nav[%i]/serviceable</property>
</signal>
<signal>
<type>bool</type>
<property type="string">/instrumentation/nav[%i]/power-btn</property>
</signal>
<signal>
<type>bool</type>
<property type="string">/instrumentation/comm[%i]/frq-swap-btn</property>
</signal>
<signal>
<type>float</type>
<property type="string">/instrumentation/comm[%i]/frequencies/selected-mhz</property>
</signal>
<signal>
<type>float</type>
<property type="string">/instrumentation/comm[%i]/frequencies/standby-mhz</property>
</signal>
<signal>
<type>float</type>
<property type="string">/instrumentation/comm[%i]/volume</property>
</signal>
<signal>
<type>bool</type>
<property type="string">/instrumentation/comm[%i]/test-btn</property>
</signal>
<signal>
<type>bool</type>
<property type="string">/instrumentation/nav[%i]/frq-swap-btn</property>
</signal>
<signal>
<type>float</type>
<property type="string">/instrumentation/nav[%i]/frequencies/selected-mhz</property>
</signal>
<signal>
<type>float</type>
<property type="string">/instrumentation/nav[%i]/frequencies/standby-mhz</property>
</signal>
<signal>
<type>float</type>
<property type="string">/instrumentation/nav[%i]/volume</property>
</signal>
<signal>
<type>bool</type>
<property type="string">/instrumentation/nav[%i]/audio-btn</property>
</signal>
<signal>
<type>float</type>
<property type="string">/instrumentation/comm[%i]/dimming-norm</property>
</signal>
</PropertyList>

View file

@ -101,8 +101,10 @@ via raw HID support.
$ mkdir -p ~/.fgfs/Nasal
$ cp $FG_ROOT/Nasal/IOrules ~/.fgfs/Nasal
Now add these two lines there:
Now add these four lines there:
READ ALLOW /dev/input/hidraw/Thustmaster_Joystick_-_HOTAS_Warthog
READ ALLOW /dev/input/hidraw/Thrustmaster_Throttle_-_HOTAS_Warthog
WRITE ALLOW /dev/input/hidraw/Thustmaster_Joystick_-_HOTAS_Warthog
WRITE ALLOW /dev/input/hidraw/Thrustmaster_Throttle_-_HOTAS_Warthog

View file

@ -9,10 +9,13 @@
<PropertyList>
<nasal>
<script>
contains(caller(0)[0], "stick") and removelistener(stick.listener);
var stick = {
init: func {
me.x = me.y = 0;
jslistener("/input/joysticks/stick-angle", func(n) {
var a = props.globals.initNode("/input/joysticks/stick-angle");
me.listener = setlistener(a, func(n) {
me.angle = n.getValue() * D2R;
me.sin = math.sin(me.angle);
me.cos = math.cos(me.angle);
@ -32,6 +35,7 @@
setprop("/controls/flight/elevator", me.y * me.cos - me.x * me.sin);
},
};
stick.init();
</script>
</nasal>