1
0
Fork 0

P51d/SCR-522 updates.

Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
This commit is contained in:
Vivian Meazza 2011-06-22 15:13:57 +01:00
commit c3c527327e
9 changed files with 18239 additions and 8862 deletions

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -0,0 +1,693 @@
<?xml version="1.0"?>
<PropertyList>
<path>BC-602-A.ac</path>
<animation>
<type>range</type>
<min-m>0</min-m>
<max-property>/sim/rendering/static-lod/detailed</max-property>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-OFF</object-name>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>-0.005</dep>
</entry>
<entry>
<ind>1</ind>
<dep>0</dep>
</entry>
<entry>
<ind>2</ind>
<dep>0</dep>
</entry>
<entry>
<ind>3</ind>
<dep>0</dep>
</entry>
<entry>
<ind>4</ind>
<dep>0</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>0.0</y-m>
<z-m>-0.0</z-m>
</center>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>SCR-522C-T-base</object-name>
<object-name>SCR-522C-T-handle</object-name>
<object-name>SCR-522C-T-stem</object-name>
<property>/instrumentation/comm/SCR-522C/tr</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>0</dep>
</entry>
<entry>
<ind>1</ind>
<dep>37.5</dep>
</entry>
<entry>
<ind>2</ind>
<dep>75</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>-0.01</y-m>
<z-m>0.06</z-m>
</center>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>SCR-522C-REM</object-name>
<visible>false</visible>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/instrumentation/comm/SCR-522C/tr</property>
<value type="int">0</value>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>SCR-522C-R</object-name>
<visible>false</visible>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/instrumentation/comm/SCR-522C/tr</property>
<value type="int">1</value>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>SCR-522C-T</object-name>
<visible>false</visible>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/instrumentation/comm/SCR-522C/tr</property>
<value type="int">2</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/instrumentation/comm/SCR-522C/tr</property>
<value type="int">1</value>
</binding>
</mod-up>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>SCR-522C-A</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>1</value>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>SCR-522C-B</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>2</value>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>SCR-522C-C</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>3</value>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>SCR-522C-D</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>4</value>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>SCR-522C-OFF</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>0</value>
</binding>
</action>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-A</object-name>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>0</dep>
</entry>
<entry>
<ind>1</ind>
<dep>-0.005</dep>
</entry>
<entry>
<ind>2</ind>
<dep>0</dep>
</entry>
<entry>
<ind>3</ind>
<dep>0</dep>
</entry>
<entry>
<ind>4</ind>
<dep>0</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>0.0</y-m>
<z-m>-0.0</z-m>
</center>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-B</object-name>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>0</dep>
</entry>
<entry>
<ind>1</ind>
<dep>0</dep>
</entry>
<entry>
<ind>2</ind>
<dep>-0.005</dep>
</entry>
<entry>
<ind>3</ind>
<dep>0</dep>
</entry>
<entry>
<ind>4</ind>
<dep>0</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>0.0</y-m>
<z-m>-0.0</z-m>
</center>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-C</object-name>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>-0</dep>
</entry>
<entry>
<ind>1</ind>
<dep>-0.0</dep>
</entry>
<entry>
<ind>2</ind>
<dep>0</dep>
</entry>
<entry>
<ind>3</ind>
<dep>-0.005</dep>
</entry>
<entry>
<ind>4</ind>
<dep>0</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>0.0</y-m>
<z-m>-0.0</z-m>
</center>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-D</object-name>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>-0</dep>
</entry>
<entry>
<ind>1</ind>
<dep>-0.0</dep>
</entry>
<entry>
<ind>2</ind>
<dep>0</dep>
</entry>
<entry>
<ind>3</ind>
<dep>0</dep>
</entry>
<entry>
<ind>4</ind>
<dep>-0.005</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>0.0</y-m>
<z-m>-0.0</z-m>
</center>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-A.d</object-name>
<condition>
<and>
<equals>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>1</value>
</equals>
<property>/instrumentation/comm/SCR-522C/mask</property>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-A.b</object-name>
<condition>
<and>
<equals>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>1</value>
</equals>
<not>
<property>/instrumentation/comm/SCR-522C/mask</property>
</not>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-B.d</object-name>
<condition>
<and>
<equals>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>2</value>
</equals>
<property>/instrumentation/comm/SCR-522C/mask</property>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-B.b</object-name>
<condition>
<and>
<equals>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>2</value>
</equals>
<not>
<property>/instrumentation/comm/SCR-522C/mask</property>
</not>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-C.d</object-name>
<condition>
<and>
<equals>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>3</value>
</equals>
<property>/instrumentation/comm/SCR-522C/mask</property>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-C.b</object-name>
<condition>
<and>
<equals>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>3</value>
</equals>
<not>
<property>/instrumentation/comm/SCR-522C/mask</property>
</not>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-D.d</object-name>
<condition>
<and>
<equals>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>4</value>
</equals>
<property>/instrumentation/comm/SCR-522C/mask</property>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-D.b</object-name>
<condition>
<and>
<equals>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<value>4</value>
</equals>
<not>
<property>/instrumentation/comm/SCR-522C/mask</property>
</not>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-T.d</object-name>
<condition>
<and>
<not>
<property>/instrumentation/comm/ptt</property>
</not>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<property>/instrumentation/comm/SCR-522C/mask</property>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-T.b</object-name>
<condition>
<and>
<not>
<property>/instrumentation/comm/ptt</property>
</not>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<not>
<property>/instrumentation/comm/SCR-522C/mask</property>
</not>
</and>
</condition>
</animation>
<animation>
<type>pick</type>
<object-name>SCR-522C-mask-1</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>/instrumentation/comm/SCR-522C/mask</property>
<value type="bool">true</value>
<value type="bool">false</value>
</binding>
</action>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-mask-1</object-name>
<property>/instrumentation/comm/SCR-522C/mask</property>
<interpolation>
<entry>
<ind>1</ind>
<dep>0.007</dep>
</entry>
<entry>
<ind>0</ind>
<dep>0.0</dep>
</entry>
</interpolation>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>SCR-522-T-Lock</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>/instrumentation/comm/SCR-522C/tr-lock</property>
<value type="bool">true</value>
<value type="bool">false</value>
</binding>
</action>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522-T-Lock</object-name>
<property>/instrumentation/comm/SCR-522C/tr-lock</property>
<interpolation>
<entry>
<ind>1</ind>
<dep>0.007</dep>
</entry>
<entry>
<ind>0</ind>
<dep>0.0</dep>
</entry>
</interpolation>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>material</type>
<object-name>SCR-522C-top</object-name>
<object-name>SCR-522C-box</object-name>
<object-name>a-covers</object-name>
<object-name>SCR-522C-A</object-name>
<object-name>SCR-522C-B</object-name>
<object-name>SCR-522C-C</object-name>
<object-name>SCR-522C-D</object-name>
<object-name>SCR-522C-T-base</object-name>
<object-name>SCR-522C-T-handle</object-name>
<object-name>SCR-522C-T-stem</object-name>
<object-name>SCR-522C-light-cont-2</object-name>
<object-name>SCR-522C-light-cont-1</object-name>
<object-name>SCR-522C-OFF</object-name>
<object-name>rivet-1</object-name>
<object-name>rivet-2</object-name>
<object-name>rivet-3</object-name>
<object-name>rivet-4</object-name>
<object-name>rivet-5</object-name>
<object-name>rivet-6</object-name>
<object-name>rivet-7</object-name>
<object-name>rivet-8</object-name>
<object-name>rivet-9</object-name>
<object-name>rivet-10</object-name>
<object-name>rivet-11</object-name>
<object-name>rivet-12</object-name>
<object-name>rivet-13</object-name>
<object-name>rivet-14</object-name>
<object-name>rivet-15</object-name>
<object-name>rivet-16</object-name>
<object-name>red-placard.001</object-name>
<object-name>red-placard.002</object-name>
<object-name>black-placard.001</object-name>
<object-name>black-placard.002</object-name>
<object-name>right-outer-bracket</object-name>
<object-name>left-inner-bracket</object-name>
<object-name>left-outer-bracket</object-name>
<object-name>baseScrew1</object-name>
<object-name>baseScrew2</object-name>
<object-name>baseScrew3</object-name>
<object-name>baseScrew4</object-name>
<object-name>bigConnector</object-name>
<object-name>bigConnectorBase</object-name>
<object-name>bigConnectorScrew1</object-name>
<object-name>bigConnectorScrew2</object-name>
<object-name>bigConnectorScrew3</object-name>
<object-name>bigConnectorScrew4</object-name>
<object-name>smallConnector</object-name>
<object-name>smallConnectorBase</object-name>
<object-name>smallConnectorScrw1</object-name>
<object-name>smallConnectorScrw2</object-name>
<object-name>smallConnectorScrw3</object-name>
<object-name>smallConnectorScrw4</object-name>
<object-name>uniluminatedMaskTR</object-name>
<object-name>uniluminatedMask</object-name>
<emission>
<factor-prop>controls/lighting/cabin-norm</factor-prop>
<red>0.28</red>
<green>0.18</green>
<blue>0.18</blue>
</emission>
</animation>
<animation>
<type>material</type>
<object-name>SCR-522C-lamp-A.b</object-name>
<object-name>SCR-522C-lamp-B.b</object-name>
<object-name>SCR-522C-lamp-C.b</object-name>
<object-name>SCR-522C-lamp-D.b</object-name>
<emission>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<red>0.3</red>
<green>0.3</green>
<blue>1.0</blue>
</emission>
</animation>
<animation>
<type>material</type>
<object-name>SCR-522C-lamp-A.d</object-name>
<object-name>SCR-522C-lamp-B.d</object-name>
<object-name>SCR-522C-lamp-C.d</object-name>
<object-name>SCR-522C-lamp-D.d</object-name>
<emission>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<red>0.01</red>
<green>0.01</green>
<blue>0.25</blue>
</emission>
</animation>
<animation>
<type>material</type>
<object-name>SCR-522C-lamp-T.b</object-name>
<emission>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<red>1.0</red>
<green>1.0</green>
<blue>1.0</blue>
</emission>
</animation>
<animation>
<type>material</type>
<object-name>SCR-522C-lamp-T.d</object-name>
<emission>
<property>/instrumentation/comm/SCR-522C/frequencies/channel-selected</property>
<red>0.07</red>
<green>0.07</green>
<blue>0.07</blue>
</emission>
</animation>
</PropertyList>

View file

@ -0,0 +1,231 @@
<?xml version="1.0"?>
<PropertyList>
<name>SCR-522C-radio</name>
<width>550</width>
<modal>false</modal>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<empty>
<stretch>1</stretch>
</empty>
<text>
<label>Radio Frequencies SCR-522C (US) or TR1133 (UK)</label>
</text>
<empty>
<stretch>1</stretch>
</empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<label>Selected</label>
</text>
<group>
<layout>hbox</layout>
<text>
<label>Channel</label>
</text>
<text>
<label>Frequency</label>
</text>
</group>
<group>
<layout>hbox</layout>
<text>
<!--<label>xxxxxxx</label>-->
<label>Channel</label>
<live>true</live>
<!--<format>%.2f</format>-->
<property>/instrumentation/comm/SCR-522C/frequencies/channel</property>
</text>
<text>
<!--<label>xxxxxxx</label>-->
<label>MHz</label>
<live>true</live>
<format>%.2f</format>
<property>/instrumentation/comm[0]/frequencies/selected-mhz</property>
</text>
</group>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<text>
<label>Channel Assignment</label>
</text>
</group>
<group>
<layout>table</layout>
<!-- headers -->
<!--<text>
<row>0</row>
<col>4</col>
<label>Standby</label>
</text>-->
<!-- Dummy label to stretch table, as layout manager doesn't handle labels well -->
<text>
<row>0</row>
<col>6</col>
<label></label>
</text>
<text>
<row>1</row>
<col>0</col>
<halign>right</halign>
<label>A</label>
</text>
<input>
<name>channel A</name>
<row>1</row>
<col>1</col>
<width>75</width>
<height>25</height>
<label>MHz</label>
<property>/instrumentation/comm/channels/A-mhz</property>
</input>
<text>
<row>1</row>
<col>3</col>
<halign>right</halign>
<label>B</label>
</text>
<input>
<name>channel B</name>
<row>1</row>
<col>4</col>
<width>75</width>
<height>25</height>
<label>MHz</label>
<property>/instrumentation/comm/channels/B-mhz</property>
</input>
<text>
<row>2</row>
<col>0</col>
<halign>right</halign>
<label>C</label>
</text>
<input>
<name>channel C</name>
<row>2</row>
<col>1</col>
<width>75</width>
<height>25</height>
<label>MHz</label>
<property>/instrumentation/comm/channels/C-mhz</property>
</input>
<text>
<row>2</row>
<col>3</col>
<halign>right</halign>
<label>D</label>
</text>
<input>
<name>channel D</name>
<row>2</row>
<col>4</col>
<width>75</width>
<height>25</height>
<label>MHz</label>
<property>/instrumentation/comm/channels/D-mhz</property>
</input>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<button>
<legend>ATC Services in range</legend>
<binding>
<command>ATC-freq-search</command>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<default-padding>6</default-padding>
<empty>
<stretch>true</stretch>
</empty>
<button>
<legend>OK</legend>
<default>true</default>
<equal>true</equal>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<legend>Apply</legend>
<equal>true</equal>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<button>
<legend>Reset</legend>
<equal>true</equal>
<binding>
<command>dialog-update</command>
</binding>
</button>
<button>
<legend>Cancel</legend>
<equal>true</equal>
<key>Esc</key>
<binding>
<command>dialog-close</command>
</binding>
</button>
<empty>
<stretch>true</stretch>
</empty>
</group>
</PropertyList>

View file

@ -0,0 +1,161 @@
#####################################################################################
# This script provides the gui to set up the TR1133/SCR-522C radio #
# using a BC-602-A control box #
# #
# Author Vivian Meazza June 2011 #
# #
# mods Hal V. Engel June 2011 #
# #
#####################################################################################
# ================================ Initalize ======================================
# Make sure all needed properties are present and accounted
# for, and that they have sane default values.
var channelA_node = props.globals.initNode("instrumentation/comm/channels/A-mhz", 0, "DOUBLE");
var channelB_node = props.globals.initNode("instrumentation/comm/channels/B-mhz", 0, "DOUBLE");
var channelC_node = props.globals.initNode("instrumentation/comm/channels/C-mhz", 0, "DOUBLE");
var channelD_node = props.globals.initNode("instrumentation/comm/channels/D-mhz", 0, "DOUBLE");
var channel_selected_node = props.globals.initNode("instrumentation/comm/SCR-522C/frequencies/channel-selected", 0, "INT");
var tr_node = props.globals.initNode("instrumentation/comm/SCR-522C/tr", 0, "INT");
props.globals.initNode("instrumentation/comm/SCR-522C/frequencies/channel", "", "STRING");
props.globals.initNode("instrumentation/comm/SCR-522C/mask", 0, "BOOL");
props.globals.initNode("instrumentation/comm/SCR-522C/tr-lock", 0, "BOOL");
# turn the radio off
props.globals.initNode("instrumentation/comm/serviceable", 0, "BOOL");
var comm_selected_node = props.globals.getNode("instrumentation/comm/frequencies/selected-mhz", 1);
var comm_standby_node = props.globals.getNode("instrumentation/comm/frequencies/standby-mhz", 1);
var comm1_selected_node = props.globals.getNode("instrumentation/comm[1]/frequencies/selected-mhz", 1);
var comm1_standby_node = props.globals.getNode("instrumentation/comm[1]/frequencies/standby-mhz", 1);
var channel = ["OFF","A","B","C","D"];
setprop("instrumentation/comm/SCR-522C/frequencies/channel", channel[channel_selected_node.getValue()]);
# override default Equipment --> radio menu item
# Radio needs to be global in scope since it needs to presist for this to work
var Radio = gui.Dialog.new("sim/gui/dialogs/SCR-522C/dialog",
"Aircraft/Instruments-3d/SCR-522C/Dialogs/radios.xml");
gui.menuBind("radio", "SCR_522C.Radio.open()");
# override controls.ptt. This implements a REMote ptt switch.
controls.ptt = func {
# T/R/REM set to REM remote ptt switch controls transmitter
# print("intercept ptt for BC-602-A");
if (getprop("instrumentation/comm/SCR-522C/tr") == 0 and # in REMote ptt switch mode
getprop("instrumentation/comm/SCR-522C/frequencies/channel-selected") > 0) # and radio is on
setprop("instrumentation/comm/ptt", arg[0]); # let remote ptt control transmitter
else # otherwise
setprop("instrumentation/comm/ptt", 0); # the remote ptt does nothing
}
# =============================== listeners ===============================
#
# listener for channel selector. Will cause the frequency of the transceiver to be changed.
# will also turn the radio on and off
var listenChannelSelected = func(n) {
var channel_no = n.getValue();
if (channel_no == nil) channel_no = 0;
# print("channel", channel_no, " ", channel[channel_no]);
setprop("instrumentation/comm/SCR-522C/frequencies/channel", channel[channel_no]);
if (channel_no == 0)
setprop("instrumentation/comm/serviceable", 0);
else {
setprop("instrumentation/comm/serviceable", 1);
if (channel_no == 1) {
setprop("instrumentation/comm/frequencies/selected-mhz", getprop("instrumentation/comm/channels/A-mhz"));
setprop("instrumentation/comm/frequencies/standby-mhz", getprop("instrumentation/comm/channels/A-mhz"));
}
else if (channel_no == 2){
setprop("instrumentation/comm/frequencies/selected-mhz", getprop("instrumentation/comm/channels/B-mhz"));
setprop("instrumentation/comm/frequencies/standby-mhz", getprop("instrumentation/comm/channels/B-mhz"));
}
else if (channel_no == 3){
setprop("instrumentation/comm/frequencies/selected-mhz", getprop("instrumentation/comm/channels/C-mhz"));
setprop("instrumentation/comm/frequencies/standby-mhz", getprop("instrumentation/comm/channels/C-mhz"));
}
else if (channel_no == 4){
setprop("instrumentation/comm/frequencies/selected-mhz", getprop("instrumentation/comm/channels/D-mhz"));
setprop("instrumentation/comm/frequencies/standby-mhz", getprop("instrumentation/comm/channels/D-mhz"));
}
}
}
# listener for the local TR switch.
var listenTr = func(t) {
var tr = t.getValue();
# print("tr ",tr);
if (tr == nil) tr = 0;
if (tr == 2 and getprop("instrumentation/comm/SCR-522C/frequencies/channel-selected") > 0)
setprop("instrumentation/comm/ptt", 1);
else if (tr == 1)
setprop("instrumentation/comm/ptt", 0);
if (tr == 0 and getprop("/instrumentation/comm/SCR-522C/tr-lock"))
setprop("/instrumentation/comm/SCR-522C/tr", 1);
}
# listener for the local TR lock.
var listenTrLock = func(i) {
var tr_lock = i.getValue();
# print("tr_lock");
if (tr_lock == nil) tr_lock = false;
if (tr_lock and getprop("/instrumentation/comm/SCR-522C/tr") == 0)
setprop("/instrumentation/comm/SCR-522C/tr", 1);
# else if (getprop("/instrumentation/comm/SCR-522C/tr") == 2)
# setprop("/instrumentation/comm/SCR-522C/tr", 1);
}
var SCR_522C_init = func(){
print ("initializing SCR-522C ...");
var channelA_init = comm_selected_node.getValue();
var channelB_init = comm_standby_node.getValue();
var channelC_init = comm1_selected_node.getValue();
var channelD_init = comm1_standby_node.getValue();
channelA_node.setValue(channelA_init);
channelB_node.setValue(channelB_init);
channelC_node.setValue(channelC_init);
channelD_node.setValue(channelD_init);
comm_selected_node.setValue(0);
comm_standby_node.setValue(0);
comm1_selected_node.setValue(0);
comm1_standby_node.setValue(0);
# over ride F12
setprop("input/keyboard/key[268]/binding/dialog-name", "SCR-522C-radio");
setprop("input/keyboard/key[268]/binding/command", "dialog-show");
# =============================== start listeners ===============================
#
setlistener("instrumentation/comm/SCR-522C/frequencies/channel-selected", listenChannelSelected, 1, 0);
setlistener("instrumentation/comm/SCR-522C/tr", listenTr, 1, 0);
setlistener("instrumentation/comm/SCR-522C/tr-lock", listenTrLock, 1, 0);
# print("... done");
} # end func initialize
# run initialization
setlistener("sim/signals/fdm-initialized", SCR_522C_init);

View file

@ -0,0 +1,29 @@
To enable full functionality of the SCR-522C/TR1133 radio there are several things
that you will need to do.
First you will need to change the <nasal> section of your *set.xml file so that it
looks like the following.
<nasal>
<!-- your other nasal files -->
<!-- the following three lines must be exactly like what is here -->
<SCR_522C>
<file>Aircraft/Instruments-3d/SCR-522C/Nasal/SCR-522C.nas</file>
</SCR_522C>
</nasal>
This will enable the F12 key to bring up the frequencies dialog. It will also over ride the
Equipment --> radios menu item so that it brings up the correct menu for the SCR-522C/TR1133
radios. This also implements other radio features like support for a remote TR switch, the
TR switch on the BC-602-A control box, TR switch lock, channel switching, power switch and
so on.
For dark conditions when cabin/cockpit illumination is used all of the radio models object
are illuminated in response to
<property>/controls/lighting/cabin-norm</property>
If you are using a different property for you cabin/cockpit lights you will need to map your
lighting property to /controls/lighting/cabin-norm.

File diff suppressed because it is too large Load diff

View file

@ -1,356 +0,0 @@
<?xml version="1.0"?>
<PropertyList>
<path>SCR-522C.ac</path>
<animation>
<type>range</type>
<min-m>0</min-m>
<max-m>7</max-m>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-OFF</object-name>
<property>/systems/comm/SCR-522C/frequencies/channel-selected</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>-0.005</dep>
</entry>
<entry>
<ind>1</ind>
<dep>0</dep>
</entry>
<entry>
<ind>2</ind>
<dep>0</dep>
</entry>
<entry>
<ind>3</ind>
<dep>0</dep>
</entry>
<entry>
<ind>4</ind>
<dep>0</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>0.0</y-m>
<z-m>-0.0</z-m>
</center>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>SCR-522C-T-base</object-name>
<object-name>SCR-522C-T-sw-handle</object-name>
<object-name>SCR-522C-T-stem</object-name>
<property>/systems/comm/SCR-522C/tr</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>0</dep>
</entry>
<entry>
<ind>1</ind>
<dep>30</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>-0.01</y-m>
<z-m>0.05</z-m>
</center>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-A</object-name>
<property>/systems/comm/SCR-522C/frequencies/channel-selected</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>0</dep>
</entry>
<entry>
<ind>1</ind>
<dep>-0.005</dep>
</entry>
<entry>
<ind>2</ind>
<dep>0</dep>
</entry>
<entry>
<ind>3</ind>
<dep>0</dep>
</entry>
<entry>
<ind>4</ind>
<dep>0</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>0.0</y-m>
<z-m>-0.0</z-m>
</center>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-B</object-name>
<property>/systems/comm/SCR-522C/frequencies/channel-selected</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>0</dep>
</entry>
<entry>
<ind>1</ind>
<dep>0</dep>
</entry>
<entry>
<ind>2</ind>
<dep>-0.005</dep>
</entry>
<entry>
<ind>3</ind>
<dep>0</dep>
</entry>
<entry>
<ind>4</ind>
<dep>0</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>0.0</y-m>
<z-m>-0.0</z-m>
</center>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-C</object-name>
<property>/systems/comm/SCR-522C/frequencies/channel-selected</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>-0</dep>
</entry>
<entry>
<ind>1</ind>
<dep>-0.0</dep>
</entry>
<entry>
<ind>2</ind>
<dep>0</dep>
</entry>
<entry>
<ind>3</ind>
<dep>-0.005</dep>
</entry>
<entry>
<ind>4</ind>
<dep>0</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>0.0</y-m>
<z-m>-0.0</z-m>
</center>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-D</object-name>
<property>/systems/comm/SCR-522C/frequencies/channel-selected</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>-0</dep>
</entry>
<entry>
<ind>1</ind>
<dep>-0.0</dep>
</entry>
<entry>
<ind>2</ind>
<dep>0</dep>
</entry>
<entry>
<ind>3</ind>
<dep>0</dep>
</entry>
<entry>
<ind>4</ind>
<dep>-0.005</dep>
</entry>
</interpolation>
<center>
<x-m>-0.00</x-m>
<y-m>0.0</y-m>
<z-m>-0.0</z-m>
</center>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-A</object-name>
<condition>
<equals>
<property>/systems/comm/SCR-522C/frequencies/channel-selected</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-B</object-name>
<condition>
<equals>
<property>/systems/comm/SCR-522C/frequencies/channel-selected</property>
<value>2</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-C</object-name>
<condition>
<equals>
<property>/systems/comm/SCR-522C/frequencies/channel-selected</property>
<value>3</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-D</object-name>
<condition>
<equals>
<property>/systems/comm/SCR-522C/frequencies/channel-selected</property>
<value>4</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>SCR-522C-lamp-T</object-name>
<condition>
<and>
<property>/systems/comm/SCR-522C/tr</property>
<greater-than>
<property>/systems/comm/SCR-522C/frequencies/channel-selected</property>
<value>0</value>
</greater-than>
</and>
</condition>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-light-cont-1</object-name>
<property>/systems/comm/SCR-522C/channel-dimmer</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>0.005</dep>
</entry>
<entry>
<ind>1.0</ind>
<dep>0</dep>
</entry>
</interpolation>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SCR-522C-light-cont-2</object-name>
<property>/systems/comm/SCR-522C/tr-dimmer</property>
<interpolation>
<entry>
<ind>0</ind>
<dep>0.005</dep>
</entry>
<entry>
<ind>1.0</ind>
<dep>0</dep>
</entry>
</interpolation>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>material</type>
<object-name>SCR-522C-top</object-name>
<object-name>SCR-522C-box</object-name>
<object-name>SCR-522C-A</object-name>
<object-name>SCR-522C-B</object-name>
<object-name>SCR-522C-C</object-name>
<object-name>SCR-522C-D</object-name>
<object-name>SCR-522C-T-base</object-name>
<object-name>SCR-522C-T-sw-handle</object-name>
<object-name>SCR-522C-T-stem</object-name>
<object-name>SCR-522C-light-cont-2</object-name>
<object-name>SCR-522C-light-cont-1</object-name>
<object-name>SCR-522C-OFF</object-name>
<object-name>right-outer-bracket</object-name>
<object-name>left-inner-bracket</object-name>
<object-name>left-outer-bracket</object-name>
<emission>
<factor-prop>controls/lighting/cabin-norm</factor-prop>
<red>0.28</red>
<green>0.18</green>
<blue>0.18</blue>
</emission>
</animation>
</PropertyList>