1
0
Fork 0

P-51D JSBSim -Fix minor amination issue with remote ptt button

This commit is contained in:
Hal V. Engel 2011-07-05 15:24:34 -07:00
parent fd87d171e1
commit 2f5c64daa9
2 changed files with 37 additions and 9 deletions

View file

@ -22,6 +22,7 @@ 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");
props.globals.initNode("instrumentation/comm/SCR-522C/remote-pushed", 0, "BOOL");
# turn the radio off
props.globals.initNode("instrumentation/comm/serviceable", 0, "BOOL");
@ -52,6 +53,7 @@ controls.ptt = func {
setprop("instrumentation/comm/ptt", arg[0]); # let remote ptt control transmitter
else # otherwise
setprop("instrumentation/comm/ptt", 0); # the remote ptt does nothing
setprop("instrumentation/comm/SCR-522C/remote-pushed", arg[0]); # use to animate remote ptt button
}
# =============================== listeners ===============================

View file

@ -1,8 +1,8 @@
To enable full functionality of the SCR-522C/TR1133 radio there are several things
that you will need to do.
that need to be done.
First you will need to change the <nasal> section of your *set.xml file so that it
looks like the following.
First change the <nasal> section of your *set.xml file so that it looks like the
following.
<nasal>
<!-- your other nasal files -->
@ -12,13 +12,17 @@ looks like the following.
</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.
Menu:
For dark conditions when cabin/cockpit illumination is used all of the radio models object
The above will enable the F12 key to bring up the SCR-522C specific 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.
Animation:
For dark conditions when cabin/cockpit illumination is used all of the radio models objects
are illuminated in response to
<property>/controls/lighting/cabin-norm</property>
@ -26,4 +30,26 @@ are illuminated in response to
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.
If your aircraft needs remote ptt button animation this should be linked to
instrumentation/comm/SCR-522C/remote-pushed
Since the Nasal script reimplements controls.ptt() and instrumentation/comm/ptt only becomes true
if the radio is turned on. Using the property above to control the animation of the remote ptt
button will result in the botton moving when ever the user pushes what ever key/button they have
setup to call controls.ptt(). An example of what this might look like is:
<animation>
<type>translate</type>
<object-name>MicButton</object-name>
<property>instrumentation/comm/SCR-522C/remote-pushed</property>
<factor>-0.007</factor>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
</animation>