Make adf power on/off a seperate property.
[fg:toms-fgdata.git] / Aircraft / Instruments / kr-87adf.xml
1 <?xml version="1.0"?>
2
3 <!--
4 King KR-87 ADF radio instrument.
5 John Check <j4strngs@rockfish.net>
6 July 2002
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>52</h-base>
31
32  <layers>
33
34   <layer>
35    <name>background</name>
36    <texture>
37     <path>Aircraft/Instruments/Textures/kr-87adf.rgb</path>
38     <x1>0.0</x1>
39     <y1>0.80</y1>
40     <x2>1.0</x2>
41     <y2>1.0</y2>
42    </texture>
43   </layer>
44   
45   <layer>
46    <name>ADF annunciator</name>
47    <condition>
48     <equals>
49      <property>/radios/kr-87/annunciators/adf</property>
50      <value>true</value>
51     </equals>
52    </condition>
53     <type>text</type>
54      <point-size>6</point-size>
55      <color>
56       <red>1.0</red>
57       <green>0.5</green>
58       <blue>0.0</blue>
59      </color>
60      <chunks>
61       <chunk>
62        <type>literal</type>
63        <text>ADF</text>
64       </chunk>
65      </chunks>
66    <transformations>
67     <transformation>
68      <type>x-shift</type>
69      <offset>-110</offset>
70     </transformation>
71     <transformation>
72      <type>y-shift</type>
73      <offset>3</offset>
74     </transformation>
75    </transformations>
76   </layer>
77     
78   <layer>
79    <name>ANT annunciator</name>  
80    <condition>
81     <equals>
82      <property>/radios/kr-87/annunciators/ant</property>
83      <value>true</value>
84     </equals>
85    </condition>
86     <type>text</type>
87      <point-size>6</point-size>
88      <color>
89       <red>1.0</red>
90       <green>0.5</green>
91       <blue>0.0</blue>
92      </color>
93      <chunks>
94       <chunk>
95        <type>literal</type>
96        <text>ANT</text>
97       </chunk>
98      </chunks>
99    <transformations>
100     <transformation>
101      <type>x-shift</type>
102      <offset>-110</offset>
103     </transformation>
104     <transformation>
105      <type>y-shift</type>
106      <offset>3</offset>
107     </transformation>
108    </transformations>
109    </layer>
110   
111   <layer>
112    <name>Selected FRQ display</name>
113    <condition>
114     <equals>
115      <property>/radios/kr-87/inputs/power-btn</property>
116      <value>true</value>
117     </equals>
118    </condition>
119    <type>text</type>
120    <font>led</font>
121    <point-size>14</point-size>
122    <color>
123     <red>1.0</red>
124     <green>0.5</green>
125     <blue>0.0</blue>
126    </color>
127    <chunks>
128     <chunk>
129      <type>number-value</type>
130      <property>/radios/kr-87/outputs/selected-khz</property>
131      <format>%4.0f</format>
132     </chunk>
133    </chunks>
134    <transformations>
135     <transformation>
136      <type>x-shift</type>
137      <offset>-85</offset>
138     </transformation>
139     <transformation>
140      <type>y-shift</type>
141      <offset>3</offset>
142     </transformation>
143    </transformations>
144   </layer>
145   
146   <layer>
147    <name>BFO annunciator</name> 
148    <condition>
149     <equals>
150      <property>/radios/kr-87/annunciators/bfo</property>
151      <value>true</value>
152     </equals>
153    </condition> 
154    <type>text</type>
155    <point-size>6</point-size>
156    <color>
157     <red>1.0</red>
158     <green>0.5</green>
159     <blue>0.0</blue>
160    </color>
161    <chunks>
162     <chunk>
163     <type>literal</type>
164     <text>BFO</text>
165     </chunk>
166    </chunks>
167    <transformations>
168     <transformation>
169      <type>x-shift</type>
170      <offset>-50</offset>
171     </transformation>
172     <transformation>
173      <type>y-shift</type>
174      <offset>13</offset>
175     </transformation>
176    </transformations>
177   </layer>
178
179   <layer>
180    <name>Standby FRQ annunciator</name> 
181    <condition>
182     <equals>
183      <property>/radios/kr-87/annunciators/frq</property>
184      <value>true</value>
185     </equals>
186    </condition> 
187    <type>text</type>
188    <point-size>6</point-size>
189    <color>
190     <red>1.0</red>
191     <green>0.5</green>
192     <blue>0.0</blue>
193    </color>
194    <chunks>
195     <chunk>
196     <type>literal</type>
197     <text>FRQ</text>
198     </chunk>
199    </chunks>
200    <transformations>
201     <transformation>
202      <type>x-shift</type>
203      <offset>-45</offset>
204     </transformation>
205     <transformation>
206      <type>y-shift</type>
207      <offset>0</offset>
208     </transformation>
209    </transformations>
210   </layer>
211
212   <layer>
213    <name>Standby FRQ display</name>
214    <condition>
215     <equals>
216     <property>/radios/kr-87/annunciators/frq</property>
217     <value>true</value>
218     </equals>
219     <equals>
220     <property>/radios/kr-87/modes/stby</property>
221     <value>0</value>
222     </equals>
223    </condition>
224    <type>text</type>
225    <font>led</font>
226    <point-size>14</point-size>
227    <color>
228     <red>1.0</red>
229     <green>0.5</green>
230     <blue>0.0</blue>
231    </color>
232    <chunks>
233     <chunk>
234      <type>number-value</type>
235      <property>/radios/kr-87/outputs/standby-khz</property>
236      <format>%4.0f</format>
237     </chunk>
238    </chunks>
239    <transformations>
240     <transformation>
241      <type>x-shift</type>
242      <offset>-10</offset>
243     </transformation>
244     <transformation>
245      <type>y-shift</type>
246      <offset>3</offset>
247     </transformation>
248    </transformations>
249   </layer>
250   
251   <layer>
252    <name>Flight Timer display</name>
253    <condition>
254     <equals>
255      <property>/radios/kr-87/inputs/power-btn</property>
256      <value>true</value>
257     </equals>
258     <equals>
259     <property>/radios/kr-87/modes/stby</property>
260     <value>1</value>
261     </equals>
262     <equals>
263     <property>/radios/kr-87/annunciators/flt</property>
264     <value>1</value>
265     </equals>
266    </condition>
267    <type>text</type>
268    <font>led</font>
269    <point-size>14</point-size>
270    <color>
271     <red>1.0</red>
272     <green>0.5</green>
273     <blue>0.0</blue>
274    </color>
275    <chunks>
276     <chunk>
277      <type>text-value</type>
278      <property>/radios/kr-87/outputs/timer-string</property>
279     </chunk>
280    </chunks>
281    <transformations>
282     <transformation>
283      <type>x-shift</type>
284      <offset>-10</offset>
285     </transformation>
286     <transformation>
287      <type>y-shift</type>
288      <offset>3</offset>
289     </transformation>
290    </transformations>
291   </layer>
292
293   <layer>
294    <name>Elapsed Timer display</name>
295    <condition>
296     <equals>
297      <property>/radios/kr-87/inputs/power-btn</property>
298      <value>true</value>
299     </equals>
300     <equals>
301     <property>/radios/kr-87/modes/stby</property>
302     <value>1</value>
303     </equals>
304     <equals>
305     <property>/radios/kr-87/annunciators/et</property>
306     <value>1</value>
307     </equals>
308    </condition>
309    <type>text</type>
310    <font>led</font>
311    <point-size>14</point-size>
312    <color>
313     <red>1.0</red>
314     <green>0.5</green>
315     <blue>0.0</blue>
316    </color>
317    <chunks>
318     <chunk>
319      <type>text-value</type>
320      <property>/radios/kr-87/outputs/timer-string</property>
321     </chunk>
322    </chunks>
323    <transformations>
324     <transformation>
325      <type>x-shift</type>
326      <offset>-10</offset>
327     </transformation>
328     <transformation>
329      <type>y-shift</type>
330      <offset>3</offset>
331     </transformation>
332    </transformations>
333   </layer>
334   
335   
336   <layer>
337    <name>Flight Time annunciator</name> 
338    <condition>
339     <equals>
340      <property>/radios/kr-87/annunciators/flt</property>
341      <value>true</value>
342     </equals>
343    </condition> 
344    <type>text</type>
345    <point-size>6</point-size>
346    <color>
347     <red>1.0</red>
348     <green>0.5</green>
349     <blue>0.0</blue>
350    </color>
351    <chunks>
352     <chunk>
353     <type>literal</type>
354     <text>FLT</text>
355     </chunk>
356    </chunks>
357    <transformations>
358     <transformation>
359      <type>x-shift</type>
360      <offset>40</offset>
361     </transformation>
362     <transformation>
363      <type>y-shift</type>
364      <offset>13</offset>
365     </transformation>
366    </transformations>
367   </layer>
368
369   <layer>
370    <name>Elapsed Time annunciator</name> 
371    <condition>
372     <equals>
373      <property>/radios/kr-87/annunciators/et</property>
374      <value>true</value>
375     </equals>
376    </condition> 
377    <type>text</type>
378    <point-size>6</point-size>
379    <color>
380     <red>1.0</red>
381     <green>0.5</green>
382     <blue>0.0</blue>
383    </color>
384    <chunks>
385     <chunk>
386     <type>literal</type>
387     <text>ET</text>
388     </chunk>
389    </chunks>
390    <transformations>
391     <transformation>
392      <type>x-shift</type>
393      <offset>45</offset>
394     </transformation>
395     <transformation>
396      <type>y-shift</type>
397      <offset>0</offset>
398     </transformation>
399    </transformations>
400   </layer>
401
402 <!-- knobs -->
403
404  <layer>
405   <name>freq/time adjust</name>
406   <texture>
407   <path>Aircraft/Instruments/Textures/blister.rgb</path>
408   <x1>0.0</x1>
409   <y1>0.75</y1>
410   <x2>0.25</x2>
411   <y2>1.0</y2>
412   </texture>
413   <h>32</h>
414   <w>32</w>
415    <transformations>
416     <transformation>
417      <type>x-shift</type>
418      <offset>100</offset>
419     </transformation>
420    </transformations>
421  </layer> 
422
423   <layer>
424    <name>ident on|off|volume knob</name>
425    <texture>
426     <path>Aircraft/Instruments/Textures/blister.rgb</path>
427     <x1>0.0</x1>
428     <y1>0.75</y1>
429     <x2>0.25</x2>
430     <y2>1.0</y2>
431    </texture>
432    <w>15</w>
433    <h>15</h>
434    <transformations>
435     <transformation>
436      <type>x-shift</type>
437      <offset>70</offset>
438     </transformation>
439     <transformation>
440      <type>y-shift</type>
441      <offset>-16</offset>
442     </transformation>
443    </transformations>
444   </layer>
445   <layer>
446    <name>ident knob pointer</name>
447    <texture>
448     <path>Aircraft/Instruments/Textures/blister.rgb</path>
449     <x1>0.0</x1>
450     <y1>0.1640625</y1>
451     <x2>0.1</x2>
452     <y2>0.328125</y2>
453    </texture>
454    <w>2</w>
455    <h>6</h>
456    <transformations>
457     <transformation>
458      <type>x-shift</type>
459      <offset>70</offset>
460     </transformation>
461     <transformation>
462      <type>y-shift</type>
463      <offset>-16</offset>
464     </transformation>
465     <transformation>
466      <type>rotation</type>
467      <property>/radios/kr-87/inputs/volume</property>
468      <min>0</min>
469      <max>2</max>
470      <scale>140</scale>
471      <offset>-140</offset>
472     </transformation>
473     <transformation>
474      <type>y-shift</type>
475      <offset>3</offset>
476     </transformation>
477    </transformations>
478   </layer>
479
480
481 <!-- button labels- this is temporary -->
482   <layer>
483    <name>ADF button label</name>
484    <type>text</type>
485    <point-size>6</point-size>
486    <color>
487     <red>0.0</red>
488     <green>0.0</green>
489     <blue>0.0</blue>
490    </color>
491    <chunks>
492     <chunk>
493      <type>literal</type>
494      <text>ADF</text>
495     </chunk>
496    </chunks>
497    <transformations>
498     <transformation>
499      <type>x-shift</type>
500      <offset>-94</offset>
501     </transformation>
502     <transformation>
503      <type>y-shift</type>
504      <offset>-19</offset>
505     </transformation>
506    </transformations>
507   </layer>
508  
509   <layer>
510    <name>BFO button label</name>
511    <type>text</type>
512    <point-size>6</point-size>
513    <color>
514     <red>0.0</red>
515     <green>0.0</green>
516     <blue>0.0</blue>
517    </color>
518    <chunks>
519     <chunk>
520      <type>literal</type>
521      <text>BFO</text>
522     </chunk>
523    </chunks>
524    <transformations>
525     <transformation>
526      <type>x-shift</type>
527      <offset>-69</offset>
528     </transformation>
529     <transformation>
530      <type>y-shift</type>
531      <offset>-19</offset>
532     </transformation>
533    </transformations>
534   </layer>
535
536   <layer>
537    <name>FRQ button label</name>
538    <type>text</type>
539    <point-size>6</point-size>
540    <color>
541     <red>0.0</red>
542     <green>0.0</green>
543     <blue>0.0</blue>
544    </color>
545    <chunks>
546     <chunk>
547      <type>literal</type>
548      <text>FRQ</text>
549     </chunk>
550    </chunks>
551    <transformations>
552     <transformation>
553      <type>x-shift</type>
554      <offset>-44</offset>
555     </transformation>
556     <transformation>
557      <type>y-shift</type>
558      <offset>-19</offset>
559     </transformation>
560    </transformations>
561   </layer>
562
563   <layer>
564    <name>FLT button label</name>
565    <type>text</type>
566    <point-size>4</point-size>
567    <color>
568     <red>0.0</red>
569     <green>0.0</green>
570     <blue>0.0</blue>
571    </color>
572    <chunks>
573     <chunk>
574      <type>literal</type>
575      <text>FLT
576 /ET</text>
577     </chunk>
578    </chunks>
579    <transformations>
580     <transformation>
581      <type>x-shift</type>
582      <offset>-16</offset>
583     </transformation>
584     <transformation>
585      <type>y-shift</type>
586      <offset>-15</offset>
587     </transformation>
588    </transformations>
589   </layer>
590
591   <layer>
592    <name>SET/RST button label</name>
593    <type>text</type>
594    <point-size>4</point-size>
595    <color>
596     <red>0.0</red>
597     <green>0.0</green>
598     <blue>0.0</blue>
599    </color>
600    <chunks>
601     <chunk>
602      <type>literal</type>
603      <text>SET
604 /RST</text>
605     </chunk>
606    </chunks>
607    <transformations>
608     <transformation>
609      <type>x-shift</type>
610      <offset>10</offset>
611     </transformation>
612     <transformation>
613      <type>y-shift</type>
614      <offset>-15</offset>
615     </transformation>
616    </transformations>
617   </layer>
618
619 <!-- end labels -->
620
621  </layers>
622
623  <actions>
624
625  <!-- buttons -->
626   <action>
627    <name>ADF button</name>
628    <button>0</button>
629    <x>-97</x>
630    <y>-24</y>
631    <w>18</w>
632    <h>14</h>
633    <binding>
634     <command>property-toggle</command>
635     <property>/radios/kr-87/inputs/adf-btn</property>
636    </binding>
637   </action>
638   
639   <action>
640    <name>BFO button</name>
641    <button>0</button>
642    <x>-77</x>
643    <y>-24</y>
644    <w>18</w>
645    <h>14</h>
646    <binding>
647     <command>property-toggle</command>
648     <property>/radios/kr-87/inputs/bfo-btn</property>
649    </binding>
650   </action>
651   
652  <action>
653    <name>FRQ button</name>
654    <button>0</button>
655    <x>-45</x>
656    <y>-24</y>
657    <w>18</w>
658    <h>14</h>
659    <binding>
660     <command>property-toggle</command>
661     <property>/radios/kr-87/inputs/frq-btn</property>
662    </binding>
663   </action>
664  
665   <action>
666    <name>Flight timer/ Elapsed timer button</name>
667    <button>0</button>
668    <x>-20</x>
669    <y>-24</y>
670    <w>18</w>
671    <h>14</h>
672    <binding>
673     <command>property-toggle</command>
674     <property>/radios/kr-87/inputs/flt-et-btn</property>
675    </binding>
676   </action>
677  
678   <action>
679    <name>Timer set reset</name>
680    <button>0</button>
681    <x>7</x>
682    <y>-24</y>
683    <w>18</w>
684    <h>14</h>
685    <binding>
686     <command>property-toggle</command>
687     <property>/radios/kr-87/inputs/set-rst-btn</property>
688    </binding>
689   </action>
690  
691 <!-- end buttons -->
692   
693   <action>
694    <name>timer set seconds down</name>
695    <button>0</button>
696    <x>89</x>
697    <y>-12</y>
698    <w>12</w>
699    <h>24</h>
700    <condition>
701     <equals>
702     <property>/radios/kr-87/modes/count</property>
703     <value>2</value>
704     </equals>
705    </condition> 
706    <binding>
707     <command>property-adjust</command>
708     <property>/radios/kr-87/outputs/elapsed-timer</property>
709     <step>-1</step>
710     <min>1.0</min>
711     <max>216000.0</max>
712     <wrap>0</wrap>
713    </binding>
714   </action>
715
716   <action>
717    <name>timer set seconds up</name>
718    <button>0</button>
719    <x>100</x>
720    <y>-12</y>
721    <w>12</w>
722    <h>24</h>
723    <condition>
724     <equals>
725     <property>/radios/kr-87/modes/count</property>
726     <value>2</value>
727     </equals>
728    </condition> 
729    <binding>
730     <command>property-adjust</command>
731     <property>/radios/kr-87/outputs/elapsed-timer</property>
732     <step>1</step>
733     <min>1.0</min>
734     <max>216000.0</max>
735     <wrap>0</wrap>
736    </binding>
737   </action>
738   
739  <action>
740    <name>timer set hours down</name>
741    <button>1</button>
742    <x>89</x>
743    <y>-12</y>
744    <w>12</w>
745    <h>24</h>
746    <condition>
747     <equals>
748     <property>/radios/kr-87/modes/count</property>
749     <value>2</value>
750     </equals>
751    </condition> 
752    <binding>
753     <command>property-adjust</command>
754     <property>/radios/kr-87/outputs/elapsed-timer</property>
755     <step>-60</step>
756     <min>1.0</min>
757     <max>3599.0</max>
758     <wrap>0</wrap>
759    </binding>
760   </action>
761
762   <action>
763    <name>timer set hours up</name>
764    <button>1</button>
765    <x>100</x>
766    <y>-12</y>
767    <w>12</w>
768    <h>24</h>
769    <condition>
770     <equals>
771     <property>/radios/kr-87/modes/count</property>
772     <value>2</value>
773     </equals>
774    </condition> 
775    <binding>
776     <command>property-adjust</command>
777     <property>/radios/kr-87/outputs/elapsed-timer</property>
778     <step>60</step>
779     <min>1.0</min>
780     <max>3599.0</max>
781     <wrap>0</wrap>
782    </binding>
783   </action>
784
785   <action>
786    <name>small frequency decrease</name>
787    <button>0</button>
788    <x>89</x>
789    <y>-12</y>
790    <w>12</w>
791    <h>24</h>
792    <condition>
793     <not-equals>
794     <property>/radios/kr-87/modes/count</property>
795     <value>2</value>
796     </not-equals>
797    </condition> 
798    <binding>
799     <command>property-adjust</command>
800     <property>/radios/kr-87/outputs/selected-khz</property>
801     <step>-1</step>
802     <min>100</min>
803     <max>1299</max>
804     <wrap>1</wrap>
805    </binding>
806   </action>
807   
808   <action>
809    <name>small increase</name>
810    <button>0</button>
811    <x>100</x>
812    <y>-12</y>
813    <w>12</w>
814    <h>24</h>
815    <condition>
816     <not-equals>
817     <property>/radios/kr-87/modes/count</property>
818     <value>2</value>
819     </not-equals>
820    </condition> 
821    <binding>
822     <command>property-adjust</command>
823     <property>/radios/kr-87/outputs/selected-khz</property>
824     <step>1</step>
825     <min>100</min>
826     <max>1299</max>
827     <wrap>1</wrap>
828    </binding>
829   </action>
830   
831
832   <action>
833    <name>large decrease</name>
834    <button>1</button>
835    <x>89</x>
836    <y>-12</y>
837    <w>12</w>
838    <h>24</h>
839    <condition>
840     <not-equals>
841     <property>/radios/kr-87/modes/count</property>
842     <value>2</value>
843     </not-equals>
844    </condition> 
845    <binding>
846     <command>property-adjust</command>
847     <property>/radios/kr-87/outputs/selected-khz</property>
848     <step>-25</step>
849     <min>100</min>
850     <max>1299</max>
851     <wrap>1</wrap>
852    </binding>
853   </action>
854
855
856   <action>
857    <name>large increase</name>
858    <button>1</button>
859    <x>100</x>
860    <y>-12</y>
861    <w>12</w>
862    <h>24</h>
863    <condition>
864     <not-equals>
865     <property>/radios/kr-87/modes/count</property>
866     <value>2</value>
867     </not-equals>
868    </condition> 
869    <binding>
870     <command>property-adjust</command>
871     <property>/radios/kr-87/outputs/selected-khz</property>
872     <step>25</step>
873     <min>100</min>
874     <max>1299</max>
875     <wrap>1</wrap>
876    </binding>
877   </action>
878  
879
880   <action>
881    <name>ident on|volume increase</name>
882    <button>0</button>
883    <x>70</x>
884    <y>-24</y>
885    <w>8</w>
886    <h>16</h>
887    <binding>
888     <command>property-adjust</command>
889     <property>/radios/kr-87/inputs/volume</property>
890     <step>0.5</step>
891     <min>0</min>
892     <max>2</max>
893    </binding>
894   </action>
895   <action>
896    <name>ident volume decrease|off</name>
897    <button>0</button>
898    <x>62</x>
899    <y>-24</y>
900    <w>16</w>
901    <h>8</h>
902    <binding>
903     <command>property-adjust</command>
904     <property>/radios/kr-87/inputs/volume</property>
905     <step>-0.5</step>
906     <min>0</min>
907     <max>2</max>
908    </binding>
909   </action>
910  
911  </actions>
912
913 </PropertyList>