From 2f5c64daa9fd7e313259d49a010de7037d696355 Mon Sep 17 00:00:00 2001 From: "Hal V. Engel" Date: Tue, 5 Jul 2011 15:24:34 -0700 Subject: [PATCH] P-51D JSBSim -Fix minor amination issue with remote ptt button --- .../SCR-522C/Nasal/SCR-522C.nas | 2 + Aircraft/Instruments-3d/SCR-522C/README | 44 +++++++++++++++---- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/Aircraft/Instruments-3d/SCR-522C/Nasal/SCR-522C.nas b/Aircraft/Instruments-3d/SCR-522C/Nasal/SCR-522C.nas index 21b6ac990..17ee2f890 100644 --- a/Aircraft/Instruments-3d/SCR-522C/Nasal/SCR-522C.nas +++ b/Aircraft/Instruments-3d/SCR-522C/Nasal/SCR-522C.nas @@ -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 =============================== diff --git a/Aircraft/Instruments-3d/SCR-522C/README b/Aircraft/Instruments-3d/SCR-522C/README index cadb9281c..e2214807c 100644 --- a/Aircraft/Instruments-3d/SCR-522C/README +++ b/Aircraft/Instruments-3d/SCR-522C/README @@ -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 section of your *set.xml file so that it -looks like the following. +First change the section of your *set.xml file so that it looks like the +following. @@ -12,13 +12,17 @@ looks like the following. -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 /controls/lighting/cabin-norm @@ -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: + + + translate + MicButton + instrumentation/comm/SCR-522C/remote-pushed + -0.007 + + 0 + 1 + 0 + + + + \ No newline at end of file