1
0
Fork 0

Use the new DME support under /instrumentation/ instead of the old

support under /radios/.

The display now goes dark when the switch is turned off.

The switch position is now handled entirely within the XML -- the C++
code is generic, so that other DME receiver types can also be
modelled.
This commit is contained in:
david 2003-03-09 04:13:18 +00:00
parent 67390808d2
commit 426631620a

View file

@ -46,28 +46,23 @@ properties' values.
<type>switch</type>
<w>128</w>
<h>64</h>
<layer>
<condition>
<property>/radios/dme/in-range</property>
<equals>
<property>/instrumentation/dme/switch-position</property>
<value type="int">0</value>
</equals>
</condition>
<name>display</name>
<type>text</type>
<font>led</font>
<point-size>6</point-size>
<color>
<red>1.0</red>
<green>0.5</green>
<blue>0.0</blue>
</color>
<chunks>
<chunk>
<type>number-value</type>
<property>/radios/dme/distance-nm</property>
<format>%5.1f</format>
</chunk>
</chunks>
<type>group</type>
</layer>
<layer>
<condition>
<not>
<property>/instrumentation/dme/in-range</property>
</not>
</condition>
<name>display</name>
<type>text</type>
<font>led</font>
@ -84,6 +79,49 @@ properties' values.
</chunk>
</chunks>
</layer>
<layer>
<condition>
<greater-than>
<property>/instrumentation/dme/indicated-distance-nm</property>
<value type="double">999.99</value>
</greater-than>
</condition>
<name>display</name>
<type>text</type>
<font>led</font>
<point-size>6</point-size>
<color>
<red>1.0</red>
<green>0.5</green>
<blue>0.0</blue>
</color>
<chunks>
<chunk>
<type>literal</type>
<text>999.99</text>
</chunk>
</chunks>
</layer>
<layer>
<name>display</name>
<type>text</type>
<font>led</font>
<point-size>6</point-size>
<color>
<red>1.0</red>
<green>0.5</green>
<blue>0.0</blue>
</color>
<chunks>
<chunk>
<type>number-value</type>
<property>/instrumentation/dme/indicated-distance-nm</property>
<format>%5.1f</format>
</chunk>
</chunks>
</layer>
<transformations>
<transformation>
<type>x-shift</type>
@ -99,27 +137,23 @@ properties' values.
<layer>
<name>ground speed towards station</name>
<type>switch</type>
<layer>
<condition>
<property>/radios/dme/in-range</property>
<equals>
<property>/instrumentation/dme/switch-position</property>
<value type="int">0</value>
</equals>
</condition>
<type>text</type>
<font>led</font>
<point-size>6</point-size>
<color>
<red>1.0</red>
<green>0.5</green>
<blue>0.0</blue>
</color>
<chunks>
<chunk>
<type>number-value</type>
<property>/radios/dme/speed-kt</property>
<format>%3.0f</format>
</chunk>
</chunks>
<type>group</type>
</layer>
<layer>
<condition>
<not>
<property>/instrumentation/dme/in-range</property>
</not>
</condition>
<name>display</name>
<type>text</type>
<font>led</font>
@ -136,21 +170,32 @@ properties' values.
</chunk>
</chunks>
</layer>
<transformations>
<transformation>
<type>y-shift</type>
<offset>11</offset>
</transformation>
</transformations>
</layer>
<layer>
<name>time to station</name>
<type>switch</type>
<layer>
<condition>
<property>/radios/dme/in-range</property>
<greater-than>
<property>/instrumentation/dme/indicated-ground-speed-kt</property>
<value type="double">999</value>
</greater-than>
</condition>
<name>display</name>
<type>text</type>
<font>led</font>
<point-size>6</point-size>
<color>
<red>1.0</red>
<green>0.5</green>
<blue>0.0</blue>
</color>
<chunks>
<chunk>
<type>literal</type>
<text>999</text>
</chunk>
</chunks>
</layer>
<layer>
<type>text</type>
<font>led</font>
<point-size>6</point-size>
@ -162,12 +207,40 @@ properties' values.
<chunks>
<chunk>
<type>number-value</type>
<property>/radios/dme/ete-min</property>
<format>%2.0f</format>
<property>/instrumentation/dme/indicated-ground-speed-kt</property>
<format>%3.0f</format>
</chunk>
</chunks>
</layer>
<transformations>
<transformation>
<type>y-shift</type>
<offset>11</offset>
</transformation>
</transformations>
</layer>
<layer>
<name>time to station</name>
<type>switch</type>
<layer>
<condition>
<equals>
<property>/instrumentation/dme/switch-position</property>
<value type="int">0</value>
</equals>
</condition>
<type>group</type>
</layer>
<layer>
<condition>
<not>
<property>/instrumentation/dme/in-range</property>
</not>
</condition>
<name>display</name>
<type>text</type>
<font>led</font>
@ -184,6 +257,49 @@ properties' values.
</chunk>
</chunks>
</layer>
<layer>
<condition>
<greater-than>
<property>/instrumentation/dme/indicated-time-min</property>
<value type="double">99</value>
</greater-than>
</condition>
<name>display</name>
<type>text</type>
<font>led</font>
<point-size>6</point-size>
<color>
<red>1.0</red>
<green>0.5</green>
<blue>0.0</blue>
</color>
<chunks>
<chunk>
<type>literal</type>
<text>99</text>
</chunk>
</chunks>
</layer>
<layer>
<type>text</type>
<font>led</font>
<point-size>6</point-size>
<color>
<red>1.0</red>
<green>0.5</green>
<blue>0.0</blue>
</color>
<chunks>
<chunk>
<type>number-value</type>
<property>/instrumentation/dme/indicated-time-min</property>
<format>%02.0f</format>
</chunk>
</chunks>
</layer>
<transformations>
<transformation>
<type>y-shift</type>
@ -214,7 +330,7 @@ properties' values.
</transformation>
<transformation>
<type>rotation</type>
<property>/radios/dme/switch-position</property>
<property>/instrumentation/dme/switch-position</property>
<min>0</min>
<max>3</max>
<scale>45</scale>
@ -240,12 +356,45 @@ properties' values.
<h>32</h>
<binding>
<command>property-adjust</command>
<property>/radios/dme/switch-position</property>
<property>/instrumentation/dme/switch-position</property>
<step>-1</step>
<min>0</min>
<max>3</max>
<wrap>0</wrap>
</binding>
<binding>
<condition>
<equals>
<property>/instrumentation/dme/switch-position</property>
<value type="int">1</value>
</equals>
</condition>
<command>property-assign</command>
<property>/instrumentation/dme/frequencies/source</property>
<value>/radios/nav[0]/frequencies/selected-mhz</value>
</binding>
<binding>
<condition>
<equals>
<property>/instrumentation/dme/switch-position</property>
<value type="int">2</value>
</equals>
</condition>
<command>property-assign</command>
<property>/instrumentation/dme/frequencies/source</property>
<value>/instrumentation/dme/frequencies/selected-mhz</value>
</binding>
<binding>
<condition>
<equals>
<property>/instrumentation/dme/switch-position</property>
<value type="int">2</value>
</equals>
</condition>
<command>property-assign</command>
<property>/instrumentation/dme/frequencies/selected-mhz</property>
<property>/radios/nav[1]/frequencies/selected-mhz</property>
</binding>
</action>
<action>
@ -257,12 +406,56 @@ properties' values.
<h>32</h>
<binding>
<command>property-adjust</command>
<property>/radios/dme/switch-position</property>
<property>/instrumentation/dme/switch-position</property>
<step>1</step>
<min>0</min>
<max>3</max>
<wrap>0</wrap>
</binding>
<binding>
<condition>
<equals>
<property>/instrumentation/dme/switch-position</property>
<value type="int">1</value>
</equals>
</condition>
<command>property-assign</command>
<property>/instrumentation/dme/frequencies/source</property>
<value>/radios/nav[0]/frequencies/selected-mhz</value>
</binding>
<binding>
<condition>
<equals>
<property>/instrumentation/dme/switch-position</property>
<value type="int">2</value>
</equals>
</condition>
<command>property-assign</command>
<property>/instrumentation/dme/frequencies/source</property>
<value>/instrumentation/dme/frequencies/selected-mhz</value>
</binding>
<binding>
<condition>
<equals>
<property>/instrumentation/dme/switch-position</property>
<value type="int">2</value>
</equals>
</condition>
<command>property-assign</command>
<property>/instrumentation/dme/frequencies/selected-mhz</property>
<property>/radios/nav[0]/frequencies/selected-mhz</property>
</binding>
<binding>
<condition>
<equals>
<property>/instrumentation/dme/switch-position</property>
<value type="int">3</value>
</equals>
</condition>
<command>property-assign</command>
<property>/instrumentation/dme/frequencies/source</property>
<value>/radios/nav[1]/frequencies/selected-mhz</value>
</binding>
</action>
</actions>