Make knobs work on the standby frequency rather than the active
[fg:toms-fgdata.git] / Aircraft / Instruments / adf-radio.xml
1 <?xml version="1.0"?>
2
3 <!--
4 Parameterized ADF radio instrument.
5 John Check <j4strngs@rockfish.net>
6 June 2001
7
8 This is an instrument configuration file for the open-source flight
9 simulator FlightGear (www.flightgear.org).  The file is an XML-encoded
10 FlightGear property list defining the instrument's layers and actions.
11
12 Each instrument is composed of layers stacked on top of each other.
13 A layer may be a texture (with transparent parts to show the layers
14 underneath), text, or a special layer that switches between two
15 others (say, to turn an indicator light on or off).  Each layer can
16 move independently in proportion to a property value, and text
17 can be generated from property values as well: all of the layer's
18 movements are defined as transformations.
19
20 Actions are hotspots on the instrument that will respond to a mouse
21 click.  Actions always modify the values of properties, either by
22 adjusting them, toggling them, or swaping them with other
23 properties' values.
24 -->
25
26 <PropertyList>
27
28  <name>ADF Radio</name>
29  <w-base>256</w-base>
30  <h-base>64</h-base>
31
32 <params>
33   <adf-freq-selected-prop>/radios/kr-87/outputs/selected-khz</adf-freq-selected-prop>
34   <adf-freq-standby-prop>/radios/kr-87/outputs/standby-khz</adf-freq-standby-prop>
35   <adf-morse-id-volume-prop>/radios/kr-87/inputs/volume</adf-morse-id-volume-prop>
36   <adf-morse-ident-toggle-prop>/radios/kr-87/inputs/ident-btn</adf-morse-ident-toggle-prop>
37 </params>
38
39  <layers>
40
41   <layer>
42    <name>background</name>
43    <texture>
44     <path>Aircraft/Instruments/Textures/navcom-radios.rgb</path>
45     <x1>0.0</x1>
46     <y1>0.5</y1>
47     <x2>1.0</x2>
48     <y2>0.75</y2>
49    </texture>
50   </layer>
51   
52   <layer>
53    <name>display</name>
54    <type>text</type>
55    <font>led</font>
56    <point-size>14</point-size>
57    <color>
58     <red>1.0</red>
59     <green>0.5</green>
60     <blue>0.0</blue>
61    </color>
62    <chunks>
63     <chunk>
64      <type>number-value</type>
65      <property alias="../../../../../params/adf-freq-selected-prop"/>
66      <format>%4.0f</format>
67     </chunk>
68     <chunk>
69      <type>number-value</type>
70      <property alias="../../../../../params/adf-freq-standby-prop"/>
71      <format>%8.0f</format>
72     </chunk>
73    </chunks>
74    <transformations>
75     <transformation>
76      <type>x-shift</type>
77      <offset>-110</offset>
78     </transformation>
79     <transformation>
80      <type>y-shift</type>
81      <offset>-4</offset>
82     </transformation>
83    </transformations>
84   </layer>
85  
86   <layer>
87    <name>annunciator display</name>
88    <type>text</type>
89    <point-size>6</point-size>
90    <color>
91     <red>1.0</red>
92     <green>0.5</green>
93     <blue>0.0</blue>
94    </color>
95    <chunks>
96     <chunk>
97      <type>literal</type>
98      <text>SEL               STDBY</text>
99     </chunk>
100    </chunks>
101    <transformations>
102     <transformation>
103      <type>x-shift</type>
104      <offset>-90</offset>
105     </transformation>
106     <transformation>
107      <type>y-shift</type>
108      <offset>12</offset>
109     </transformation>
110    </transformations>
111   </layer>
112
113   <layer>
114    <name>swap adffrequencies button label</name>
115    <type>text</type>
116    <point-size>6</point-size>
117    <color>
118     <red>0.0</red>
119     <green>0.0</green>
120     <blue>0.0</blue>
121    </color>
122    <chunks>
123     <chunk>
124      <type>literal</type>
125      <text>SWAP</text>
126     </chunk>
127    </chunks>
128    <transformations>
129     <transformation>
130      <type>x-shift</type>
131      <offset>-95</offset>
132     </transformation>
133     <transformation>
134      <type>y-shift</type>
135      <offset>-20</offset>
136     </transformation>
137    </transformations>
138   </layer>
139  
140  <layer>
141   <name>knob</name>
142   <texture>
143   <path>Aircraft/Instruments/Textures/blister.rgb</path>
144   <x1>0.0</x1>
145   <y1>0.75</y1>
146   <x2>0.25</x2>
147   <y2>1.0</y2>
148   </texture>
149   <h>32</h>
150   <w>32</w>
151    <transformations>
152     <transformation>
153      <type>x-shift</type>
154      <offset>100</offset>
155     </transformation>
156    </transformations>
157  </layer> 
158
159   <layer>
160    <name>ident knob</name>
161    <texture>
162     <path>Aircraft/Instruments/Textures/blister.rgb</path>
163     <x1>0.0</x1>
164     <y1>0.75</y1>
165     <x2>0.25</x2>
166     <y2>1.0</y2>
167    </texture>
168    <w>15</w>
169    <h>15</h>
170    <transformations>
171     <transformation>
172      <type>x-shift</type>
173      <offset>70</offset>
174     </transformation>
175     <transformation>
176      <type>y-shift</type>
177      <offset>-16</offset>
178     </transformation>
179    </transformations>
180   </layer>
181   <layer>
182    <name>ident knob pointer</name>
183    <texture>
184     <path>Aircraft/Instruments/Textures/blister.rgb</path>
185     <x1>0.0</x1>
186     <y1>0.1640625</y1>
187     <x2>0.1</x2>
188     <y2>0.328125</y2>
189    </texture>
190    <w>2</w>
191    <h>6</h>
192    <transformations>
193     <transformation>
194      <type>x-shift</type>
195      <offset>70</offset>
196     </transformation>
197     <transformation>
198      <type>y-shift</type>
199      <offset>-16</offset>
200     </transformation>
201     <transformation>
202      <type>rotation</type>
203      <property>/radios/kr-87/inputs/volume</property>
204      <min>0</min>
205      <max>2</max>
206      <scale>140</scale>
207      <offset>-140</offset>
208     </transformation>
209     <transformation>
210      <type>y-shift</type>
211      <offset>3</offset>
212     </transformation>
213    </transformations>
214   </layer>
215   <layer>
216    <name>voice/ident toggle</name>
217     <type>switch</type>
218     <property alias="../../../params/adf-morse-ident-toggle-prop"/>
219       <layer>
220       <name>voice on</name>
221       <texture>
222       <path>Aircraft/Instruments/Textures/switches.rgb</path>
223       <x1>0.0</x1>
224       <y1>0.75</y1>
225       <x2>0.25</x2>
226       <y2>1.0</y2>
227       </texture>
228       <w>12</w>
229       <h>12</h>
230     <transformations>
231       <transformation>
232       <type>y-shift</type>
233       <offset>1</offset>
234       </transformation>
235     </transformations>
236     </layer>
237     <layer>
238     <name>ident on</name>
239     <texture>
240     <path>Aircraft/Instruments/Textures/switches.rgb</path>
241     <x1>0.0</x1>
242     <y1>0.0</y1>
243     <x2>0.25</x2>
244     <y2>0.30</y2>
245     </texture>
246     <w>12</w>
247     <h>15</h>
248     </layer>
249     <transformations>
250      <transformation>
251       <type>x-shift</type>
252       <offset>42</offset>
253       </transformation>
254     <transformation>
255     <type>y-shift</type>
256     <offset>-20</offset>
257     </transformation>
258    </transformations>
259   </layer>
260
261  </layers>
262
263  <actions>
264
265   <action>
266    <name>small decrease</name>
267    <button>0</button>
268    <x>89</x>
269    <y>-12</y>
270    <w>12</w>
271    <h>24</h>
272    <binding>
273     <command>property-adjust</command>
274     <property alias="../../../../params/adf-freq-standby-prop"/>
275     <step>-1</step>
276     <min>100</min>
277     <max>1299</max>
278     <wrap>1</wrap>
279    </binding>
280   </action>
281
282   <action>
283    <name>large decrease</name>
284    <button>1</button>
285    <x>89</x>
286    <y>-12</y>
287    <w>12</w>
288    <h>24</h>
289    <binding>
290     <command>property-adjust</command>
291     <property alias="../../../../params/adf-freq-standby-prop"/>
292     <step>-100</step>
293     <min>100</min>
294     <max>1299</max>
295     <wrap>1</wrap>
296    </binding>
297   </action>
298
299   <action>
300    <name>small increase</name>
301    <button>0</button>
302    <x>100</x>
303    <y>-12</y>
304    <w>12</w>
305    <h>24</h>
306    <binding>
307     <command>property-adjust</command>
308     <property alias="../../../../params/adf-freq-standby-prop"/>
309     <step>1</step>
310     <min>100</min>
311     <max>1299</max>
312     <wrap>1</wrap>
313    </binding>
314   </action>
315
316   <action>
317    <name>large increase</name>
318    <button>1</button>
319    <x>100</x>
320    <y>-12</y>
321    <w>12</w>
322    <h>24</h>
323    <binding>
324     <command>property-adjust</command>
325     <property alias="../../../../params/adf-freq-standby-prop"/>
326     <step>100</step>
327     <min>100</min>
328     <max>1299</max>
329     <wrap>1</wrap>
330    </binding>
331   </action>
332
333   <action>
334    <name>swap adf frequencies</name>
335    <button>0</button>
336    <x>-95</x>
337    <y>-26</y>
338    <w>20</w>
339    <h>14</h>
340    <binding>
341     <command>property-swap</command>
342     <property alias="../../../../params/adf-freq-selected-prop"/>
343     <property alias="../../../../params/adf-freq-standby-prop"/>
344    </binding>
345   </action>
346  
347   <action>
348    <name>ident volume increase</name>
349    <button>0</button>
350    <x>70</x>
351    <y>-24</y>
352    <w>8</w>
353    <h>16</h>
354    <binding>
355     <command>property-adjust</command>
356     <property alias="../../../../params/adf-morse-id-volume-prop"/>
357     <step>0.5</step>
358     <min>0</min>
359     <max>2</max>
360    </binding>
361   </action>
362
363   <action>
364    <name>ident volume decrease</name>
365    <button>0</button>
366    <x>62</x>
367    <y>-24</y>
368    <w>16</w>
369    <h>8</h>
370    <binding>
371     <command>property-adjust</command>
372     <property alias="../../../../params/adf-morse-id-volume-prop"/>
373     <step>-0.5</step>
374     <min>0</min>
375     <max>2</max>
376    </binding>
377   </action>
378  
379   <action>
380    <name>ident volume</name>
381    <button>0</button>
382    <x>37</x>
383    <y>-30</y>
384    <w>14</w>
385    <h>16</h>
386    <binding>
387     <command>property-adjust</command>
388     <property alias="../../../../params/adf-morse-ident-toggle-prop"/>
389     <step>1.0</step>
390     <min>0</min>
391     <max>1</max>
392     <wrap>1</wrap>
393    </binding>
394   </action>
395
396  </actions>
397
398 </PropertyList>