From d38496f196482692e3d385ca3fa2d3e696509395 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sun, 27 Sep 2020 19:00:46 +0100 Subject: [PATCH] More Nasal improvements (remove getprop more etc) --- Nasal/ECAM/ECAM-logic.nas | 288 +++++++++++++++++++------------------- Nasal/FMGC/FCU.nas | 4 +- Nasal/FMGC/FMGC-b.nas | 8 +- Nasal/FMGC/FMGC.nas | 2 +- 4 files changed, 151 insertions(+), 151 deletions(-) diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index f16b9cca..2f4fcc71 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -44,7 +44,7 @@ var messages_priority_3 = func { # Stall # todo - altn law and emer cancel flipflops page 2440 - if (phaseVar3 >= 5 and phaseVar3 <= 7 and (getprop("fdm/jsbsim/fcs/slat-pos-deg") <= 15 and (getprop("systems/navigation/adr/output/aoa-1") > 15 or getprop("systems/navigation/adr/output/aoa-2") > 15 or getprop("systems/navigation/adr/output/aoa-3") > 15)) or (getprop("fdm/jsbsim/fcs/slat-pos-deg") > 15 and (getprop("systems/navigation/adr/output/aoa-1") > 23 or getprop("systems/navigation/adr/output/aoa-2") > 23 or getprop("systems/navigation/adr/output/aoa-3") > 23))) { + if (phaseVar3 >= 5 and phaseVar3 <= 7 and (getprop("/fdm/jsbsim/fcs/slat-pos-deg") <= 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 15 or getprop("/systems/navigation/adr/output/aoa-2") > 15 or getprop("/systems/navigation/adr/output/aoa-3") > 15)) or (getprop("/fdm/jsbsim/fcs/slat-pos-deg") > 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 23 or getprop("/systems/navigation/adr/output/aoa-2") > 23 or getprop("/systems/navigation/adr/output/aoa-3") > 23))) { stall.active = 1; } else { ECAM_controller.warningReset(stall); @@ -56,21 +56,21 @@ var messages_priority_3 = func { stallVoice.setValue(0); } - if ((phaseVar3 == 1 or (phaseVar3 >= 5 and phaseVar3 <= 7)) and getprop("systems/navigation/adr/output/overspeed")) { + if ((phaseVar3 == 1 or (phaseVar3 >= 5 and phaseVar3 <= 7)) and getprop("/systems/navigation/adr/output/overspeed")) { 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; } else { ECAM_controller.warningReset(overspeedVMO); } - if (getprop("systems/navigation/adr/computation/overspeed-vle")) { + if (getprop("/systems/navigation/adr/computation/overspeed-vle")) { overspeedGear.active = 1; } else { ECAM_controller.warningReset(overspeedGear); } - if (getprop("systems/navigation/adr/computation/overspeed-vfe")) { + if (getprop("/systems/navigation/adr/computation/overspeed-vfe")) { overspeedFlap.active = 1; overspeedFlap.msg = "-VFE................" ~ (systems.ADIRS.overspeedVFE.getValue() - 4); } else { @@ -86,7 +86,7 @@ var messages_priority_3 = func { } # FCTL FLAPS NOT ZERO - if ((flap_not_zero.clearFlag == 0) and phaseVar3 == 6 and getprop("controls/flight/flaps-input") != 0 and getprop("instrumentation/altimeter/indicated-altitude-ft") > 22000) { + if ((flap_not_zero.clearFlag == 0) and phaseVar3 == 6 and getprop("/controls/flight/flaps-input") != 0 and getprop("instrumentation/altimeter/indicated-altitude-ft") > 22000) { flap_not_zero.active = 1; } else { ECAM_controller.warningReset(flap_not_zero); @@ -101,13 +101,13 @@ var messages_priority_3 = func { } if (dualFail.active == 1) { - if (getprop("controls/engines/engine-start-switch") != 2 and dualFailModeSel.clearFlag == 0) { + if (getprop("/controls/engines/engine-start-switch") != 2 and dualFailModeSel.clearFlag == 0) { dualFailModeSel.active = 1; } else { ECAM_controller.warningReset(dualFailModeSel); } - if (getprop("fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("fdm/jsbsim/fcs/throttle-lever[1]") > 0.01 and dualFailLevers.clearFlag == 0) { + if (getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01 and dualFailLevers.clearFlag == 0) { dualFailLevers.active = 1; } else { ECAM_controller.warningReset(dualFailLevers); @@ -274,19 +274,19 @@ var messages_priority_3 = func { } # ENG FIRE - if ((eng1FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine1/warning-active") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng1FireGnevacBat.clearFlag == 0 and getprop("systems/fire/engine1/warning-active") == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) { + if ((eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng1FireGnevacBat.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) { eng1Fire.active = 1; } else { ECAM_controller.warningReset(eng1Fire); } - if ((eng2FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine2/warning-active") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng2FireGnevacBat.clearFlag == 0 and getprop("systems/fire/engine2/warning-active") == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) { + if ((eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/warning-active") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng2FireGnevacBat.clearFlag == 0 and getprop("/systems/fire/engine2/warning-active") == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) { eng2Fire.active = 1; } else { ECAM_controller.warningReset(eng2Fire); } - if (apuFireMaster.clearFlag == 0 and getprop("systems/fire/apu/warning-active")) { + if (apuFireMaster.clearFlag == 0 and getprop("/systems/fire/apu/warning-active")) { apuFire.active = 1; } else { ECAM_controller.warningReset(apuFire); @@ -294,35 +294,35 @@ var messages_priority_3 = func { if (eng1Fire.active == 1) { if (phaseVar3 >= 5 and phaseVar3 <= 7) { - if (eng1FireFllever.clearFlag == 0 and getprop("fdm/jsbsim/fcs/throttle-lever[0]") > 0.01) { + if (eng1FireFllever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01) { eng1FireFllever.active = 1; } else { ECAM_controller.warningReset(eng1FireFllever); } - if (eng1FireFlmaster.clearFlag == 0 and getprop("controls/engines/engine[0]/cutoff-switch") == 0) { + if (eng1FireFlmaster.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) { eng1FireFlmaster.active = 1; } else { ECAM_controller.warningReset(eng1FireFlmaster); } - if (eng1FireFlPB.clearFlag == 0 and getprop("controls/engines/engine[0]/fire-btn") == 0) { + if (eng1FireFlPB.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 0) { eng1FireFlPB.active = 1; } else { ECAM_controller.warningReset(eng1FireFlPB); } - if (getprop("systems/fire/engine1/agent1-timer") != 0 and getprop("systems/fire/engine1/agent1-timer") != 99) { - eng1FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("systems/fire/engine1/agent1-timer") ~ " S...DISCH"; + if (getprop("/systems/fire/engine1/agent1-timer") != 0 and getprop("/systems/fire/engine1/agent1-timer") != 99) { + eng1FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("/systems/fire/engine1/agent1-timer") ~ " S...DISCH"; } - if (eng1FireFlAgent1.clearFlag == 0 and getprop("controls/engines/engine[0]/fire-btn") == 1 and !getprop("systems/fire/engine1/disch1") and getprop("systems/fire/engine1/agent1-timer") != 0 and getprop("systems/fire/engine1/agent1-timer") != 99) { + if (eng1FireFlAgent1.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 1 and !getprop("/systems/fire/engine1/disch1") and getprop("/systems/fire/engine1/agent1-timer") != 0 and getprop("/systems/fire/engine1/agent1-timer") != 99) { eng1FireFlAgent1Timer.active = 1; } else { ECAM_controller.warningReset(eng1FireFlAgent1Timer); } - if (eng1FireFlAgent1.clearFlag == 0 and !getprop("systems/fire/engine1/disch1") and (getprop("systems/fire/engine1/agent1-timer") == 0 or getprop("systems/fire/engine1/agent1-timer") == 99)) { + if (eng1FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine1/disch1") and (getprop("/systems/fire/engine1/agent1-timer") == 0 or getprop("/systems/fire/engine1/agent1-timer") == 99)) { eng1FireFlAgent1.active = 1; } else { ECAM_controller.warningReset(eng1FireFlAgent1); @@ -334,17 +334,17 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng1FireFlATC); } - if (getprop("systems/fire/engine1/agent2-timer") != 0 and getprop("systems/fire/engine1/agent2-timer") != 99) { - eng1FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("systems/fire/engine1/agent2-timer") ~ " S:"; + if (getprop("/systems/fire/engine1/agent2-timer") != 0 and getprop("/systems/fire/engine1/agent2-timer") != 99) { + eng1FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine1/agent2-timer") ~ " S:"; } - if (eng1FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine1/disch1") and !getprop("systems/fire/engine1/disch2") and getprop("systems/fire/engine1/agent2-timer") > 0) { + if (eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/disch1") and !getprop("/systems/fire/engine1/disch2") and getprop("/systems/fire/engine1/agent2-timer") > 0) { eng1FireFl30Sec.active = 1; } else { ECAM_controller.warningReset(eng1FireFl30Sec); } - if (eng1FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine1/disch1") and !getprop("systems/fire/engine1/disch2")) { + if (eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/disch1") and !getprop("/systems/fire/engine1/disch2")) { eng1FireFlAgent2.active = 1; } else { ECAM_controller.warningReset(eng1FireFlAgent2); @@ -360,13 +360,13 @@ var messages_priority_3 = func { } if (phaseVar3 < 5 or phaseVar3 > 7) { - if (eng1FireGnlever.clearFlag == 0 and getprop("fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) { + if (eng1FireGnlever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) { eng1FireGnlever.active = 1; } else { ECAM_controller.warningReset(eng1FireGnlever); } - if (eng1FireGnparkbrk.clearFlag == 0 and getprop("controls/gear/brake-parking") == 0) { + if (eng1FireGnparkbrk.clearFlag == 0 and getprop("/controls/gear/brake-parking") == 0) { eng1FireGnstopped.active = 1; eng1FireGnparkbrk.active = 1; } else { @@ -374,31 +374,31 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng1FireGnparkbrk); } - if (eng1FireGnmaster.clearFlag == 0 and getprop("controls/engines/engine[0]/cutoff-switch") == 0) { + if (eng1FireGnmaster.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) { eng1FireGnmaster.active = 1; } else { ECAM_controller.warningReset(eng1FireGnmaster); } - if (eng1FireGnPB.clearFlag == 0 and getprop("controls/engines/engine[0]/fire-btn") == 0) { + if (eng1FireGnPB.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 0) { eng1FireGnPB.active = 1; } else { ECAM_controller.warningReset(eng1FireGnPB); } - if (eng1FireGnAgent1.clearFlag == 0 and !getprop("systems/fire/engine1/disch1")) { + if (eng1FireGnAgent1.clearFlag == 0 and !getprop("/systems/fire/engine1/disch1")) { eng1FireGnAgent1.active = 1; } else { ECAM_controller.warningReset(eng1FireGnAgent1); } - if (eng1FireGnAgent2.clearFlag == 0 and !getprop("systems/fire/engine1/disch2")) { + if (eng1FireGnAgent2.clearFlag == 0 and !getprop("/systems/fire/engine1/disch2")) { eng1FireGnAgent2.active = 1; } else { ECAM_controller.warningReset(eng1FireGnAgent2); } - if (eng1FireGnmaster2.clearFlag == 0 and getprop("controls/engines/engine[1]/cutoff-switch") == 0) { + if (eng1FireGnmaster2.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) { eng1FireGnmaster2.active = 1; } else { ECAM_controller.warningReset(eng1FireGnmaster2); @@ -424,7 +424,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng1FireGnevacSw); } - if (eng1FireGnevacApu.clearFlag == 0 and getprop("controls/apu/master") and getprop("engines/engine[2]/n1") > 99) { + if (eng1FireGnevacApu.clearFlag == 0 and getprop("/controls/apu/master") and getprop("/engines/engine[2]/n1") > 99) { eng1FireGnevacApu.active = 1; } else { ECAM_controller.warningReset(eng1FireGnevacApu); @@ -477,35 +477,35 @@ var messages_priority_3 = func { if (eng2Fire.active == 1) { if (phaseVar3 >= 5 and phaseVar3 <= 7) { - if (eng2FireFllever.clearFlag == 0 and getprop("fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) { + if (eng2FireFllever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) { eng2FireFllever.active = 1; } else { ECAM_controller.warningReset(eng2FireFllever); } - if (eng2FireFlmaster.clearFlag == 0 and getprop("controls/engines/engine[1]/cutoff-switch") == 0) { + if (eng2FireFlmaster.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) { eng2FireFlmaster.active = 1; } else { ECAM_controller.warningReset(eng2FireFlmaster); } - if (eng2FireFlPB.clearFlag == 0 and getprop("controls/engines/engine[1]/fire-btn") == 0) { + if (eng2FireFlPB.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 0) { eng2FireFlPB.active = 1; } else { ECAM_controller.warningReset(eng2FireFlPB); } - if (getprop("systems/fire/engine2/agent1-timer") != 0 and getprop("systems/fire/engine2/agent1-timer") != 99) { - eng2FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("systems/fire/engine2/agent1-timer") ~ " S...DISCH"; + if (getprop("/systems/fire/engine2/agent1-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) { + eng2FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("/systems/fire/engine2/agent1-timer") ~ " S...DISCH"; } - if (eng2FireFlAgent1.clearFlag == 0 and getprop("controls/engines/engine[1]/fire-btn") == 1 and !getprop("systems/fire/engine2/disch1") and getprop("systems/fire/engine2agent1-timer") != 0 and getprop("systems/fire/engine2/agent1-timer") != 99) { + if (eng2FireFlAgent1.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 1 and !getprop("/systems/fire/engine2/disch1") and getprop("/systems/fire/engine2agent1-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) { eng2FireFlAgent1Timer.active = 1; } else { ECAM_controller.warningReset(eng2FireFlAgent1Timer); } - if (eng2FireFlAgent1.clearFlag == 0 and !getprop("systems/fire/engine2/disch1") and (getprop("systems/fire/engine2/agent1-timer") == 0 or getprop("systems/fire/engine2/agent1-timer") == 99)) { + if (eng2FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1") and (getprop("/systems/fire/engine2/agent1-timer") == 0 or getprop("/systems/fire/engine2/agent1-timer") == 99)) { eng2FireFlAgent1.active = 1; } else { ECAM_controller.warningReset(eng2FireFlAgent1); @@ -517,17 +517,17 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng2FireFlATC); } - if (getprop("systems/fire/engine2/agent2-timer") != 0 and getprop("systems/fire/engine2/agent2-timer") != 99) { - eng2FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("systems/fire/engine2/agent2-timer") ~ " S:"; + if (getprop("/systems/fire/engine2/agent2-timer") != 0 and getprop("/systems/fire/engine2/agent2-timer") != 99) { + eng2FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine2/agent2-timer") ~ " S:"; } - if (eng2FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine2/disch1") and !getprop("systems/fire/engine2/disch2") and getprop("systems/fire/engine2/agent2-timer") > 0) { + if (eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/disch1") and !getprop("/systems/fire/engine2/disch2") and getprop("/systems/fire/engine2/agent2-timer") > 0) { eng2FireFl30Sec.active = 1; } else { ECAM_controller.warningReset(eng2FireFl30Sec); } - if (eng2FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine2/disch1") and !getprop("systems/fire/engine2/disch2")) { + if (eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/disch1") and !getprop("/systems/fire/engine2/disch2")) { eng2FireFlAgent2.active = 1; } else { ECAM_controller.warningReset(eng2FireFlAgent2); @@ -543,13 +543,13 @@ var messages_priority_3 = func { } if (phaseVar3 < 5 or phaseVar3 > 7) { - if (eng2FireGnlever.clearFlag == 0 and getprop("fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) { + if (eng2FireGnlever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) { eng2FireGnlever.active = 1; } else { ECAM_controller.warningReset(eng2FireGnlever); } - if (eng2FireGnparkbrk.clearFlag == 0 and getprop("controls/gear/brake-parking") == 0) { + if (eng2FireGnparkbrk.clearFlag == 0 and getprop("/controls/gear/brake-parking") == 0) { eng2FireGnstopped.active = 1; eng2FireGnparkbrk.active = 1; } else { @@ -557,31 +557,31 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng2FireGnparkbrk); } - if (eng2FireGnmaster.clearFlag == 0 and getprop("controls/engines/engine[1]/cutoff-switch") == 0) { + if (eng2FireGnmaster.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) { eng2FireGnmaster.active = 1; } else { ECAM_controller.warningReset(eng2FireGnmaster); } - if (eng2FireGnPB.clearFlag == 0 and getprop("controls/engines/engine[1]/fire-btn") == 0) { + if (eng2FireGnPB.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 0) { eng2FireGnPB.active = 1; } else { ECAM_controller.warningReset(eng2FireGnPB); } - if (eng2FireGnAgent1.clearFlag == 0 and !getprop("systems/fire/engine2/disch1")) { + if (eng2FireGnAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1")) { eng2FireGnAgent1.active = 1; } else { ECAM_controller.warningReset(eng2FireGnAgent1); } - if (eng2FireGnAgent2.clearFlag == 0 and !getprop("systems/fire/engine2/disch2")) { + if (eng2FireGnAgent2.clearFlag == 0 and !getprop("/systems/fire/engine2/disch2")) { eng2FireGnAgent2.active = 1; } else { ECAM_controller.warningReset(eng2FireGnAgent2); } - if (eng2FireGnmaster2.clearFlag == 0 and getprop("controls/engines/engine[0]/cutoff-switch") == 0) { + if (eng2FireGnmaster2.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) { eng2FireGnmaster2.active = 1; } else { ECAM_controller.warningReset(eng2FireGnmaster2); @@ -607,7 +607,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng2FireGnevacSw); } - if (eng2FireGnevacApu.clearFlag == 0 and getprop("controls/apu/master") and getprop("engines/engine[2]/n1") > 99) { + if (eng2FireGnevacApu.clearFlag == 0 and getprop("/controls/apu/master") and getprop("/engines/engine[2]/n1") > 99) { eng2FireGnevacApu.active = 1; } else { ECAM_controller.warningReset(eng2FireGnevacApu); @@ -660,29 +660,29 @@ var messages_priority_3 = func { # APU Fire if (apuFire.active == 1) { - if (apuFirePB.clearFlag == 0 and !getprop("controls/apu/fire-btn")) { + if (apuFirePB.clearFlag == 0 and !getprop("/controls/apu/fire-btn")) { apuFirePB.active = 1; } else { ECAM_controller.warningReset(apuFirePB); } - if (getprop("systems/fire/apu/agent-timer") != 0 and getprop("systems/fire/apu/agent-timer") != 99) { - apuFireAgentTimer.msg = " -AGENT AFT " ~ getprop("systems/fire/apu/agent-timer") ~ " S...DISCH"; + if (getprop("/systems/fire/apu/agent-timer") != 0 and getprop("/systems/fire/apu/agent-timer") != 99) { + apuFireAgentTimer.msg = " -AGENT AFT " ~ getprop("/systems/fire/apu/agent-timer") ~ " S...DISCH"; } - if (apuFireAgent.clearFlag == 0 and getprop("controls/apu/fire-btn") and !getprop("systems/fire/apu/disch") and getprop("systems/fire/apu/agent-timer") != 0) { + if (apuFireAgent.clearFlag == 0 and getprop("/controls/apu/fire-btn") and !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") != 0) { apuFireAgentTimer.active = 1; } else { ECAM_controller.warningReset(apuFireAgentTimer); } - if (apuFireAgent.clearFlag == 0 and getprop("controls/apu/fire-btn") and !getprop("systems/fire/apu/disch") and getprop("systems/fire/apu/agent-timer") == 0) { + if (apuFireAgent.clearFlag == 0 and getprop("/controls/apu/fire-btn") and !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") == 0) { apuFireAgent.active = 1; } else { ECAM_controller.warningReset(apuFireAgent); } - if (apuFireMaster.clearFlag == 0 and getprop("controls/apu/master")) { + if (apuFireMaster.clearFlag == 0 and getprop("/controls/apu/master")) { apuFireMaster.active = 1; } else { ECAM_controller.warningReset(apuFireMaster); @@ -695,7 +695,7 @@ var messages_priority_3 = func { } # CONFIG - if ((slats_config.clearFlag == 0) and (getprop("controls/flight/flaps-input") == 0 or getprop("controls/flight/flaps-input")) == 4 and phaseVar3 >= 3 and phaseVar3 <= 4) { + if ((slats_config.clearFlag == 0) and (getprop("/controls/flight/flaps-input") == 0 or getprop("/controls/flight/flaps-input")) == 4 and phaseVar3 >= 3 and phaseVar3 <= 4) { slats_config.active = 1; slats_config_1.active = 1; } else { @@ -703,7 +703,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(slats_config_1); } - if ((flaps_config.clearFlag == 0) and (getprop("controls/flight/flaps-input") == 0 or getprop("controls/flight/flaps-input") == 4) and phaseVar3 >= 3 and phaseVar3 <= 4) { + if ((flaps_config.clearFlag == 0) and (getprop("/controls/flight/flaps-input") == 0 or getprop("/controls/flight/flaps-input") == 4) and phaseVar3 >= 3 and phaseVar3 <= 4) { flaps_config.active = 1; flaps_config_1.active = 1; } else { @@ -711,7 +711,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(flaps_config_1); } - if ((spd_brk_config.clearFlag == 0) and getprop("controls/flight/speedbrake") != 0 and phaseVar3 >= 3 and phaseVar3 <= 4) { + if ((spd_brk_config.clearFlag == 0) and getprop("/controls/flight/speedbrake") != 0 and phaseVar3 >= 3 and phaseVar3 <= 4) { spd_brk_config.active = 1; spd_brk_config_1.active = 1; } else { @@ -719,7 +719,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(spd_brk_config_1); } - if ((pitch_trim_config.clearFlag == 0) and (getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65) and phaseVar3 >= 3 and phaseVar3 <= 4) { + if ((pitch_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65) and phaseVar3 >= 3 and phaseVar3 <= 4) { pitch_trim_config.active = 1; pitch_trim_config_1.active = 1; } else { @@ -727,7 +727,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(pitch_trim_config_1); } - if ((rud_trim_config.clearFlag == 0) and (getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) and phaseVar3 >= 3 and phaseVar3 <= 4) { + if ((rud_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) and phaseVar3 >= 3 and phaseVar3 <= 4) { rud_trim_config.active = 1; rud_trim_config_1.active = 1; } else { @@ -735,7 +735,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(rud_trim_config_1); } - if ((park_brk_config.clearFlag == 0) and getprop("controls/gear/brake-parking") == 1 and phaseVar3 >= 3 and phaseVar3 <= 4) { + if ((park_brk_config.clearFlag == 0) and getprop("/controls/gear/brake-parking") == 1 and phaseVar3 >= 3 and phaseVar3 <= 4) { park_brk_config.active = 1; } else { ECAM_controller.warningReset(park_brk_config); @@ -749,19 +749,19 @@ var messages_priority_3 = func { } # C-Chord - if ((pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("systems/navigation/adr/output/baro-alt-1-capt")) < 200) or !pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("systems/navigation/adr/output/baro-alt-corrected-1-capt")) < 200) { + if ((pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("/systems/navigation/adr/output/baro-alt-1-capt")) < 200) or !pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("/systems/navigation/adr/output/baro-alt-corrected-1-capt")) < 200) { alt200 = 1; } else { alt200 = 0; } - if ((pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("systems/navigation/adr/output/baro-alt-1-capt")) < 750) or !pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("systems/navigation/adr/output/baro-alt-corrected-1-capt")) < 750) { + if ((pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("/systems/navigation/adr/output/baro-alt-1-capt")) < 750) or !pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("/systems/navigation/adr/output/baro-alt-corrected-1-capt")) < 750) { alt750 = 1; } else { alt750 = 0; } - if (FWC.altChg.getValue() or pts.Gear.position[0].getValue() == 1 or (getprop("controls/gear/gear-down") and pts.Fdm.JSBsim.Fcs.slatDeg.getValue() > 4) or fmgc.Output.vert.getValue() == 2) { + if (FWC.altChg.getValue() or pts.Gear.position[0].getValue() == 1 or (getprop("/controls/gear/gear-down") and pts.Fdm.JSBsim.Fcs.slatDeg.getValue() > 4) or fmgc.Output.vert.getValue() == 2) { altAlertInhibit = 1; } else { altAlertInhibit = 0; @@ -785,26 +785,26 @@ var messages_priority_3 = func { setprop("ECAM/flipflop/alt-alert-2-rs-set", 0); } - if (getprop("ECAM/flipflop/alt-alert-rs-reset") or (!alt750 and !alt200 and !altAlertInhibit)) { + if (getprop("/ECAM/flipflop/alt-alert-rs-reset") or (!alt750 and !alt200 and !altAlertInhibit)) { setprop("ECAM/flipflop/alt-alert-2-rs-reset", 1); } else { setprop("ECAM/flipflop/alt-alert-2-rs-reset", 0); } - if (alt750 and !alt200 and !altAlertInhibit and getprop("ECAM/flipflop/alt-alert-2-rs-output")) { + if (alt750 and !alt200 and !altAlertInhibit and getprop("/ECAM/flipflop/alt-alert-2-rs-output")) { setprop("ECAM/flipflop/alt-alert-3-rs-set", 1); } else { setprop("ECAM/flipflop/alt-alert-3-rs-set", 0); } - if ((!alt750 and !alt200 and !altAlertInhibit and getprop("ECAM/flipflop/alt-alert-rs-output")) or (!alt750 and !alt200 and !altAlertInhibit and getprop("ECAM/flipflop/alt-alert-3-rs-output")) or getprop("ECAM/flipflop/alt-alert-3-rs-set")) { + if ((!alt750 and !alt200 and !altAlertInhibit and getprop("/ECAM/flipflop/alt-alert-rs-output")) or (!alt750 and !alt200 and !altAlertInhibit and getprop("/ECAM/flipflop/alt-alert-3-rs-output")) or getprop("/ECAM/flipflop/alt-alert-3-rs-set")) { bigThree = 1; } else { bigThree = 0; } if (FWC.Timer.gnd.getValue() != 1 and (FWC.Monostable.altAlert1Output.getValue() or bigThree)) { - if (!getprop("sim/sound/warnings/cchord-inhibit")) { + if (!getprop("/sim/sound/warnings/cchord-inhibit")) { setprop("sim/sound/warnings/cchord", 1); } else { setprop("sim/sound/warnings/cchord", 0); @@ -814,7 +814,7 @@ var messages_priority_3 = func { setprop("sim/sound/warnings/cchord-inhibit", 0); } - if (FWC.Timer.gnd.getValue() != 1 and getprop("ECAM/flipflop/alt-alert-3-rs-set") != 1 and alt750 and !alt200 and !altAlertInhibit) { + if (FWC.Timer.gnd.getValue() != 1 and getprop("/ECAM/flipflop/alt-alert-3-rs-set") != 1 and alt750 and !alt200 and !altAlertInhibit) { setprop("ECAM/alt-alert-steady", 1); } else { setprop("ECAM/alt-alert-steady", 0); @@ -834,7 +834,7 @@ var messages_priority_3 = func { cargoSmokeFwd.isMainMsg = 1; } - if (cargoSmokeFwdAgent.clearFlag == 0 and cargoSmokeFwd.active == 1 and !getprop("systems/fire/cargo/disch")) { + if (cargoSmokeFwdAgent.clearFlag == 0 and cargoSmokeFwd.active == 1 and !getprop("/systems/fire/cargo/disch")) { cargoSmokeFwdAgent.active = 1; } else { ECAM_controller.warningReset(cargoSmokeFwdAgent); @@ -849,7 +849,7 @@ var messages_priority_3 = func { systems.cargoTestBtnOff.setBoolValue(0); } - if (cargoSmokeAftAgent.clearFlag == 0 and cargoSmokeAft.active == 1 and !getprop("systems/fire/cargo/disch")) { + if (cargoSmokeAftAgent.clearFlag == 0 and cargoSmokeAft.active == 1 and !getprop("/systems/fire/cargo/disch")) { cargoSmokeAftAgent.active = 1; } else { ECAM_controller.warningReset(cargoSmokeAftAgent); @@ -870,7 +870,7 @@ var messages_priority_3 = func { } # ESS on BAT - if ((!gear.getValue() or !getprop("controls/gear/gear-down")) and getprop("systems/electrical/some-electric-thingie/static-inverter-timer") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) { + if ((!gear.getValue() or !getprop("/controls/gear/gear-down")) and getprop("/systems/electrical/some-electric-thingie/static-inverter-timer") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) { essBusOnBat.active = 1; essBusOnBatLGUplock.active = 1; essBusOnBatManOn.active = 1; @@ -887,24 +887,24 @@ var messages_priority_3 = func { } # EMER CONFIG - if (getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !dualFailNode.getBoolValue() and phaseVar3 != 4 and phaseVar3 != 8 and emerconfig.clearFlag == 0 and !getprop("systems/acconfig/autoconfig-running")) { + if (getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dualFailNode.getBoolValue() and phaseVar3 != 4 and phaseVar3 != 8 and emerconfig.clearFlag == 0 and !getprop("/systems/acconfig/autoconfig-running")) { emerconfig.active = 1; - if (getprop("systems/hydraulic/sources/rat/position") != 0 and emerconfigMinRat.clearFlag == 0) { + if (getprop("/systems/hydraulic/sources/rat/position") != 0 and emerconfigMinRat.clearFlag == 0) { emerconfigMinRat.active = 1; } else { ECAM_controller.warningReset(emerconfigMinRat); } - if (!(getprop("systems/electrical/some-electric-thingie/generator-1-reset") and getprop("systems/electrical/some-electric-thingie/generator-2-reset")) and emerconfigGen.clearFlag == 0) { + if (!(getprop("/systems/electrical/some-electric-thingie/generator-1-reset") and getprop("/systems/electrical/some-electric-thingie/generator-2-reset")) and emerconfigGen.clearFlag == 0) { emerconfigGen.active = 1; # EGEN12R TRUE } else { ECAM_controller.warningReset(emerconfigGen); } - if (!(getprop("systems/electrical/some-electric-thingie/generator-1-reset-bustie") and getprop("systems/electrical/some-electric-thingie/generator-2-reset-bustie")) and emerconfigGen2.clearFlag == 0) { + if (!(getprop("/systems/electrical/some-electric-thingie/generator-1-reset-bustie") and getprop("/systems/electrical/some-electric-thingie/generator-2-reset-bustie")) and emerconfigGen2.clearFlag == 0) { emerconfigGen2.active = 1; - if (getprop("controls/electrical/switches/bus-tie")) { + if (getprop("/controls/electrical/switches/bus-tie")) { emerconfigBusTie.active = 1; } else { ECAM_controller.warningReset(emerconfigBusTie); @@ -916,13 +916,13 @@ var messages_priority_3 = func { ECAM_controller.warningReset(emerconfigGen3); } - if (getprop("systems/electrical/relay/emer-glc/contact-pos") == 0 and emerconfigManOn.clearFlag == 0) { + if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 0 and emerconfigManOn.clearFlag == 0) { emerconfigManOn.active = 1; } else { ECAM_controller.warningReset(emerconfigManOn); } - if (getprop("controls/engines/engine-start-switch") != 2 and emerconfigEngMode.clearFlag == 0) { + if (getprop("/controls/engines/engine-start-switch") != 2 and emerconfigEngMode.clearFlag == 0) { emerconfigEngMode.active = 1; } else { ECAM_controller.warningReset(emerconfigEngMode); @@ -958,7 +958,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(emerconfigFAC); } - if (!getprop("controls/electrical/switches/bus-tie") and emerconfigBusTie2.clearFlag == 0) { + if (!getprop("/controls/electrical/switches/bus-tie") and emerconfigBusTie2.clearFlag == 0) { emerconfigBusTie2.active = 1; } else { ECAM_controller.warningReset(emerconfigBusTie2); @@ -1019,7 +1019,7 @@ var messages_priority_3 = func { var messages_priority_2 = func { phaseVar2 = phaseNode.getValue(); # DC EMER CONFIG - if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcEmerconfig.clearFlag == 0) { + if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcEmerconfig.clearFlag == 0) { dcEmerconfig.active = 1; dcEmerconfigManOn.active = 1; } else { @@ -1027,7 +1027,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(dcEmerconfigManOn); } - if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus12Fault.clearFlag == 0) { + if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus12Fault.clearFlag == 0) { dcBus12Fault.active = 1; dcBus12FaultBlower.active = 1; dcBus12FaultExtract.active = 1; @@ -1043,7 +1043,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(dcBus12FaultBrking); } - if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBusEssFault.clearFlag == 0) { + if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBusEssFault.clearFlag == 0) { AcBusEssFault.active = 1; if (!systems.ELEC.Switch.acEssFeed.getBoolValue()) { AcBusEssFaultFeed.active = 1; @@ -1057,7 +1057,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(AcBusEssFaultAtc); } - if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus1Fault.clearFlag == 0) { + if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus1Fault.clearFlag == 0) { AcBus1Fault.active = 1; AcBus1FaultBlower.active = 1; } else { @@ -1079,7 +1079,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(DcEssBusFaultGPWS); } - if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus2Fault.clearFlag == 0) { + if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus2Fault.clearFlag == 0) { AcBus2Fault.active = 1; AcBus2FaultExtract.active = 1; } else { @@ -1087,7 +1087,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(AcBus2FaultExtract); } - if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus1Fault.clearFlag == 0) { + if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus1Fault.clearFlag == 0) { dcBus1Fault.active = 1; dcBus1FaultBlower.active = 1; dcBus1FaultExtract.active = 1; @@ -1097,7 +1097,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(dcBus1FaultExtract); } - if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus2Fault.clearFlag == 0) { + if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus2Fault.clearFlag == 0) { dcBus2Fault.active = 1; dcBus2FaultAirData.active = 1; dcBus2FaultBaro.active = 1; @@ -1107,13 +1107,13 @@ var messages_priority_2 = func { ECAM_controller.warningReset(dcBus2FaultBaro); } - if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and dcBusBatFault.clearFlag == 0) { + if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and dcBusBatFault.clearFlag == 0) { dcBusBatFault.active = 1; } else { ECAM_controller.warningReset(dcBusBatFault); } - if (!(getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBusEssShed.clearFlag == 0) { + if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBusEssShed.clearFlag == 0) { dcBusEssShed.active = 1; dcBusEssShedExtract.active = 1; dcBusEssShedIcing.active = 1; @@ -1123,9 +1123,9 @@ var messages_priority_2 = func { ECAM_controller.warningReset(dcBusEssShedIcing); } - if (!(getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar2 != 4 and phaseVar2 != 8 and acBusEssShed.clearFlag == 0) { + if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar2 != 4 and phaseVar2 != 8 and acBusEssShed.clearFlag == 0) { acBusEssShed.active = 1; - if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config")) { + if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config")) { acBusEssShedAtc.active = 1; } else { ECAM_controller.warningReset(acBusEssShed); @@ -1143,8 +1143,8 @@ var messages_priority_2 = func { ECAM_controller.warningReset(athr_offw_1); } - if ((athr_lock.clearFlag == 0) and phaseVar2 >= 5 and phaseVar2 <= 7 and getprop("systems/thrust/thr-locked-alert") == 1) { - if (getprop("systems/thrust/thr-locked-flash") == 0) { + if ((athr_lock.clearFlag == 0) and phaseVar2 >= 5 and phaseVar2 <= 7 and getprop("/systems/thrust/thr-locked-alert") == 1) { + if (getprop("/systems/thrust/thr-locked-flash") == 0) { athr_lock.msg = " "; } else { athr_lock.msg = msgSave @@ -1157,7 +1157,7 @@ var messages_priority_2 = func { } - if ((athr_lim.clearFlag == 0) and getprop("it-autoflight/output/athr") == 1 and ((getprop("systems/thrust/eng-out") != 1 and (getprop("systems/thrust/state1") == "MAN" or getprop("systems/thrust/state2") == "MAN")) or (getprop("systems/thrust/eng-out") == 1 and (getprop("systems/thrust/state1") == "MAN" or getprop("systems/thrust/state2") == "MAN" or (getprop("systems/thrust/state1") == "MAN THR" and getprop("controls/engines/engine[0]/throttle-pos") <= 0.83) or (getprop("systems/thrust/state2") == "MAN THR" and getprop("controls/engines/engine[0]/throttle-pos") <= 0.83)))) and (phaseVar2 >= 5 and phaseVar2 <= 7)) { + if ((athr_lim.clearFlag == 0) and getprop("it-autoflight/output/athr") == 1 and ((getprop("/systems/thrust/eng-out") != 1 and (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN")) or (getprop("/systems/thrust/eng-out") == 1 and (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN" or (getprop("/systems/thrust/state1") == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83) or (getprop("/systems/thrust/state2") == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83)))) and (phaseVar2 >= 5 and phaseVar2 <= 7)) { athr_lim.active = 1; athr_lim_1.active = 1; } else { @@ -1289,20 +1289,20 @@ var messages_priority_2 = func { } # APU EMER SHUT DOWN - if (apuEmerShutdown.clearFlag == 0 and systems.APUController.APU.signals.autoshutdown and systems.APUController.APU.signals.emer and !getprop("systems/fire/apu/warning-active") and (phaseVar2 == 6 or phaseVar2 >= 9 or phaseVar2 <= 2)) { + if (apuEmerShutdown.clearFlag == 0 and systems.APUController.APU.signals.autoshutdown and systems.APUController.APU.signals.emer and !getprop("/systems/fire/apu/warning-active") and (phaseVar2 == 6 or phaseVar2 >= 9 or phaseVar2 <= 2)) { apuEmerShutdown.active = 1; } elsif (apuEmerShutdown.clearFlag == 1) { ECAM_controller.warningReset(apuEmerShutdown); } - if (apuEmerShutdownMast.clearFlag == 0 and getprop("controls/apu/master") and apuEmerShutdown.active == 1) { + if (apuEmerShutdownMast.clearFlag == 0 and getprop("/controls/apu/master") and apuEmerShutdown.active == 1) { apuEmerShutdownMast.active = 1; } else { ECAM_controller.warningReset(apuEmerShutdownMast); } # APU AUTO SHUT DOWN - if (apuAutoShutdown.clearFlag == 0 and systems.APUController.APU.signals.autoshutdown and !systems.APUController.APU.signals.emer and !getprop("systems/fire/apu/warning-active") and (phaseVar2 == 6 or phaseVar2 >= 9 or phaseVar2 <= 2)) { + if (apuAutoShutdown.clearFlag == 0 and systems.APUController.APU.signals.autoshutdown and !systems.APUController.APU.signals.emer and !getprop("/systems/fire/apu/warning-active") and (phaseVar2 == 6 or phaseVar2 >= 9 or phaseVar2 <= 2)) { apuAutoShutdown.active = 1; } elsif (apuAutoShutdown.clearFlag == 1) { ECAM_controller.warningReset(apuAutoShutdown); @@ -2024,25 +2024,25 @@ var messages_priority_0 = func { var messages_config_memo = func { phaseVarMemo = phaseNode.getValue(); - if (getprop("controls/flight/flaps-input") == 0 or getprop("controls/flight/flaps-input") == 4 or getprop("controls/flight/speedbrake") != 0 or getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65 or getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) { + if (getprop("/controls/flight/flaps-input") == 0 or getprop("/controls/flight/flaps-input") == 4 or getprop("/controls/flight/speedbrake") != 0 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) { setprop("ECAM/to-config-normal", 0); } else { setprop("ECAM/to-config-normal", 1); } - if (getprop("ECAM/to-config-test") and (phaseVarMemo == 2 or phaseVarMemo == 9)) { + if (getprop("/ECAM/to-config-test") and (phaseVarMemo == 2 or phaseVarMemo == 9)) { setprop("ECAM/to-config-set", 1); } else { setprop("ECAM/to-config-set", 0); } - if (!getprop("ECAM/to-config-normal") or phaseVarMemo == 6) { + if (!getprop("/ECAM/to-config-normal") or phaseVarMemo == 6) { setprop("ECAM/to-config-reset", 1); } else { setprop("ECAM/to-config-reset", 0); } - if (getprop("controls/autobrake/mode") == 3) { + if (getprop("/controls/autobrake/mode") == 3) { toMemoLine1.msg = "T.O AUTO BRK MAX"; toMemoLine1.colour = "g"; } else { @@ -2050,7 +2050,7 @@ var messages_config_memo = func { toMemoLine1.colour = "c"; } - if (getprop("controls/switches/seatbelt-sign") and getprop("controls/switches/no-smoking-sign")) { + if (getprop("/controls/switches/seatbelt-sign") and getprop("/controls/switches/no-smoking-sign")) { toMemoLine2.msg = " SIGNS ON"; toMemoLine2.colour = "g"; } else { @@ -2058,7 +2058,7 @@ var messages_config_memo = func { toMemoLine2.colour = "c"; } - if (getprop("controls/flight/speedbrake-arm")) { + if (getprop("/controls/flight/speedbrake-arm")) { toMemoLine3.msg = " SPLRS ARM"; toMemoLine3.colour = "g"; } else { @@ -2066,7 +2066,7 @@ var messages_config_memo = func { toMemoLine3.colour = "c"; } - if (getprop("controls/flight/flaps-pos") > 0 and getprop("controls/flight/flaps-pos") < 5) { + if (getprop("/controls/flight/flaps-pos") > 0 and getprop("/controls/flight/flaps-pos") < 5) { toMemoLine4.msg = " FLAPS T.O"; toMemoLine4.colour = "g"; } else { @@ -2074,7 +2074,7 @@ var messages_config_memo = func { toMemoLine4.colour = "c"; } - if (getprop("ECAM/to-config-flipflop") and getprop("ECAM/to-config-normal")) { + if (getprop("/ECAM/to-config-flipflop") and getprop("/ECAM/to-config-normal")) { toMemoLine5.msg = " T.O CONFIG NORMAL"; toMemoLine5.colour = "g"; } else { @@ -2082,7 +2082,7 @@ var messages_config_memo = func { toMemoLine5.colour = "c"; } - if (getprop("ECAM/to-config-test") and (phaseVarMemo == 2 or phaseVarMemo == 9)) { + if (getprop("/ECAM/to-config-test") and (phaseVarMemo == 2 or phaseVarMemo == 9)) { setprop("ECAM/to-memo-set", 1); } else { setprop("ECAM/to-memo-set", 0); @@ -2094,7 +2094,7 @@ var messages_config_memo = func { setprop("ECAM/to-memo-reset", 0); } - if ((phaseVarMemo == 2 and getprop("ECAM/engine-start-time") != 0 and getprop("ECAM/engine-start-time") + 120 < getprop("sim/time/elapsed-sec")) or getprop("ECAM/to-memo-flipflop")) { + if ((phaseVarMemo == 2 and getprop("/ECAM/engine-start-time") != 0 and getprop("/ECAM/engine-start-time") + 120 < getprop("/sim/time/elapsed-sec")) or getprop("/ECAM/to-memo-flipflop")) { toMemoLine1.active = 1; toMemoLine2.active = 1; toMemoLine3.active = 1; @@ -2108,7 +2108,7 @@ var messages_config_memo = func { ECAM_controller.warningReset(toMemoLine5); } - if (getprop("fdm/jsbsim/gear/gear-pos-norm") == 1) { + if (getprop("/fdm/jsbsim/gear/gear-pos-norm") == 1) { ldgMemoLine1.msg = "LDG LDG GEAR DN"; ldgMemoLine1.colour = "g"; } else { @@ -2116,7 +2116,7 @@ var messages_config_memo = func { ldgMemoLine1.colour = "c"; } - if (getprop("controls/switches/seatbelt-sign") and getprop("controls/switches/no-smoking-sign")) { + if (getprop("/controls/switches/seatbelt-sign") and getprop("/controls/switches/no-smoking-sign")) { ldgMemoLine2.msg = " SIGNS ON"; ldgMemoLine2.colour = "g"; } else { @@ -2124,7 +2124,7 @@ var messages_config_memo = func { ldgMemoLine2.colour = "c"; } - if (getprop("controls/flight/speedbrake-arm")) { + if (getprop("/controls/flight/speedbrake-arm")) { ldgMemoLine3.msg = " SPLRS ARM"; ldgMemoLine3.colour = "g"; } else { @@ -2133,7 +2133,7 @@ var messages_config_memo = func { } if (getprop("it-fbw/law") == 1 or getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override")) { - if (getprop("controls/flight/flaps-pos") == 4) { + if (getprop("/controls/flight/flaps-pos") == 4) { ldgMemoLine4.msg = " FLAPS CONF 3"; ldgMemoLine4.colour = "g"; } else { @@ -2141,7 +2141,7 @@ var messages_config_memo = func { ldgMemoLine4.colour = "c"; } } else { - if (getprop("controls/flight/flaps-pos") == 5) { + if (getprop("/controls/flight/flaps-pos") == 5) { ldgMemoLine4.msg = " FLAPS FULL"; ldgMemoLine4.colour = "g"; } else { @@ -2175,7 +2175,7 @@ var messages_config_memo = func { setprop("ECAM/ldg-memo-2200-reset", 0); } - if ((phaseVarMemo == 6 and getprop("ECAM/ldg-memo-flipflop") and getprop("ECAM/ldg-memo-2200-flipflop")) or phaseVarMemo == 7 or phaseVarMemo == 8) { + if ((phaseVarMemo == 6 and getprop("/ECAM/ldg-memo-flipflop") and getprop("/ECAM/ldg-memo-2200-flipflop")) or phaseVarMemo == 7 or phaseVarMemo == 8) { ldgMemoLine1.active = 1; ldgMemoLine2.active = 1; ldgMemoLine3.active = 1; @@ -2190,7 +2190,7 @@ var messages_config_memo = func { var messages_memo = func { phaseVarMemo2 = phaseNode.getValue(); - if (getprop("services/fuel-truck/enable") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { + if (getprop("/services/fuel-truck/enable") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { refuelg.active = 1; } else { refuelg.active = 0; @@ -2204,7 +2204,7 @@ var messages_memo = func { if ((phaseVarMemo2 == 1 or phaseVarMemo2 == 2) and toMemoLine1.active != 1 and ldgMemoLine1.active != 1 and (systems.ADIRS.ADIRunits[0].inAlign == 1 or systems.ADIRS.ADIRunits[1].inAlign == 1 or systems.ADIRS.ADIRunits[2].inAlign == 1)) { irs_in_align.active = 1; - if (getprop("ECAM/phases/timer/eng1or2-output")) { + if (getprop("/ECAM/phases/timer/eng1or2-output")) { irs_in_align.colour = "a"; } else { irs_in_align.colour = "g"; @@ -2235,25 +2235,25 @@ var messages_memo = func { } } - if (getprop("controls/flight/speedbrake-arm") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { + if (getprop("/controls/flight/speedbrake-arm") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { gnd_splrs.active = 1; } else { gnd_splrs.active = 0; } - if (getprop("controls/lighting/seatbelt-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { + if (getprop("/controls/lighting/seatbelt-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { seatbelts.active = 1; } else { seatbelts.active = 0; } - if (getprop("controls/lighting/no-smoking-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed! + if (getprop("/controls/lighting/no-smoking-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed! nosmoke.active = 1; } else { nosmoke.active = 0; } - if (getprop("controls/lighting/strobe") == 0 and getprop("gear/gear[1]/wow") == 0 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # todo: use gear branch properties + if (getprop("/controls/lighting/strobe") == 0 and !pts.Gear.wow[1].getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # todo: use gear branch properties strobe_lt_off.active = 1; } else { strobe_lt_off.active = 0; @@ -2265,7 +2265,7 @@ var messages_memo = func { outr_tk_fuel_xfrd.active = 0; } - if (getprop("consumables/fuel/total-fuel-lbs") < 6000 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # assuming US short ton 2000lb + if (getprop("/consumables/fuel/total-fuel-lbs") < 6000 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # assuming US short ton 2000lb fob_3T.active = 1; } else { fob_3T.active = 0; @@ -2293,14 +2293,14 @@ var messages_right_memo = func { ldg_inhibit.active = 0; } - if ((getprop("gear/gear[1]/wow") == 0) and (getprop("systems/electrical/some-electric-thingie/emer-elec-config") or getprop("systems/fire/engine1/warning-active") == 1 or getprop("systems/fire/engine2/warning-active") == 1 or getprop("systems/fire/apu/warning-active") == 1 or getprop("systems/failures/cargo-aft-fire") == 1 or getprop("systems/failures/cargo-fwd-fire") == 1) or (((getprop("systems/hydraulic/green-psi") < 1500 and getprop("engines/engine[0]/state") == 3) and (getprop("systems/hydraulic/yellow-psi") < 1500 and getprop("engines/engine[1]/state") == 3)) or ((getprop("systems/hydraulic/green-psi") < 1500 or getprop("systems/hydraulic/yellow-psi") < 1500) and getprop("engines/engine[0]/state") == 3 and getprop("engines/engine[1]/state") == 3) and phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8)) { + if ((!pts.Gear.wow[1].getValue()) and (getprop("/systems/electrical/some-electric-thingie/emer-elec-config") or getprop("/systems/fire/engine1/warning-active") == 1 or getprop("/systems/fire/engine2/warning-active") == 1 or getprop("/systems/fire/apu/warning-active") == 1 or getprop("/systems/failures/cargo-aft-fire") == 1 or getprop("/systems/failures/cargo-fwd-fire") == 1) or (((getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/engines/engine[0]/state") == 3) and (getprop("/systems/hydraulic/yellow-psi") < 1500 and getprop("/engines/engine[1]/state") == 3)) or ((getprop("/systems/hydraulic/green-psi") < 1500 or getprop("/systems/hydraulic/yellow-psi") < 1500) and getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") == 3) and phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8)) { # todo: emer elec land_asap_r.active = 1; } else { land_asap_r.active = 0; } - if (land_asap_r.active == 0 and getprop("gear/gear[1]/wow") == 0 and ((getprop("fdm/jsbsim/propulsion/tank[0]/contents-lbs") < 1650 and getprop("fdm/jsbsim/propulsion/tank[1]/contents-lbs") < 1650) or ((getprop("systems/electrical/bus/dc-2") < 25 and (getprop("systems/failures/fctl/elac1") == 1 or getprop("systems/failures/fctl/sec1") == 1)) or (getprop("systems/hydraulic/green-psi") < 1500 and (getprop("systems/failures/fctl/elac1") == 1 and getprop("systems/failures/fctl/sec1") == 1)) or (getprop("systems/hydraulic/yellow-psi") < 1500 and (getprop("systems/failures/fctl/elac1") == 1 and getprop("systems/failures/fctl/sec1") == 1)) or (getprop("systems/hydraulic/blue-psi") < 1500 and (getprop("systems/failures/fctl/elac2") == 1 and getprop("systems/failures/fctl/sec2") == 1))) or (phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8 and (getprop("engines/engine[0]/state") != 3 or getprop("engines/engine[1]/state") != 3)))) { + if (land_asap_r.active == 0 and !pts.Gear.wow[1].getValue() and ((getprop("/fdm/jsbsim/propulsion/tank[0]/contents-lbs") < 1650 and getprop("/fdm/jsbsim/propulsion/tank[1]/contents-lbs") < 1650) or ((getprop("/systems/electrical/bus/dc-2") < 25 and (getprop("/systems/failures/fctl/elac1") == 1 or getprop("/systems/failures/fctl/sec1") == 1)) or (getprop("/systems/hydraulic/green-psi") < 1500 and (getprop("/systems/failures/fctl/elac1") == 1 and getprop("/systems/failures/fctl/sec1") == 1)) or (getprop("/systems/hydraulic/yellow-psi") < 1500 and (getprop("/systems/failures/fctl/elac1") == 1 and getprop("/systems/failures/fctl/sec1") == 1)) or (getprop("/systems/hydraulic/blue-psi") < 1500 and (getprop("/systems/failures/fctl/elac2") == 1 and getprop("/systems/failures/fctl/sec2") == 1))) or (phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8 and (getprop("/engines/engine[0]/state") != 3 or getprop("/engines/engine[1]/state") != 3)))) { land_asap_a.active = 1; } else { land_asap_a.active = 0; @@ -2318,19 +2318,19 @@ var messages_right_memo = func { athr_off.active = 0; } - if ((phaseVarMemo3 >= 2 and phaseVarMemo3 <= 7) and getprop("controls/flight/speedbrake") != 0) { + if ((phaseVarMemo3 >= 2 and phaseVarMemo3 <= 7) and getprop("/controls/flight/speedbrake") != 0) { spd_brk.active = 1; } else { spd_brk.active = 0; } - if (getprop("systems/thrust/state1") == "IDLE" and getprop("systems/thrust/state2") == "IDLE" and phaseVarMemo3 >= 6 and phaseVarMemo3 <= 7) { + if (getprop("/systems/thrust/state1") == "IDLE" and getprop("/systems/thrust/state2") == "IDLE" and phaseVarMemo3 >= 6 and phaseVarMemo3 <= 7) { spd_brk.colour = "g"; - } else if ((phaseVarMemo3 >= 2 and phaseVarMemo3 <= 5) or ((getprop("systems/thrust/state1") != "IDLE" or getprop("systems/thrust/state2") != "IDLE") and (phaseVarMemo3 >= 6 and phaseVarMemo3 <= 7))) { + } else if ((phaseVarMemo3 >= 2 and phaseVarMemo3 <= 5) or ((getprop("/systems/thrust/state1") != "IDLE" or getprop("/systems/thrust/state2") != "IDLE") and (phaseVarMemo3 >= 6 and phaseVarMemo3 <= 7))) { spd_brk.colour = "a"; } - if (getprop("controls/gear/brake-parking") == 1 and phaseVarMemo3 != 3) { + if (getprop("/controls/gear/brake-parking") == 1 and phaseVarMemo3 != 3) { park_brk.active = 1; } else { park_brk.active = 0; @@ -2341,19 +2341,19 @@ var messages_right_memo = func { park_brk.colour = "g"; } - if (getprop("controls/gear/brake-fans") == 1) { + if (getprop("/controls/gear/brake-fans") == 1) { brk_fan.active = 1; } else { brk_fan.active = 0; } - if (getprop("controls/hydraulic/ptu") == 1 and ((getprop("systems/hydraulic/yellow-psi") < 1450 and getprop("systems/hydraulic/green-psi") > 1450 and getprop("controls/hydraulic/elec-pump-yellow") == 0) or (getprop("systems/hydraulic/yellow-psi") > 1450 and getprop("systems/hydraulic/green-psi") < 1450))) { + if (getprop("/controls/hydraulic/ptu") == 1 and ((getprop("/systems/hydraulic/yellow-psi") < 1450 and getprop("/systems/hydraulic/green-psi") > 1450 and getprop("/controls/hydraulic/elec-pump-yellow") == 0) or (getprop("/systems/hydraulic/yellow-psi") > 1450 and getprop("/systems/hydraulic/green-psi") < 1450))) { ptu.active = 1; } else { ptu.active = 0; } - if (getprop("systems/hydraulic/sources/rat/position") != 0) { + if (getprop("/systems/hydraulic/sources/rat/position") != 0) { rat.active = 1; } else { rat.active = 0; @@ -2365,31 +2365,31 @@ var messages_right_memo = func { rat.colour = "g"; } - if (getprop("systems/electrical/relay/emer-glc/contact-pos") == 1 and getprop("systems/hydraulic/sources/rat/position") != 0 and getprop("gear/gear[1]/wow") == 0) { + if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 1 and getprop("/systems/hydraulic/sources/rat/position") != 0 and !pts.Gear.wow[1].getValue()) { emer_gen.active = 1; } else { emer_gen.active = 0; } - if (getprop("sim/model/autopush/enabled") == 1) { # this message is only on when towing - not when disc with switch + if (getprop("/sim/model/autopush/enabled") == 1) { # this message is only on when towing - not when disc with switch nw_strg_disc.active = 1; } else { nw_strg_disc.active = 0; } - if (getprop("engines/engine[0]/state") == 3 or getprop("engines/engine[1]/state") == 3) { + if (getprop("/engines/engine[0]/state") == 3 or getprop("/engines/engine[1]/state") == 3) { nw_strg_disc.colour = "a"; } else { nw_strg_disc.colour = "g"; } - if (getprop("controls/pneumatics/switches/ram-air") == 1) { + if (getprop("/controls/pneumatics/switches/ram-air") == 1) { ram_air.active = 1; } else { ram_air.active = 0; } - if (getprop("controls/engines/engine[0]/igniter-a") == 1 or getprop("controls/engines/engine[0]/igniter-b") == 1 or getprop("controls/engines/engine[1]/igniter-a") == 1 or getprop("controls/engines/engine[1]/igniter-b") == 1) { + if (getprop("/controls/engines/engine[0]/igniter-a") == 1 or getprop("/controls/engines/engine[0]/igniter-b") == 1 or getprop("/controls/engines/engine[1]/igniter-a") == 1 or getprop("/controls/engines/engine[1]/igniter-b") == 1) { ignition.active = 1; } else { ignition.active = 0; @@ -2401,31 +2401,31 @@ var messages_right_memo = func { company_call.active = 0; } - if (getprop("controls/pneumatics/switches/apu") == 1 and getprop("engines/engine[2]/n1") >= 95) { + if (getprop("/controls/pneumatics/switches/apu") == 1 and getprop("/engines/engine[2]/n1") >= 95) { apu_bleed.active = 1; } else { apu_bleed.active = 0; } - if (apu_bleed.active == 0 and getprop("engines/engine[2]/n1") >= 95) { + if (apu_bleed.active == 0 and getprop("/engines/engine[2]/n1") >= 95) { apu_avail.active = 1; } else { apu_avail.active = 0; } - if (getprop("controls/lighting/landing-lights[1]") > 0 or getprop("controls/lighting/landing-lights[2]") > 0) { + if (getprop("/controls/lighting/landing-lights[1]") > 0 or getprop("/controls/lighting/landing-lights[2]") > 0) { ldg_lt.active = 1; } else { ldg_lt.active = 0; } - if (getprop("controls/ice-protection/leng") == 1 or getprop("controls/ice-protection/reng") == 1 or getprop("systems/electrical/bus/dc-1") == 0 or getprop("systems/electrical/bus/dc-2") == 0) { + if (getprop("/controls/ice-protection/leng") == 1 or getprop("/controls/ice-protection/reng") == 1 or getprop("/systems/electrical/bus/dc-1") == 0 or getprop("/systems/electrical/bus/dc-2") == 0) { eng_aice.active = 1; } else { eng_aice.active = 0; } - if (getprop("controls/ice-protection/wing") == 1) { + if (getprop("/controls/ice-protection/wing") == 1) { wing_aice.active = 1; } else { wing_aice.active = 0; @@ -2437,25 +2437,25 @@ var messages_right_memo = func { vhf3_voice.active = 0; } - if (getprop("controls/autobrake/mode") == 1 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { + if (getprop("/controls/autobrake/mode") == 1 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { auto_brk_lo.active = 1; } else { auto_brk_lo.active = 0; } - if (getprop("controls/autobrake/mode") == 2 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { + if (getprop("/controls/autobrake/mode") == 2 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { auto_brk_med.active = 1; } else { auto_brk_med.active = 0; } - if (getprop("controls/autobrake/mode") == 3 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { + if (getprop("/controls/autobrake/mode") == 3 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { auto_brk_max.active = 1; } else { auto_brk_max.active = 0; } - if (getprop("systems/fuel/valves/crossfeed-valve") != 0 and getprop("controls/fuel/switches/crossfeed") == 1) { + if (getprop("/systems/fuel/valves/crossfeed-valve") != 0 and getprop("/controls/fuel/switches/crossfeed") == 1) { fuelx.active = 1; } else { fuelx.active = 0; @@ -2473,7 +2473,7 @@ var messages_right_memo = func { gpws_flap3.active = 0; } - if (phaseVarMemo3 >= 2 and phaseVarMemo3 <= 9 and systems.ELEC.Bus.ac1.getValue() >= 110 and systems.ELEC.Bus.ac2.getValue() >= 110 and (getprop("systems/fuel/feed-center-1") or getprop("systems/fuel/feed-center-2"))) { + if (phaseVarMemo3 >= 2 and phaseVarMemo3 <= 9 and systems.ELEC.Bus.ac1.getValue() >= 110 and systems.ELEC.Bus.ac2.getValue() >= 110 and (getprop("/systems/fuel/feed-center-1") or getprop("/systems/fuel/feed-center-2"))) { ctr_tk_feedg.active = 1; } else { ctr_tk_feedg.active = 0; diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index ad7e12e9..f53e8ccc 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -523,7 +523,7 @@ var athrOff = func(type) { var hdgInput = func { if (latMode.getValue() != 0) { showHDG.setBoolValue(1); - var hdgnow = getprop("/it-autoflight/input/hdg"); - setprop("/modes/fcu/hdg-time", pts.Sim.Time.elapsedSec.getValue()); + var hdgnow = fmgc.Input.hdg.getValue(); + fmgc.Custom.hdgTime.setValue(pts.Sim.Time.elapsedSec.getValue()); } } diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index 81ce43ac..32ab417d 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -1027,12 +1027,12 @@ setlistener("/sim/signals/fdm-initialized", func { # For Canvas Nav Display. setlistener("/it-autoflight/input/hdg", func { - setprop("autopilot/settings/heading-bug-deg", getprop("it-autoflight/input/hdg")); -}); + setprop("/autopilot/settings/heading-bug-deg", Input.hdg.getValue()); +}, 0, 0); setlistener("/it-autoflight/internal/alt", func { - setprop("autopilot/settings/target-altitude-ft", getprop("it-autoflight/internal/alt")); -}); + setprop("/autopilot/settings/target-altitude-ft", Internal.alt.getValue()); +}, 0, 0); var loopTimer = maketimer(0.1, ITAF, ITAF.loop); var slowLoopTimer = maketimer(1, ITAF, ITAF.slowLoop); diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 9ad82b9f..d67a823e 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -1171,7 +1171,7 @@ setlistener("/gear/gear[1]/wow", func() { setprop("/FMGC/internal/landing-time", -99); } - if (getprop("/gear/gear[1]/wow") == 1 and getprop("/FMGC/internal/landing-time") == -99) { + if (pts.Gear.wow[1].getValue() and getprop("/FMGC/internal/landing-time") == -99) { timer30secLanding.start(); setprop("/FMGC/internal/landing-time", pts.Sim.Time.elapsedSec.getValue()); }