Code Global Speed Protection mode reversion from THR CLB to SPEED on overspeed
This commit is contained in:
parent
4297101ec9
commit
82bf436084
6 changed files with 42 additions and 7 deletions
|
@ -14,7 +14,7 @@ var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
|
||||||
|
|
||||||
|
|
||||||
var lights = [props.globals.initNode("/ECAM/warnings/master-warning-light", 0, "BOOL"), props.globals.initNode("/ECAM/warnings/master-caution-light", 0, "BOOL")];
|
var lights = [props.globals.initNode("/ECAM/warnings/master-warning-light", 0, "BOOL"), props.globals.initNode("/ECAM/warnings/master-caution-light", 0, "BOOL")];
|
||||||
var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/retard", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cchord", 0, "BOOL")];
|
var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/retard", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cchord", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/click", 0, "BOOL")];
|
||||||
var warningFlash = props.globals.initNode("/ECAM/warnings/master-warning-flash", 0, "BOOL");
|
var warningFlash = props.globals.initNode("/ECAM/warnings/master-warning-flash", 0, "BOOL");
|
||||||
|
|
||||||
var lineIndex = 0;
|
var lineIndex = 0;
|
||||||
|
@ -223,7 +223,7 @@ var warning = {
|
||||||
me.noRepeat = 1;
|
me.noRepeat = 1;
|
||||||
},
|
},
|
||||||
sound: func() {
|
sound: func() {
|
||||||
if (me.aural > 3) { return; }
|
if (me.aural == 9) { return; }
|
||||||
if (me.active == 0 and me.wasActive == 1) {
|
if (me.active == 0 and me.wasActive == 1) {
|
||||||
aural[me.aural].setBoolValue(0);
|
aural[me.aural].setBoolValue(0);
|
||||||
me.wasActive = 0;
|
me.wasActive = 0;
|
||||||
|
|
|
@ -66,7 +66,7 @@ var messages_priority_3 = func {
|
||||||
ECAM_controller.warningReset(flap_not_zero);
|
ECAM_controller.warningReset(flap_not_zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overspeed.clearFlag == 0 and (phaseVar3 == 1 or (phaseVar3 >= 5 and phaseVar3 <= 7)) and getprop("/systems/navigation/adr/output/overspeed")) {
|
if (overspeed.clearFlag == 0 and (phaseVar3 == 1 or (phaseVar3 >= 5 and phaseVar3 <= 7)) and pts.Systems.Navigation.ADR.Output.overspeed.getBoolValue()) {
|
||||||
overspeed.active = 1;
|
overspeed.active = 1;
|
||||||
if (getprop("/systems/navigation/adr/computation/overspeed-vmo") or getprop("/systems/navigation/adr/computation/overspeed-mmo")) {
|
if (getprop("/systems/navigation/adr/computation/overspeed-vmo") or getprop("/systems/navigation/adr/computation/overspeed-mmo")) {
|
||||||
overspeedVMO.active = 1;
|
overspeedVMO.active = 1;
|
||||||
|
|
|
@ -105,18 +105,18 @@ var FCUController = {
|
||||||
FD1: func() {
|
FD1: func() {
|
||||||
if (me.FCUworking) {
|
if (me.FCUworking) {
|
||||||
if (!fmgc.Output.fd1.getBoolValue()) {
|
if (!fmgc.Output.fd1.getBoolValue()) {
|
||||||
fd1Input.setValue(1);
|
fmgc.Input.fd1.setValue(1);
|
||||||
} else {
|
} else {
|
||||||
fd1Input.setValue(0);
|
fmgc.Input.fd1.setValue(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
FD2: func() {
|
FD2: func() {
|
||||||
if (me.FCUworking) {
|
if (me.FCUworking) {
|
||||||
if (!fmgc.Output.fd2.getBoolValue()) {
|
if (!fmgc.Output.fd2.getBoolValue()) {
|
||||||
fd2Input.setValue(1);
|
fmgc.Input.fd2.setValue(1);
|
||||||
} else {
|
} else {
|
||||||
fd2Input.setValue(0);
|
fmgc.Input.fd2.setValue(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1031,6 +1031,19 @@ setlistener("/it-autoflight/input/vert", func {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
# Mode Reversions
|
||||||
|
setlistener(pts.Systems.Navigation.ADR.Output.overspeed, func(v) {
|
||||||
|
if (v.getBoolValue() and !Output.ap1.getBoolValue() and !Output.ap2.getBoolValue() and Output.athr.getBoolValue() and Modes.PFD.FMA.pitchMode.getValue() == "OP CLB" and Modes.PFD.FMA.throttle.getValue() == "THR CLB") {
|
||||||
|
Input.fd1.setValue(0);
|
||||||
|
Input.fd2.setValue(0);
|
||||||
|
ecam.aural[5].setBoolValue(0);
|
||||||
|
settimer(func() {
|
||||||
|
ecam.aural[5].setBoolValue(1);
|
||||||
|
}, 0.15);
|
||||||
|
}
|
||||||
|
}, 0, 0);
|
||||||
|
|
||||||
|
|
||||||
setlistener("/sim/signals/fdm-initialized", func {
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
ITAF.init();
|
ITAF.init();
|
||||||
});
|
});
|
||||||
|
|
|
@ -278,6 +278,13 @@ var Sim = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var Systems = {
|
var Systems = {
|
||||||
|
Navigation: {
|
||||||
|
ADR: {
|
||||||
|
Output: {
|
||||||
|
overspeed: props.globals.getNode("/systems/navigation/adr/output/overspeed"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
Thrust: {
|
Thrust: {
|
||||||
engOut: props.globals.getNode("/systems/thrust/eng-out"),
|
engOut: props.globals.getNode("/systems/thrust/eng-out"),
|
||||||
state: [props.globals.getNode("/systems/thrust/state1"), props.globals.getNode("/systems/thrust/state2")],
|
state: [props.globals.getNode("/systems/thrust/state1"), props.globals.getNode("/systems/thrust/state2")],
|
||||||
|
|
|
@ -1913,6 +1913,21 @@
|
||||||
</volume>
|
</volume>
|
||||||
</announcements>
|
</announcements>
|
||||||
|
|
||||||
|
<chime>
|
||||||
|
<name>Chime</name>
|
||||||
|
<path>Aircraft/A320-family/Sounds/Cockpit/click.wav</path>
|
||||||
|
<mode>once</mode>
|
||||||
|
<type>avionics</type>
|
||||||
|
<condition>
|
||||||
|
<property>/sim/sound/warnings/click</property>
|
||||||
|
</condition>
|
||||||
|
<volume>
|
||||||
|
<property>/sim/current-view/internal</property>
|
||||||
|
</volume>
|
||||||
|
<reference-dist>10</reference-dist>
|
||||||
|
<max-dist>100</max-dist>
|
||||||
|
</chime>
|
||||||
|
|
||||||
<chime>
|
<chime>
|
||||||
<name>Chime</name>
|
<name>Chime</name>
|
||||||
<path>Aircraft/A320-family/Sounds/Cockpit/chime.wav</path>
|
<path>Aircraft/A320-family/Sounds/Cockpit/chime.wav</path>
|
||||||
|
|
Loading…
Reference in a new issue