HID-input config file for GoFlight MFR radio
This commit is contained in:
parent
aeab8af2a5
commit
d2bdcb9879
1 changed files with 17 additions and 21 deletions
|
@ -1,7 +1,7 @@
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
|
|
||||||
<name>GoFlight MFR</name>
|
<name>GoFlight MFR</name>
|
||||||
<debug-events type="bool">true</debug-events>
|
<debug-events type="bool">false</debug-events>
|
||||||
|
|
||||||
<nasal>
|
<nasal>
|
||||||
<open>
|
<open>
|
||||||
|
@ -10,13 +10,14 @@
|
||||||
var activeNode = props.globals.getNode("/input/goflight/mfr/active", 1);
|
var activeNode = props.globals.getNode("/input/goflight/mfr/active", 1);
|
||||||
var standbyNode = props.globals.getNode("/input/goflight/mfr/standby-mhz", 1);
|
var standbyNode = props.globals.getNode("/input/goflight/mfr/standby-mhz", 1);
|
||||||
var selectedNode = props.globals.getNode("/input/goflight/mfr/selected-mhz", 1);
|
var selectedNode = props.globals.getNode("/input/goflight/mfr/selected-mhz", 1);
|
||||||
|
var brightnessNode = props.globals.getNode("/input/goflight/mfr/brightness", 8);
|
||||||
|
|
||||||
var updateActive = func(newActive)
|
var updateActive = func(newActive)
|
||||||
{
|
{
|
||||||
activeChannel = newActive;
|
activeChannel = newActive;
|
||||||
activeNode.setValue(activeChannel);
|
activeNode.setValue(activeChannel);
|
||||||
|
|
||||||
printlog("info", "Active channel is now:" ~ activeChannel);
|
printlog("info", "GoFlight MFR: Active channel is now:" ~ activeChannel);
|
||||||
var prefix = "/instrumentation/nav[" ~ activeChannel ~ "]/frequencies/";
|
var prefix = "/instrumentation/nav[" ~ activeChannel ~ "]/frequencies/";
|
||||||
|
|
||||||
standbyNode.unalias();
|
standbyNode.unalias();
|
||||||
|
@ -68,19 +69,13 @@
|
||||||
return formatFrequency(selectedNode.getValue());
|
return formatFrequency(selectedNode.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
var ledState = func()
|
|
||||||
{
|
|
||||||
if (activeChannel == 1) return chr(0x04);
|
|
||||||
return chr(0x2);
|
|
||||||
}
|
|
||||||
|
|
||||||
updateActive(0);
|
updateActive(0);
|
||||||
]]>
|
]]>
|
||||||
</open>
|
</open>
|
||||||
</nasal>
|
</nasal>
|
||||||
|
|
||||||
<event>
|
<event>
|
||||||
<name>rel-dial</name>
|
<name>rel-dial-0</name>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-adjust</command>
|
<command>property-adjust</command>
|
||||||
<property>/input/goflight/mfr/standby-mhz</property>
|
<property>/input/goflight/mfr/standby-mhz</property>
|
||||||
|
@ -136,16 +131,10 @@
|
||||||
<nasal-function>standbyAlphanumeric</nasal-function>
|
<nasal-function>standbyAlphanumeric</nasal-function>
|
||||||
</report>
|
</report>
|
||||||
|
|
||||||
<report>
|
|
||||||
<report-id type="int">7</report-id>
|
|
||||||
<watch>/input/goflight/mfr/active</watch>
|
|
||||||
<nasal-function>ledState</nasal-function>
|
|
||||||
</report>
|
|
||||||
<!--
|
|
||||||
<event>
|
<event>
|
||||||
<name>led-misc</name>
|
<name>led-misc-1</name>
|
||||||
<setting>
|
<setting>
|
||||||
<value>4</value>
|
<value>1</value>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>/input/goflight/mfr/active</property>
|
<property>/input/goflight/mfr/active</property>
|
||||||
|
@ -154,7 +143,7 @@
|
||||||
</condition>
|
</condition>
|
||||||
</setting>
|
</setting>
|
||||||
<setting>
|
<setting>
|
||||||
<value>7</value>
|
<value>0</value>
|
||||||
<condition>
|
<condition>
|
||||||
<not-equals>
|
<not-equals>
|
||||||
<property>/input/goflight/mfr/active</property>
|
<property>/input/goflight/mfr/active</property>
|
||||||
|
@ -165,9 +154,9 @@
|
||||||
</event>
|
</event>
|
||||||
|
|
||||||
<event>
|
<event>
|
||||||
<name>led-misc-1</name>
|
<name>led-misc-2</name>
|
||||||
<setting>
|
<setting>
|
||||||
<value>7</value>
|
<value>1</value>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>/input/goflight/mfr/active</property>
|
<property>/input/goflight/mfr/active</property>
|
||||||
|
@ -185,7 +174,14 @@
|
||||||
</condition>
|
</condition>
|
||||||
</setting>
|
</setting>
|
||||||
</event>
|
</event>
|
||||||
-->
|
|
||||||
|
<event>
|
||||||
|
<name>display-brightness</name>
|
||||||
|
<setting>
|
||||||
|
<property>/input/goflight/mfr/brightness</property>
|
||||||
|
</setting>
|
||||||
|
</event>
|
||||||
|
|
||||||
<event>
|
<event>
|
||||||
<desc>Transfer Button</desc>
|
<desc>Transfer Button</desc>
|
||||||
<name>button-1</name>
|
<name>button-1</name>
|
||||||
|
|
Loading…
Reference in a new issue