Merge branch 'work' of D:\Git_New\fgdata
This commit is contained in:
commit
d530df428d
3 changed files with 73 additions and 2 deletions
65
Aircraft/Generic/flightrecorder/components/kx165.xml
Normal file
65
Aircraft/Generic/flightrecorder/components/kx165.xml
Normal 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>
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue