add CVR test button
This commit is contained in:
parent
a54a9f2a38
commit
50c98c4d22
5 changed files with 69 additions and 0 deletions
|
@ -5566,5 +5566,19 @@
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
<!-- CVR -->
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>CVRTest</object-name>
|
||||||
|
<action>
|
||||||
|
<button>0</button>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>libraries.CVR_test();</script>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
|
||||||
</PropertyList>
|
</PropertyList>
|
|
@ -13,6 +13,38 @@ var variousReset = func {
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/glideslope-cancel", 0);
|
setprop("/instrumentation/mk-viii/inputs/discretes/glideslope-cancel", 0);
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 0);
|
setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 0);
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override", 0);
|
setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override", 0);
|
||||||
|
# cockpit voice recorder stuff
|
||||||
|
setprop("/controls/CVR/power", 0);
|
||||||
|
setprop("/controls/CVR/test", 0);
|
||||||
|
setprop("/controls/CVR/tone", 0);
|
||||||
|
setprop("/controls/CVR/gndctl", 0);
|
||||||
|
setprop("/controls/CVR/erase", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
var CVR_test = func {
|
||||||
|
var parkBrake = getprop("/controls/gear/brake-parking");
|
||||||
|
if (parkBrake) {
|
||||||
|
setprop("controls/CVR/tone", 1);
|
||||||
|
settimer(func() {
|
||||||
|
setprop("controls/CVR/tone", 0);
|
||||||
|
}, 15);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var CVR_master = func {
|
||||||
|
var stateL = getprop("/engines/engine[0]/state");
|
||||||
|
var stateR = getprop("/engines/engine[1]/state");
|
||||||
|
var wowl = getprop("/gear/gear[1]/wow");
|
||||||
|
var wowr = getprop("/gear/gear[2]/wow");
|
||||||
|
var gndCtl = getprop("/systems/CVR/gndctl");
|
||||||
|
var acPwr = getprop("/systems/electrical/bus/ac-ess");
|
||||||
|
if (acPwr > 0 and wowl and wowr and (gndCtl or (stateL == 3 or stateR == 3))) {
|
||||||
|
setprop("/controls/CVR/power", 1);
|
||||||
|
} else if (!wowl and !wowr and acPwr > 0) {
|
||||||
|
setprop("/controls/CVR/power", 1);
|
||||||
|
} else {
|
||||||
|
setprop("/controls/CVR/power", 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var mcpSPDKnbPull = func {
|
var mcpSPDKnbPull = func {
|
||||||
|
@ -110,3 +142,10 @@ var decreaseManVS = func {
|
||||||
setprop("/systems/pressurization/outflowpos-man", manvs - 0.001);
|
setprop("/systems/pressurization/outflowpos-man", manvs - 0.001);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var update_CVR = func {
|
||||||
|
CVR_master();
|
||||||
|
}
|
||||||
|
|
||||||
|
var CVR = maketimer(0.1, update_CVR);
|
||||||
|
|
|
@ -199,6 +199,7 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
fmgc.FMGCinit();
|
fmgc.FMGCinit();
|
||||||
mcdu1.MCDU_init();
|
mcdu1.MCDU_init();
|
||||||
mcdu2.MCDU_init();
|
mcdu2.MCDU_init();
|
||||||
|
libraries.CVR.start();
|
||||||
icing.icingInit();
|
icing.icingInit();
|
||||||
var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320Family/Systems/autopilot-dlg.xml");
|
var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320Family/Systems/autopilot-dlg.xml");
|
||||||
setprop("/it-autoflight/input/fd1", 1);
|
setprop("/it-autoflight/input/fd1", 1);
|
||||||
|
|
|
@ -1024,6 +1024,21 @@
|
||||||
</volume>
|
</volume>
|
||||||
</switch>
|
</switch>
|
||||||
|
|
||||||
|
<cvrtone>
|
||||||
|
<name>CVRtone</name>
|
||||||
|
<mode>once</mode>
|
||||||
|
<path>Aircraft/A320Family/Sounds/Cockpit/700hz.wav</path>
|
||||||
|
<condition>
|
||||||
|
<equals>
|
||||||
|
<property>controls/CVR/tone</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
</condition>
|
||||||
|
<volume>
|
||||||
|
<factor>0.60</factor>
|
||||||
|
</volume>
|
||||||
|
</cvrtone>
|
||||||
|
|
||||||
<relay>
|
<relay>
|
||||||
<name>RelayBatt</name>
|
<name>RelayBatt</name>
|
||||||
<mode>once</mode>
|
<mode>once</mode>
|
||||||
|
|
BIN
Sounds/Cockpit/700hz.wav
Normal file
BIN
Sounds/Cockpit/700hz.wav
Normal file
Binary file not shown.
Reference in a new issue