2016-11-08 13:40:54 +00:00
|
|
|
<PropertyList>
|
|
|
|
|
|
|
|
<name>GoFlight GF EFIS</name>
|
2018-11-14 17:42:06 +00:00
|
|
|
<debug-events type="bool">false</debug-events>
|
2016-11-08 13:40:54 +00:00
|
|
|
|
|
|
|
<nasal>
|
|
|
|
<open>
|
|
|
|
<![CDATA[
|
2018-11-14 17:42:06 +00:00
|
|
|
|
|
|
|
var basePath = "/instrumentation/efis[0]/";
|
|
|
|
|
|
|
|
# value is 0..8 for the konb on 738, GF only goes to 10
|
|
|
|
var efisRangeKnobNode = props.globals.getNode(basePath ~ "inputs/range-knob");
|
|
|
|
efisRangeKnobNode.setIntValue(0);
|
|
|
|
|
|
|
|
# value is absolute integer for each click, hmmmm
|
|
|
|
var efisBaroKnobNode = props.globals.getNode(basePath ~ "inputs/baro-knob");
|
|
|
|
|
|
|
|
var setRangeBit = func(bit) {
|
|
|
|
var b = efisRangeKnobNode.getValue() - 1;
|
|
|
|
efisRangeKnobNode.setIntValue(bits.set(b, bit) + 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
var clearRangeBit = func(bit) {
|
|
|
|
var b = efisRangeKnobNode.getValue() - 1;
|
|
|
|
efisRangeKnobNode.setIntValue(bits.clear(b, bit) + 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
var efisNDModeNode = props.globals.getNode(basePath ~ "mfd/mode-num");
|
|
|
|
var setModeBit = func(bit) {
|
|
|
|
var mode = efisNDModeNode.getValue();
|
|
|
|
efisNDModeNode.setIntValue(bits.set(mode, bit));
|
|
|
|
}
|
|
|
|
|
|
|
|
var clearModeBit = func(bit) {
|
|
|
|
var mode = efisNDModeNode.getValue();
|
|
|
|
efisNDModeNode.setIntValue(bits.clear(mode, bit));
|
|
|
|
}
|
2016-11-08 13:40:54 +00:00
|
|
|
]]>
|
|
|
|
</open>
|
|
|
|
</nasal>
|
|
|
|
|
2018-11-14 17:42:06 +00:00
|
|
|
<hid-descriptor>
|
|
|
|
<report>
|
|
|
|
<type>input</type>
|
|
|
|
<id>1</id>
|
|
|
|
<unused-bits><size type="int">16</size></unused-bits>
|
|
|
|
<rel-dial-0>
|
|
|
|
<size type="int">8</size>
|
|
|
|
<count type="int">2</count>
|
|
|
|
<is-signed type="bool">true</is-signed>
|
|
|
|
</rel-dial-0>
|
|
|
|
<button-0>
|
|
|
|
<count type="int">24</count>
|
|
|
|
</button-0>
|
|
|
|
</report>
|
|
|
|
</hid-descriptor>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<name>rel-dial-0</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/input/goflight/efis/height</property>
|
|
|
|
<min type="double">0.0</min>
|
|
|
|
</binding>
|
|
|
|
<interpolater>
|
2018-11-14 17:42:06 +00:00
|
|
|
<mirrored type="bool">true</mirrored>
|
2016-11-08 13:40:54 +00:00
|
|
|
<entry><ind>0</ind><dep>0</dep></entry>
|
|
|
|
<entry><ind>1</ind><dep>1</dep></entry>
|
|
|
|
<entry><ind>2</ind><dep>2</dep></entry>
|
|
|
|
<entry><ind>3</ind><dep>5</dep></entry>
|
|
|
|
<entry><ind>4</ind><dep>10</dep></entry>
|
|
|
|
</interpolater>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>rel-dial-1</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
2018-11-14 17:42:06 +00:00
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/instrumentation/efis[0]/inputs/baro-knob</property>
|
2016-11-08 13:40:54 +00:00
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>TERR Button</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-0</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/instrumentation/efis/inputs/terr</property>
|
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>POS Button</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-1</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/instrumentation/efis/inputs/pos</property>
|
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>DATA Button</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-2</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/instrumentation/efis/inputs/data</property>
|
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>ARPT Button</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-3</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/instrumentation/efis/inputs/arpt</property>
|
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>WPT Button</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-4</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/instrumentation/efis/inputs/wpt</property>
|
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>STA Button</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-5</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/instrumentation/efis/inputs/sta</property>
|
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>WXR Button</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-6</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/instrumentation/efis/inputs/wxr</property>
|
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
2018-11-14 17:42:06 +00:00
|
|
|
<desc></desc>
|
|
|
|
<name>button-7</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2018-11-14 17:42:06 +00:00
|
|
|
<script>debug.dump("Button 7");</script>
|
2016-11-08 13:40:54 +00:00
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
2018-11-14 17:42:06 +00:00
|
|
|
<desc></desc>
|
|
|
|
<name>button-8</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2018-11-14 17:42:06 +00:00
|
|
|
<script>setModeBit(0)</script>
|
2016-11-08 13:40:54 +00:00
|
|
|
</binding>
|
2018-11-14 17:42:06 +00:00
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>clearModeBit(0)</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
2016-11-08 13:40:54 +00:00
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
2018-11-14 17:42:06 +00:00
|
|
|
<desc></desc>
|
|
|
|
<name>button-9</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2018-11-14 17:42:06 +00:00
|
|
|
<script>setModeBit(1)</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>clearModeBit(1)</script>
|
2016-11-08 13:40:54 +00:00
|
|
|
</binding>
|
2018-11-14 17:42:06 +00:00
|
|
|
</mod-up>
|
2016-11-08 13:40:54 +00:00
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
2018-11-14 17:42:06 +00:00
|
|
|
<desc></desc>
|
|
|
|
<name>button-10</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2018-11-14 17:42:06 +00:00
|
|
|
<script>debug.dump("Button 10");</script>
|
2016-11-08 13:40:54 +00:00
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>in/HPA toggle</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-11</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/instrumentation/efis/inputs/kpa-mode</property>
|
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
2018-11-14 17:42:06 +00:00
|
|
|
<desc>DH/MCA knob push</desc>
|
|
|
|
<name>button-12</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2018-11-14 17:42:06 +00:00
|
|
|
<script>debug.dump("DH/MCA toggle");</script>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding>
|
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/instrumentation/efis/inputs/minimums-mode</property>
|
2016-11-08 13:40:54 +00:00
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
2018-11-14 17:42:06 +00:00
|
|
|
<desc></desc>
|
|
|
|
<name>button-13</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2018-11-14 17:42:06 +00:00
|
|
|
<script>setRangeBit(0)</script>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>clearRangeBit(0)</script>
|
2016-11-08 13:40:54 +00:00
|
|
|
</binding>
|
2018-11-14 17:42:06 +00:00
|
|
|
</mod-up>
|
2016-11-08 13:40:54 +00:00
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
2018-11-14 17:42:06 +00:00
|
|
|
<desc></desc>
|
|
|
|
<name>button-14</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2018-11-14 17:42:06 +00:00
|
|
|
<script>setRangeBit(1)</script>
|
2016-11-08 13:40:54 +00:00
|
|
|
</binding>
|
2018-11-14 17:42:06 +00:00
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>clearRangeBit(1)</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
2016-11-08 13:40:54 +00:00
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
2018-11-14 17:42:06 +00:00
|
|
|
<desc></desc>
|
|
|
|
<name>button-15</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2018-11-14 17:42:06 +00:00
|
|
|
<script>setRangeBit(2)</script>
|
2016-11-08 13:40:54 +00:00
|
|
|
</binding>
|
2018-11-14 17:42:06 +00:00
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>clearRangeBit(2)</script>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
2016-11-08 13:40:54 +00:00
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>ADF-L switch</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-16</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/instrumentation/efis/inputs/lh-vor-adf</property>
|
2018-11-14 17:42:06 +00:00
|
|
|
<value>-1</value>
|
2016-11-08 13:40:54 +00:00
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/instrumentation/efis/inputs/lh-vor-adf</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>VOR-L switch</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-17</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/instrumentation/efis/inputs/lh-vor-adf</property>
|
|
|
|
<value>1</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/instrumentation/efis/inputs/lh-vor-adf</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>ADF-R switch</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-18</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/instrumentation/efis/inputs/rh-vor-adf</property>
|
2018-11-14 17:42:06 +00:00
|
|
|
<value>-1</value>
|
2016-11-08 13:40:54 +00:00
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/instrumentation/efis/inputs/rh-vor-adf</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>VOR-R switch</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-19</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/instrumentation/efis/inputs/rh-vor-adf</property>
|
|
|
|
<value>1</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/instrumentation/efis/inputs/rh-vor-adf</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
|
|
|
<desc>MTRS Button</desc>
|
2018-11-14 17:42:06 +00:00
|
|
|
<name>button-20</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>debug.dump("Button MTRS");</script>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding>
|
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/instrumentation/efis/inputs/alt-meters</property>
|
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
<event>
|
2018-11-14 17:42:06 +00:00
|
|
|
<desc>FPV Button</desc>
|
|
|
|
<name>button-21</name>
|
2016-11-08 13:40:54 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>debug.dump("Button FPV");</script>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding>
|
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/instrumentation/efis/inputs/fpv</property>
|
|
|
|
</binding>
|
|
|
|
</event>
|
|
|
|
|
|
|
|
</PropertyList>
|