1
0
Fork 0

ECAM: replace getprop

This commit is contained in:
legoboyvdlp R 2021-08-05 16:47:56 +01:00
parent 6daa0345dd
commit 14c1c43dfc
2 changed files with 7 additions and 2 deletions

View file

@ -2099,7 +2099,7 @@ var messages_priority_2 = func {
altnLaw.active = 1; altnLaw.active = 1;
altnLawProt.active = 1; altnLawProt.active = 1;
if (altnLawMaxSpeed.clearFlag == 0 and altnLawMaxSpeed2.clearFlag == 0 and !fbw.tripleADRFail) { if (altnLawMaxSpeed.clearFlag == 0 and altnLawMaxSpeed2.clearFlag == 0 and !fbw.tripleADRFail) {
if (!(getprop("/ECAM/warnings/hyd/green-abnorm-lo-pr") and (getprop("/ECAM/warnings/hyd/blue-abnorm-lo-pr") or getprop("/ECAM/warnings/hyd/yellow-abnorm-lo-pr")))) { if (!(systems.HYD.Warnings.greenAbnormLoPr.getValue() and (systems.HYD.Warnings.blueAbnormLoPr.getValue() or systems.HYD.Warnings.yellowAbnormLoPr.getValue()))) {
altnLawMaxSpeed.active = 1; altnLawMaxSpeed.active = 1;
ECAM_controller.warningReset(altnLawMaxSpeed2); ECAM_controller.warningReset(altnLawMaxSpeed2);
} else { } else {
@ -3412,7 +3412,7 @@ var messages_right_memo = func {
ldg_inhibit.active = 0; ldg_inhibit.active = 0;
} }
if (!(FWC.Timer.gnd.getValue() == 1) and (systems.ELEC.EmerElec.getValue() or dualFailNode.getValue() == 1 or systems.eng1FireWarn.getValue() == 1 or systems.eng2FireWarn.getValue() == 1 or systems.apuFireWarn.getValue() == 1 or systems.aftCargoFireWarn.getValue() == 1 or systems.fwdCargoFireWarn.getValue() == 1 or (getprop("/ECAM/warnings/hyd/green-abnorm-lo-pr") and getprop("/ECAM/warnings/hyd/yellow-abnorm-lo-pr")) or (getprop("/ECAM/warnings/hyd/green-abnorm-lo-pr") and getprop("/ECAM/warnings/hyd/blue-abnorm-lo-pr")) or (getprop("/ECAM/warnings/hyd/blue-abnorm-lo-pr") and getprop("/ECAM/warnings/hyd/yellow-abnorm-lo-pr")))) { if (!(FWC.Timer.gnd.getValue() == 1) and (systems.ELEC.EmerElec.getValue() or dualFailNode.getValue() == 1 or systems.eng1FireWarn.getValue() == 1 or systems.eng2FireWarn.getValue() == 1 or systems.apuFireWarn.getValue() == 1 or systems.aftCargoFireWarn.getValue() == 1 or systems.fwdCargoFireWarn.getValue() == 1 or (systems.HYD.Warnings.greenAbnormLoPr.getValue() and systems.HYD.Warnings.yellowAbnormLoPr.getValue()) or (systems.HYD.Warnings.greenAbnormLoPr.getValue() and systems.HYD.Warnings.blueAbnormLoPr.getValue()) or (systems.HYD.Warnings.blueAbnormLoPr.getValue() and systems.HYD.Warnings.yellowAbnormLoPr.getValue()))) {
land_asap_r.active = 1; land_asap_r.active = 1;
} else { } else {
land_asap_r.active = 0; land_asap_r.active = 0;

View file

@ -62,6 +62,11 @@ var HYD = {
yellowFire: props.globals.getNode("/systems/hydraulic/sources/yellow-edp/fire-valve"), yellowFire: props.globals.getNode("/systems/hydraulic/sources/yellow-edp/fire-valve"),
greenFire: props.globals.getNode("/systems/hydraulic/sources/green-edp/fire-valve"), greenFire: props.globals.getNode("/systems/hydraulic/sources/green-edp/fire-valve"),
}, },
Warnings: {
blueAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/blue-abnorm-lo-pr"),
greenAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/green-abnorm-lo-pr"),
yellowAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/yellow-abnorm-lo-pr"),
},
init: func() { init: func() {
me.resetFail(); me.resetFail();
me.Qty.blueInput.setValue(math.round((rand() * 2) + 6 , 0.1)); # Random between 6 and 8 me.Qty.blueInput.setValue(math.round((rand() * 2) + 6 , 0.1)); # Random between 6 and 8