From 62931a38a5b9733f8830ccc05b74cfe38614d133 Mon Sep 17 00:00:00 2001 From: Josh Davidson Date: Mon, 27 Apr 2020 11:37:43 -0400 Subject: [PATCH] Sim: Refactor ND EFIS interface, Altimeter STD, and fix some bugs --- A320-main.xml | 14 +- AircraftConfig/acconfig.nas | 625 ++++++++++--------- Models/FlightDeck/a320.flightdeck.xml | 32 +- Models/Instruments/IESI/IESI.nas | 26 +- Models/Instruments/Lower-ECAM/Lower-ECAM.nas | 450 ++++++------- Models/Instruments/MCDU/MCDU.nas | 580 ++++++++--------- Models/Instruments/PFD/PFD.nas | 333 +++++----- Models/Instruments/Upper-ECAM/Upper-ECAM.nas | 240 +++---- Nasal/ECAM/ECAM-logic.nas | 6 +- Nasal/ECAM/ECAM-main.nas | 4 +- Nasal/Libraries/buttons.nas | 13 +- Nasal/Libraries/efis.nas | 208 ++---- Nasal/Libraries/property-tree-setup.nas | 67 +- Nasal/Systems/ADIRS/ADR.nas | 4 +- Nasal/Systems/fuel.nas | 8 +- revision.txt | 2 +- 16 files changed, 1280 insertions(+), 1332 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 01014f37..1cf444e8 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -1166,6 +1166,15 @@ + + 0 + 0 + 0 + 29.92 + true + 0 + + true @@ -1420,11 +1429,6 @@ - - 0 - 0 - 29.92 - 0 0 diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index dcd1a20e..1b517f53 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -4,19 +4,19 @@ # Copyright (c) 2020 Josh Davidson (Octal450) var spinning = maketimer(0.05, func { - var spinning = getprop("systems/acconfig/spinning"); + var spinning = getprop("/systems/acconfig/spinning"); if (spinning == 0) { - setprop("systems/acconfig/spin", "\\"); - setprop("systems/acconfig/spinning", 1); + setprop("/systems/acconfig/spin", "\\"); + setprop("/systems/acconfig/spinning", 1); } else if (spinning == 1) { - setprop("systems/acconfig/spin", "|"); - setprop("systems/acconfig/spinning", 2); + setprop("/systems/acconfig/spin", "|"); + setprop("/systems/acconfig/spinning", 2); } else if (spinning == 2) { - setprop("systems/acconfig/spin", "/"); - setprop("systems/acconfig/spinning", 3); + setprop("/systems/acconfig/spin", "/"); + setprop("/systems/acconfig/spinning", 3); } else if (spinning == 3) { - setprop("systems/acconfig/spin", "-"); - setprop("systems/acconfig/spinning", 0); + setprop("/systems/acconfig/spin", "-"); + setprop("/systems/acconfig/spinning", 0); } }); @@ -25,141 +25,141 @@ var failReset = func { } var failResetOld = func { - setprop("systems/failures/elac1", 0); - setprop("systems/failures/elac2", 0); - setprop("systems/failures/sec1", 0); - setprop("systems/failures/sec2", 0); - setprop("systems/failures/sec3", 0); - setprop("systems/failures/fac1", 0); - setprop("systems/failures/fac2", 0); - setprop("systems/failures/aileron-left", 0); - setprop("systems/failures/aileron-right", 0); - setprop("systems/failures/elevator-left", 0); - setprop("systems/failures/elevator-right", 0); - setprop("systems/failures/rudder", 0); - setprop("systems/failures/spoiler-l1", 0); - setprop("systems/failures/spoiler-l2", 0); - setprop("systems/failures/spoiler-l3", 0); - setprop("systems/failures/spoiler-l4", 0); - setprop("systems/failures/spoiler-l5", 0); - setprop("systems/failures/spoiler-r1", 0); - setprop("systems/failures/spoiler-r2", 0); - setprop("systems/failures/spoiler-r3", 0); - setprop("systems/failures/spoiler-r4", 0); - setprop("systems/failures/spoiler-r5", 0); - setprop("systems/failures/elec-ac-ess", 0); - setprop("systems/failures/elec-batt1", 0); - setprop("systems/failures/elec-batt2", 0); - setprop("systems/failures/elec-galley", 0); - setprop("systems/failures/elec-genapu", 0); - setprop("systems/failures/elec-gen1", 0); - setprop("systems/failures/elec-gen2", 0); - setprop("systems/failures/bleed-apu", 0); - setprop("systems/failures/bleed-ext", 0); - setprop("systems/failures/bleed-eng1", 0); - setprop("systems/failures/bleed-eng2", 0); - setprop("systems/failures/pack1", 0); - setprop("systems/failures/pack2", 0); - setprop("systems/failures/hyd-blue", 0); - setprop("systems/failures/hyd-green", 0); - setprop("systems/failures/hyd-yellow", 0); - setprop("systems/failures/ptu", 0); - setprop("systems/failures/pump-blue", 0); - setprop("systems/failures/pump-green", 0); - setprop("systems/failures/pump-yellow-eng", 0); - setprop("systems/failures/pump-yellow-elec", 0); - setprop("systems/failures/tank0pump1", 0); - setprop("systems/failures/tank0pump2", 0); - setprop("systems/failures/tank1pump1", 0); - setprop("systems/failures/tank1pump2", 0); - setprop("systems/failures/tank2pump1", 0); - setprop("systems/failures/tank2pump2", 0); - setprop("systems/failures/fuelmode", 0); - setprop("systems/failures/cargo-aft-fire", 0); - setprop("systems/failures/cargo-fwd-fire", 0); - setprop("systems/failures/engine-left-fire", 0); - setprop("systems/failures/engine-right-fire", 0); + setprop("/systems/failures/elac1", 0); + setprop("/systems/failures/elac2", 0); + setprop("/systems/failures/sec1", 0); + setprop("/systems/failures/sec2", 0); + setprop("/systems/failures/sec3", 0); + setprop("/systems/failures/fac1", 0); + setprop("/systems/failures/fac2", 0); + setprop("/systems/failures/aileron-left", 0); + setprop("/systems/failures/aileron-right", 0); + setprop("/systems/failures/elevator-left", 0); + setprop("/systems/failures/elevator-right", 0); + setprop("/systems/failures/rudder", 0); + setprop("/systems/failures/spoiler-l1", 0); + setprop("/systems/failures/spoiler-l2", 0); + setprop("/systems/failures/spoiler-l3", 0); + setprop("/systems/failures/spoiler-l4", 0); + setprop("/systems/failures/spoiler-l5", 0); + setprop("/systems/failures/spoiler-r1", 0); + setprop("/systems/failures/spoiler-r2", 0); + setprop("/systems/failures/spoiler-r3", 0); + setprop("/systems/failures/spoiler-r4", 0); + setprop("/systems/failures/spoiler-r5", 0); + setprop("/systems/failures/elec-ac-ess", 0); + setprop("/systems/failures/elec-batt1", 0); + setprop("/systems/failures/elec-batt2", 0); + setprop("/systems/failures/elec-galley", 0); + setprop("/systems/failures/elec-genapu", 0); + setprop("/systems/failures/elec-gen1", 0); + setprop("/systems/failures/elec-gen2", 0); + setprop("/systems/failures/bleed-apu", 0); + setprop("/systems/failures/bleed-ext", 0); + setprop("/systems/failures/bleed-eng1", 0); + setprop("/systems/failures/bleed-eng2", 0); + setprop("/systems/failures/pack1", 0); + setprop("/systems/failures/pack2", 0); + setprop("/systems/failures/hyd-blue", 0); + setprop("/systems/failures/hyd-green", 0); + setprop("/systems/failures/hyd-yellow", 0); + setprop("/systems/failures/ptu", 0); + setprop("/systems/failures/pump-blue", 0); + setprop("/systems/failures/pump-green", 0); + setprop("/systems/failures/pump-yellow-eng", 0); + setprop("/systems/failures/pump-yellow-elec", 0); + setprop("/systems/failures/tank0pump1", 0); + setprop("/systems/failures/tank0pump2", 0); + setprop("/systems/failures/tank1pump1", 0); + setprop("/systems/failures/tank1pump2", 0); + setprop("/systems/failures/tank2pump1", 0); + setprop("/systems/failures/tank2pump2", 0); + setprop("/systems/failures/fuelmode", 0); + setprop("/systems/failures/cargo-aft-fire", 0); + setprop("/systems/failures/cargo-fwd-fire", 0); + setprop("/systems/failures/engine-left-fire", 0); + setprop("/systems/failures/engine-right-fire", 0); } failResetOld(); -setprop("systems/acconfig/autoconfig-running", 0); -setprop("systems/acconfig/spinning", 0); -setprop("systems/acconfig/spin", "-"); -setprop("systems/acconfig/options/revision", 0); -setprop("systems/acconfig/new-revision", 0); -setprop("systems/acconfig/out-of-date", 0); -setprop("systems/acconfig/mismatch-code", "0x000"); -setprop("systems/acconfig/mismatch-reason", "XX"); -setprop("systems/acconfig/options/keyboard-mode", 0); +setprop("/systems/acconfig/autoconfig-running", 0); +setprop("/systems/acconfig/spinning", 0); +setprop("/systems/acconfig/spin", "-"); +setprop("/systems/acconfig/options/revision", 0); +setprop("/systems/acconfig/new-revision", 0); +setprop("/systems/acconfig/out-of-date", 0); +setprop("/systems/acconfig/mismatch-code", "0x000"); +setprop("/systems/acconfig/mismatch-reason", "XX"); +setprop("/systems/acconfig/options/keyboard-mode", 0); # TODO Revert default weight-kgs to 1, when fully implemented -setprop("systems/acconfig/options/weight-kgs", 0); -setprop("systems/acconfig/options/adirs-skip", 0); -setprop("systems/acconfig/options/allow-oil-consumption", 0); -setprop("systems/acconfig/options/welcome-skip", 0); -setprop("systems/acconfig/options/no-rendering-warn", 0); -setprop("systems/acconfig/options/save-state", 0); -setprop("systems/acconfig/options/pfd-rate", 1); -setprop("systems/acconfig/options/nd-rate", 1); -setprop("systems/acconfig/options/uecam-rate", 1); -setprop("systems/acconfig/options/lecam-rate", 1); -setprop("systems/acconfig/options/iesi-rate", 1); -setprop("systems/acconfig/options/autopush/show-route", 1); -setprop("systems/acconfig/options/autopush/show-wingtip", 1); -var main_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/main/dialog", "Aircraft/A320-family/AircraftConfig/main.xml"); -var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/A320-family/AircraftConfig/welcome.xml"); -var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/A320-family/AircraftConfig/psload.xml"); -var ps_loaded_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psloaded/dialog", "Aircraft/A320-family/AircraftConfig/psloaded.xml"); -var init_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/init/dialog", "Aircraft/A320-family/AircraftConfig/ac_init.xml"); -var help_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/help/dialog", "Aircraft/A320-family/AircraftConfig/help.xml"); -var fbw_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fbw/dialog", "Aircraft/A320-family/AircraftConfig/fbw.xml"); -var fail_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fail/dialog", "Aircraft/A320-family/AircraftConfig/fail.xml"); -var about_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/about/dialog", "Aircraft/A320-family/AircraftConfig/about.xml"); -var update_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/update/dialog", "Aircraft/A320-family/AircraftConfig/update.xml"); -var updated_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/updated/dialog", "Aircraft/A320-family/AircraftConfig/updated.xml"); -var error_mismatch = gui.Dialog.new("sim/gui/dialogs/acconfig/error/mismatch/dialog", "Aircraft/A320-family/AircraftConfig/error-mismatch.xml"); -var fuel_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fuel/dialog", "Aircraft/A320-family/AircraftConfig/fuel.xml"); -var groundservices_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/groundsrvc/dialog", "Aircraft/A320-family/AircraftConfig/groundservices.xml"); -var du_quality = gui.Dialog.new("sim/gui/dialogs/acconfig/du-quality/dialog", "Aircraft/A320-family/AircraftConfig/du-quality.xml"); -var rendering_dlg = gui.Dialog.new("sim/gui/dialogs/rendering/dialog", "Aircraft/A320-family/AircraftConfig/rendering.xml"); +setprop("/systems/acconfig/options/weight-kgs", 0); +setprop("/systems/acconfig/options/adirs-skip", 0); +setprop("/systems/acconfig/options/allow-oil-consumption", 0); +setprop("/systems/acconfig/options/welcome-skip", 0); +setprop("/systems/acconfig/options/no-rendering-warn", 0); +setprop("/systems/acconfig/options/save-state", 0); +setprop("/systems/acconfig/options/pfd-rate", 1); +setprop("/systems/acconfig/options/nd-rate", 1); +setprop("/systems/acconfig/options/uecam-rate", 1); +setprop("/systems/acconfig/options/lecam-rate", 1); +setprop("/systems/acconfig/options/iesi-rate", 1); +setprop("/systems/acconfig/options/autopush/show-route", 1); +setprop("/systems/acconfig/options/autopush/show-wingtip", 1); +var main_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/main/dialog", "Aircraft/A320-family/AircraftConfig/main.xml"); +var welcome_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/A320-family/AircraftConfig/welcome.xml"); +var ps_load_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/A320-family/AircraftConfig/psload.xml"); +var ps_loaded_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/psloaded/dialog", "Aircraft/A320-family/AircraftConfig/psloaded.xml"); +var init_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/init/dialog", "Aircraft/A320-family/AircraftConfig/ac_init.xml"); +var help_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/help/dialog", "Aircraft/A320-family/AircraftConfig/help.xml"); +var fbw_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/fbw/dialog", "Aircraft/A320-family/AircraftConfig/fbw.xml"); +var fail_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/fail/dialog", "Aircraft/A320-family/AircraftConfig/fail.xml"); +var about_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/about/dialog", "Aircraft/A320-family/AircraftConfig/about.xml"); +var update_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/update/dialog", "Aircraft/A320-family/AircraftConfig/update.xml"); +var updated_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/updated/dialog", "Aircraft/A320-family/AircraftConfig/updated.xml"); +var error_mismatch = gui.Dialog.new("/sim/gui/dialogs/acconfig/error/mismatch/dialog", "Aircraft/A320-family/AircraftConfig/error-mismatch.xml"); +var fuel_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/fuel/dialog", "Aircraft/A320-family/AircraftConfig/fuel.xml"); +var groundservices_dlg = gui.Dialog.new("/sim/gui/dialogs/acconfig/groundsrvc/dialog", "Aircraft/A320-family/AircraftConfig/groundservices.xml"); +var du_quality = gui.Dialog.new("/sim/gui/dialogs/acconfig/du-quality/dialog", "Aircraft/A320-family/AircraftConfig/du-quality.xml"); +var rendering_dlg = gui.Dialog.new("/sim/gui/dialogs/rendering/dialog", "Aircraft/A320-family/AircraftConfig/rendering.xml"); spinning.start(); init_dlg.open(); -http.load("https://raw.githubusercontent.com/legoboyvdlp/A320-family/dev/revision.txt").done(func(r) setprop("systems/acconfig/new-revision", r.response)); -var revisionFile = (getprop("sim/aircraft-dir") ~ "/revision.txt"); +http.load("/https://raw.githubusercontent.com/legoboyvdlp/A320-family/dev/revision.txt").done(func(r) setprop("/systems/acconfig/new-revision", r.response)); +var revisionFile = (getprop("/sim/aircraft-dir") ~ "/revision.txt"); var current_revision = io.readfile(revisionFile); print("A320-family Revision: " ~ current_revision); -setprop("systems/acconfig/revision", current_revision); +setprop("/systems/acconfig/revision", current_revision); setlistener("/systems/acconfig/new-revision", func { - if (getprop("systems/acconfig/new-revision") > current_revision) { - setprop("systems/acconfig/out-of-date", 1); + if (getprop("/systems/acconfig/new-revision") > current_revision) { + setprop("/systems/acconfig/out-of-date", 1); } else { - setprop("systems/acconfig/out-of-date", 0); + setprop("/systems/acconfig/out-of-date", 0); } }); var mismatch_chk = func { - if (num(string.replace(getprop("sim/version/flightgear"),".","")) < 201920) { - setprop("systems/acconfig/mismatch-code", "0x121"); - setprop("systems/acconfig/mismatch-reason", "FGFS version is too old! Please update FlightGear to at least 2019.2.0."); - if (getprop("systems/acconfig/out-of-date") != 1) { + if (num(string.replace(getprop("/sim/version/flightgear"),".","")) < 201920) { + setprop("/systems/acconfig/mismatch-code", "0x121"); + setprop("/systems/acconfig/mismatch-reason", "FGFS version is too old! Please update FlightGear to at least 2019.2.0."); + if (getprop("/systems/acconfig/out-of-date") != 1) { error_mismatch.open(); } libraries.systemsLoop.stop(); print("Mismatch: 0x121"); welcome_dlg.close(); - } else if (getprop("gear/gear[0]/wow") == 0 or getprop("position/altitude-ft") >= 15000) { - setprop("systems/acconfig/mismatch-code", "0x223"); - setprop("systems/acconfig/mismatch-reason", "Preposterous configuration detected for initialization. Check your position or scenery."); - if (getprop("systems/acconfig/out-of-date") != 1) { + } else if (getprop("/gear/gear[0]/wow") == 0 or getprop("/position/altitude-ft") >= 15000) { + setprop("/systems/acconfig/mismatch-code", "0x223"); + setprop("/systems/acconfig/mismatch-reason", "Preposterous configuration detected for initialization. Check your position or scenery."); + if (getprop("/systems/acconfig/out-of-date") != 1) { error_mismatch.open(); } libraries.systemsLoop.stop(); print("Mismatch: 0x223"); welcome_dlg.close(); - } else if (getprop("systems/acconfig/libraries-loaded") != 1) { - setprop("systems/acconfig/mismatch-code", "0x247"); - setprop("systems/acconfig/mismatch-reason", "System files are missing or damaged. Please download a new copy of the aircraft."); - if (getprop("systems/acconfig/out-of-date") != 1) { + } else if (getprop("/systems/acconfig/libraries-loaded") != 1) { + setprop("/systems/acconfig/mismatch-code", "0x247"); + setprop("/systems/acconfig/mismatch-reason", "System files are missing or damaged. Please download a new copy of the aircraft."); + if (getprop("/systems/acconfig/out-of-date") != 1) { error_mismatch.open(); } libraries.systemsLoop.stop(); @@ -170,86 +170,86 @@ var mismatch_chk = func { setlistener("/sim/signals/fdm-initialized", func { init_dlg.close(); - if (getprop("systems/acconfig/out-of-date") == 1) { + if (getprop("/systems/acconfig/out-of-date") == 1) { update_dlg.open(); print("System: The A320-family is out of date!"); } mismatch_chk(); readSettings(); - if (getprop("systems/acconfig/out-of-date") != 1 and getprop("systems/acconfig/options/revision") < current_revision and getprop("systems/acconfig/mismatch-code") == "0x000") { + if (getprop("/systems/acconfig/out-of-date") != 1 and getprop("/systems/acconfig/options/revision") < current_revision and getprop("/systems/acconfig/mismatch-code") == "0x000") { updated_dlg.open(); - if (getprop("systems/acconfig/options/no-rendering-warn") != 1) { + if (getprop("/systems/acconfig/options/no-rendering-warn") != 1) { renderingSettings.check(); } - } else if (getprop("systems/acconfig/out-of-date") != 1 and getprop("systems/acconfig/mismatch-code") == "0x000" and getprop("systems/acconfig/options/welcome-skip") != 1) { + } else if (getprop("/systems/acconfig/out-of-date") != 1 and getprop("/systems/acconfig/mismatch-code") == "0x000" and getprop("/systems/acconfig/options/welcome-skip") != 1) { welcome_dlg.open(); - if (getprop("systems/acconfig/options/no-rendering-warn") != 1) { + if (getprop("/systems/acconfig/options/no-rendering-warn") != 1) { renderingSettings.check(); } } - setprop("systems/acconfig/options/revision", current_revision); + setprop("/systems/acconfig/options/revision", current_revision); writeSettings(); - if (getprop("options/system/save-state") == 1) + if (getprop("/options/system/save-state") == 1) { - save.restore(save.default, getprop("sim/fg-home") ~ "/Export/" ~ getprop("sim/aircraft") ~ "-save.xml"); + save.restore(save.default, getprop("/sim/fg-home") ~ "/Export/" ~ getprop("/sim/aircraft") ~ "-save.xml"); } spinning.stop(); }); setlistener("/sim/signals/exit", func { - save.save(save.default, getprop("sim/fg-home") ~ "/Export/" ~ getprop("sim/aircraft") ~ "-save.xml"); + save.save(save.default, getprop("/sim/fg-home") ~ "/Export/" ~ getprop("/sim/aircraft") ~ "-save.xml"); }); var renderingSettings = { check: func() { - var rembrandt = getprop("sim/rendering/rembrandt/enabled"); - var ALS = getprop("sim/rendering/shaders/skydome"); - var customSettings = getprop("sim/rendering/shaders/custom-settings") == 1; - var landmass = getprop("sim/rendering/shaders/landmass") >= 4; - var model = getprop("sim/rendering/shaders/model") >= 2; + var rembrandt = getprop("/sim/rendering/rembrandt/enabled"); + var ALS = getprop("/sim/rendering/shaders/skydome"); + var customSettings = getprop("/sim/rendering/shaders/custom-settings") == 1; + var landmass = getprop("/sim/rendering/shaders/landmass") >= 4; + var model = getprop("/sim/rendering/shaders/model") >= 2; if (!rembrandt and (!ALS or !customSettings or !landmass or !model)) { rendering_dlg.open(); } }, fixAll: func() { me.fixCore(); - var landmass = getprop("sim/rendering/shaders/landmass") >= 4; - var model = getprop("sim/rendering/shaders/model") >= 2; + var landmass = getprop("/sim/rendering/shaders/landmass") >= 4; + var model = getprop("/sim/rendering/shaders/model") >= 2; if (!landmass) { - setprop("sim/rendering/shaders/landmass", 4); + setprop("/sim/rendering/shaders/landmass", 4); } if (!model) { - setprop("sim/rendering/shaders/model", 2); + setprop("/sim/rendering/shaders/model", 2); } }, fixCore: func() { - setprop("sim/rendering/shaders/skydome", 1); # ALS on - setprop("sim/rendering/shaders/custom-settings", 1); - gui.popupTip("Rendering Settings updated!"); + setprop("/sim/rendering/shaders/skydome", 1); # ALS on + setprop("/sim/rendering/shaders/custom-settings", 1); + gui.popupTip("/Rendering Settings updated!"); }, }; var readSettings = func { - io.read_properties(getprop("sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options"); - setprop("options/system/keyboard-mode", getprop("systems/acconfig/options/keyboard-mode")); - setprop("options/system/weight-kgs", getprop("systems/acconfig/options/weight-kgs")); - setprop("options/system/save-state", getprop("systems/acconfig/options/save-state")); - setprop("controls/adirs/skip", getprop("systems/acconfig/options/adirs-skip")); - setprop("systems/apu/oil/allow-oil-consumption", getprop("systems/acconfig/options/allow-oil-consumption")); - setprop("sim/model/autopush/route/show", getprop("systems/acconfig/options/autopush/show-route")); - setprop("sim/model/autopush/route/show-wingtip", getprop("systems/acconfig/options/autopush/show-wingtip")); + io.read_properties(getprop("/sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options"); + setprop("/options/system/keyboard-mode", getprop("/systems/acconfig/options/keyboard-mode")); + setprop("/options/system/weight-kgs", getprop("/systems/acconfig/options/weight-kgs")); + setprop("/options/system/save-state", getprop("/systems/acconfig/options/save-state")); + setprop("/controls/adirs/skip", getprop("/systems/acconfig/options/adirs-skip")); + setprop("/systems/apu/oil/allow-oil-consumption", getprop("/systems/acconfig/options/allow-oil-consumption")); + setprop("/sim/model/autopush/route/show", getprop("/systems/acconfig/options/autopush/show-route")); + setprop("/sim/model/autopush/route/show-wingtip", getprop("/systems/acconfig/options/autopush/show-wingtip")); } var writeSettings = func { - setprop("systems/acconfig/options/keyboard-mode", getprop("options/system/keyboard-mode")); - setprop("systems/acconfig/options/weight-kgs", getprop("options/system/weight-kgs")); - setprop("systems/acconfig/options/save-state", getprop("options/system/save-state")); - setprop("systems/acconfig/options/adirs-skip", getprop("controls/adirs/skip")); - setprop("systems/acconfig/options/allow-oil-consumption", getprop("systems/apu/oil/allow-oil-consumption")); - setprop("systems/acconfig/options/autopush/show-route", getprop("sim/model/autopush/route/show")); - setprop("systems/acconfig/options/autopush/show-wingtip", getprop("sim/model/autopush/route/show-wingtip")); - io.write_properties(getprop("sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options"); + setprop("/systems/acconfig/options/keyboard-mode", getprop("/options/system/keyboard-mode")); + setprop("/systems/acconfig/options/weight-kgs", getprop("/options/system/weight-kgs")); + setprop("/systems/acconfig/options/save-state", getprop("/options/system/save-state")); + setprop("/systems/acconfig/options/adirs-skip", getprop("/controls/adirs/skip")); + setprop("/systems/acconfig/options/allow-oil-consumption", getprop("/systems/apu/oil/allow-oil-consumption")); + setprop("/systems/acconfig/options/autopush/show-route", getprop("/sim/model/autopush/route/show")); + setprop("/systems/acconfig/options/autopush/show-wingtip", getprop("/sim/model/autopush/route/show-wingtip")); + io.write_properties(getprop("/sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options"); } ################ @@ -258,47 +258,47 @@ var writeSettings = func { # Cold and Dark var colddark = func { - if (getprop("systems/acconfig/mismatch-code") == "0x000") { + if (getprop("/systems/acconfig/mismatch-code") == "0x000") { spinning.start(); ps_loaded_dlg.close(); ps_load_dlg.open(); - setprop("systems/acconfig/autoconfig-running", 1); - setprop("controls/gear/brake-left", 1); - setprop("controls/gear/brake-right", 1); + setprop("/systems/acconfig/autoconfig-running", 1); + setprop("/controls/gear/brake-left", 1); + setprop("/controls/gear/brake-right", 1); # Initial shutdown, and reinitialization. - setprop("controls/engines/engine-start-switch", 1); - setprop("controls/engines/engine[0]/cutoff-switch", 1); - setprop("controls/engines/engine[1]/cutoff-switch", 1); - setprop("controls/flight/slats", 0.000); - setprop("controls/flight/flaps", 0.000); - setprop("controls/flight/flap-lever", 0); - setprop("controls/flight/flap-pos", 0); - setprop("controls/flight/flap-txt", " "); + setprop("/controls/engines/engine-start-switch", 1); + setprop("/controls/engines/engine[0]/cutoff-switch", 1); + setprop("/controls/engines/engine[1]/cutoff-switch", 1); + setprop("/controls/flight/slats", 0.000); + setprop("/controls/flight/flaps", 0.000); + setprop("/controls/flight/flap-lever", 0); + setprop("/controls/flight/flap-pos", 0); + setprop("/controls/flight/flap-txt", " "); libraries.flaptimer.stop(); - setprop("controls/flight/speedbrake-arm", 0); - setprop("controls/flight/speedbrake", 0); - setprop("controls/gear/gear-down", 1); - setprop("controls/flight/elevator-trim", 0); - setprop("controls/switches/beacon", 0); - setprop("controls/switches/strobe", 0.0); - setprop("controls/switches/wing-lights", 0); - setprop("controls/lighting/nav-lights-switch", 0); - setprop("controls/lighting/turnoff-light-switch", 0); - setprop("controls/lighting/taxi-light-switch", 0.0); - setprop("controls/switches/landing-lights-l", 0.0); - setprop("controls/switches/landing-lights-r", 0.0); - setprop("controls/atc/mode-knob", 0); - setprop("controls/lighting/fcu-panel-knb", 0); - setprop("controls/lighting/main-panel-knb", 0); - setprop("controls/lighting/overhead-panel-knb", 0); + setprop("/controls/flight/speedbrake-arm", 0); + setprop("/controls/flight/speedbrake", 0); + setprop("/controls/gear/gear-down", 1); + setprop("/controls/flight/elevator-trim", 0); + setprop("/controls/switches/beacon", 0); + setprop("/controls/switches/strobe", 0.0); + setprop("/controls/switches/wing-lights", 0); + setprop("/controls/lighting/nav-lights-switch", 0); + setprop("/controls/lighting/turnoff-light-switch", 0); + setprop("/controls/lighting/taxi-light-switch", 0.0); + setprop("/controls/switches/landing-lights-l", 0.0); + setprop("/controls/switches/landing-lights-r", 0.0); + setprop("/controls/atc/mode-knob", 0); + setprop("/controls/lighting/fcu-panel-knb", 0); + setprop("/controls/lighting/main-panel-knb", 0); + setprop("/controls/lighting/overhead-panel-knb", 0); atc.transponderPanel.modeSwitch(1); libraries.systemsInit(); failResetOld(); - if (getprop("engines/engine[1]/n2-actual") < 2) { + if (getprop("/engines/engine[1]/n2-actual") < 2) { colddark_b(); } else { var colddark_eng_off = setlistener("/engines/engine[1]/n2-actual", func { - if (getprop("engines/engine[1]/n2-actual") < 2) { + if (getprop("/engines/engine[1]/n2-actual") < 2) { removelistener(colddark_eng_off); colddark_b(); } @@ -308,11 +308,11 @@ var colddark = func { } var colddark_b = func { # Continues the Cold and Dark script, after engines fully shutdown. - setprop("controls/apu/master", 0); + setprop("/controls/apu/master", 0); settimer(func { - setprop("controls/gear/brake-left", 0); - setprop("controls/gear/brake-right", 0); - setprop("systems/acconfig/autoconfig-running", 0); + setprop("/controls/gear/brake-left", 0); + setprop("/controls/gear/brake-right", 0); + setprop("/systems/acconfig/autoconfig-running", 0); ps_load_dlg.close(); ps_loaded_dlg.open(); spinning.stop(); @@ -321,40 +321,40 @@ var colddark_b = func { # Ready to Start Eng var beforestart = func { - if (getprop("systems/acconfig/mismatch-code") == "0x000") { + if (getprop("/systems/acconfig/mismatch-code") == "0x000") { spinning.start(); ps_loaded_dlg.close(); ps_load_dlg.open(); - setprop("systems/acconfig/autoconfig-running", 1); - setprop("controls/gear/brake-left", 1); - setprop("controls/gear/brake-right", 1); + setprop("/systems/acconfig/autoconfig-running", 1); + setprop("/controls/gear/brake-left", 1); + setprop("/controls/gear/brake-right", 1); # First, we set everything to cold and dark. - setprop("controls/engines/engine-start-switch", 1); - setprop("controls/engines/engine[0]/cutoff-switch", 1); - setprop("controls/engines/engine[1]/cutoff-switch", 1); - setprop("controls/flight/slats", 0.000); - setprop("controls/flight/flaps", 0.000); - setprop("controls/flight/flap-lever", 0); - setprop("controls/flight/flap-pos", 0); - setprop("controls/flight/flap-txt", " "); + setprop("/controls/engines/engine-start-switch", 1); + setprop("/controls/engines/engine[0]/cutoff-switch", 1); + setprop("/controls/engines/engine[1]/cutoff-switch", 1); + setprop("/controls/flight/slats", 0.000); + setprop("/controls/flight/flaps", 0.000); + setprop("/controls/flight/flap-lever", 0); + setprop("/controls/flight/flap-pos", 0); + setprop("/controls/flight/flap-txt", " "); libraries.flaptimer.stop(); - setprop("controls/flight/speedbrake-arm", 0); - setprop("controls/flight/speedbrake", 0); - setprop("controls/gear/gear-down", 1); - setprop("controls/flight/elevator-trim", 0); + setprop("/controls/flight/speedbrake-arm", 0); + setprop("/controls/flight/speedbrake", 0); + setprop("/controls/gear/gear-down", 1); + setprop("/controls/flight/elevator-trim", 0); libraries.systemsInit(); failResetOld(); # Now the Startup! - props.globals.getNode("controls/electrical/switches/bat-1").setValue(1); - props.globals.getNode("controls/electrical/switches/bat-2").setValue(1); - setprop("controls/apu/master", 1); + props.globals.getNode("/controls/electrical/switches/bat-1").setValue(1); + props.globals.getNode("/controls/electrical/switches/bat-2").setValue(1); + setprop("/controls/apu/master", 1); settimer(func() { systems.APUController.APU.powerOn(); # guarantee it always works systems.APUController.APU.startCommand(1); }, 0.1); var apu_rpm_chk = setlistener("/engines/engine[2]/n1", func { - if (getprop("engines/engine[2]/n1") >= 98) { + if (getprop("/engines/engine[2]/n1") >= 98) { removelistener(apu_rpm_chk); beforestart_b(); } @@ -369,21 +369,21 @@ var beforestart_b = func { systems.FUEL.Switches.pumpCenter2.setValue(1); systems.FUEL.Switches.pumpRight1.setValue(1); systems.FUEL.Switches.pumpRight2.setValue(1); - setprop("controls/lighting/fcu-panel-knb", 1); - setprop("controls/lighting/main-panel-knb", 1); - setprop("controls/lighting/overhead-panel-knb", 1); - setprop("controls/electrical/switches/apu", 1); - setprop("controls/electrical/switches/galley", 1); - setprop("controls/electrical/switches/gen-1", 1); - setprop("controls/electrical/switches/gen-2", 1); - setprop("controls/pneumatic/switches/bleedapu", 1); - setprop("controls/pneumatic/switches/bleed1", 1); - setprop("controls/pneumatic/switches/bleed2", 1); - setprop("controls/pneumatic/switches/pack1", 1); - setprop("controls/pneumatic/switches/pack2", 1); - setprop("controls/adirs/ir[0]/knob","1"); - setprop("controls/adirs/ir[1]/knob","1"); - setprop("controls/adirs/ir[2]/knob","1"); + setprop("/controls/lighting/fcu-panel-knb", 1); + setprop("/controls/lighting/main-panel-knb", 1); + setprop("/controls/lighting/overhead-panel-knb", 1); + setprop("/controls/electrical/switches/apu", 1); + setprop("/controls/electrical/switches/galley", 1); + setprop("/controls/electrical/switches/gen-1", 1); + setprop("/controls/electrical/switches/gen-2", 1); + setprop("/controls/pneumatic/switches/bleedapu", 1); + setprop("/controls/pneumatic/switches/bleed1", 1); + setprop("/controls/pneumatic/switches/bleed2", 1); + setprop("/controls/pneumatic/switches/pack1", 1); + setprop("/controls/pneumatic/switches/pack2", 1); + setprop("/controls/adirs/ir[0]/knob","1"); + setprop("/controls/adirs/ir[1]/knob","1"); + setprop("/controls/adirs/ir[2]/knob","1"); if (systems.ADIRSnew.Switches.adrSw[0].getValue() != 1) { systems.ADIRSControlPanel.adrSw(0); } if (systems.ADIRSnew.Switches.adrSw[1].getValue() != 1) { systems.ADIRSControlPanel.adrSw(1); } if (systems.ADIRSnew.Switches.adrSw[2].getValue() != 1) { systems.ADIRSControlPanel.adrSw(2); } @@ -393,18 +393,18 @@ var beforestart_b = func { systems.ADIRSnew.ADIRunits[0].instAlign(); systems.ADIRSnew.ADIRunits[1].instAlign(); systems.ADIRSnew.ADIRunits[2].instAlign(); - setprop("controls/adirs/mcducbtn", 1); - setprop("controls/switches/beacon", 1); - setprop("controls/lighting/nav-lights-switch", 1); - setprop("controls/radio/rmp[0]/on", 1); - setprop("controls/radio/rmp[1]/on", 1); - setprop("controls/radio/rmp[2]/on", 1); - setprop("systems/fadec/power-avail", 1); - setprop("systems/fadec/powered-time", -310); + setprop("/controls/adirs/mcducbtn", 1); + setprop("/controls/switches/beacon", 1); + setprop("/controls/lighting/nav-lights-switch", 1); + setprop("/controls/radio/rmp[0]/on", 1); + setprop("/controls/radio/rmp[1]/on", 1); + setprop("/controls/radio/rmp[2]/on", 1); + setprop("/systems/fadec/power-avail", 1); + setprop("/systems/fadec/powered-time", -310); settimer(func { - setprop("controls/gear/brake-left", 0); - setprop("controls/gear/brake-right", 0); - setprop("systems/acconfig/autoconfig-running", 0); + setprop("/controls/gear/brake-left", 0); + setprop("/controls/gear/brake-right", 0); + setprop("/systems/acconfig/autoconfig-running", 0); ps_load_dlg.close(); ps_loaded_dlg.open(); spinning.stop(); @@ -413,40 +413,40 @@ var beforestart_b = func { # Ready to Taxi var taxi = func { - if (getprop("systems/acconfig/mismatch-code") == "0x000") { + if (getprop("/systems/acconfig/mismatch-code") == "0x000") { spinning.start(); ps_loaded_dlg.close(); ps_load_dlg.open(); - setprop("systems/acconfig/autoconfig-running", 1); - setprop("controls/gear/brake-left", 1); - setprop("controls/gear/brake-right", 1); + setprop("/systems/acconfig/autoconfig-running", 1); + setprop("/controls/gear/brake-left", 1); + setprop("/controls/gear/brake-right", 1); # First, we set everything to cold and dark. - setprop("controls/engines/engine-start-switch", 1); - setprop("controls/engines/engine[0]/cutoff-switch", 1); - setprop("controls/engines/engine[1]/cutoff-switch", 1); - setprop("controls/flight/slats", 0.000); - setprop("controls/flight/flaps", 0.000); - setprop("controls/flight/flap-lever", 0); - setprop("controls/flight/flap-pos", 0); - setprop("controls/flight/flap-txt", " "); + setprop("/controls/engines/engine-start-switch", 1); + setprop("/controls/engines/engine[0]/cutoff-switch", 1); + setprop("/controls/engines/engine[1]/cutoff-switch", 1); + setprop("/controls/flight/slats", 0.000); + setprop("/controls/flight/flaps", 0.000); + setprop("/controls/flight/flap-lever", 0); + setprop("/controls/flight/flap-pos", 0); + setprop("/controls/flight/flap-txt", " "); libraries.flaptimer.stop(); - setprop("controls/flight/speedbrake-arm", 0); - setprop("controls/flight/speedbrake", 0); - setprop("controls/gear/gear-down", 1); - setprop("controls/flight/elevator-trim", 0); + setprop("/controls/flight/speedbrake-arm", 0); + setprop("/controls/flight/speedbrake", 0); + setprop("/controls/gear/gear-down", 1); + setprop("/controls/flight/elevator-trim", 0); libraries.systemsInit(); failResetOld(); # Now the Startup! - props.globals.getNode("controls/electrical/switches/bat-1").setValue(1); - props.globals.getNode("controls/electrical/switches/bat-2").setValue(1); - setprop("controls/apu/master", 1); + props.globals.getNode("/controls/electrical/switches/bat-1").setValue(1); + props.globals.getNode("/controls/electrical/switches/bat-2").setValue(1); + setprop("/controls/apu/master", 1); settimer(func() { systems.APUController.APU.powerOn(); # guarantee it always works systems.APUController.APU.startCommand(1); }, 0.1); var apu_rpm_chk = setlistener("/engines/engine[2]/n1", func { - if (getprop("engines/engine[2]/n1") >= 98) { + if (getprop("/engines/engine[2]/n1") >= 98) { removelistener(apu_rpm_chk); taxi_b(); } @@ -461,21 +461,21 @@ var taxi_b = func { systems.FUEL.Switches.pumpCenter2.setValue(1); systems.FUEL.Switches.pumpRight1.setValue(1); systems.FUEL.Switches.pumpRight2.setValue(1); - setprop("controls/lighting/fcu-panel-knb", 1); - setprop("controls/lighting/main-panel-knb", 1); - setprop("controls/lighting/overhead-panel-knb", 1); - setprop("controls/electrical/switches/apu", 1); - setprop("controls/electrical/switches/galley", 1); - setprop("controls/electrical/switches/gen-1", 1); - setprop("controls/electrical/switches/gen-2", 1); - setprop("controls/pneumatic/switches/bleedapu", 1); - setprop("controls/pneumatic/switches/bleed1", 1); - setprop("controls/pneumatic/switches/bleed2", 1); - setprop("controls/pneumatic/switches/pack1", 1); - setprop("controls/pneumatic/switches/pack2", 1); - setprop("controls/adirs/ir[0]/knob","1"); - setprop("controls/adirs/ir[1]/knob","1"); - setprop("controls/adirs/ir[2]/knob","1"); + setprop("/controls/lighting/fcu-panel-knb", 1); + setprop("/controls/lighting/main-panel-knb", 1); + setprop("/controls/lighting/overhead-panel-knb", 1); + setprop("/controls/electrical/switches/apu", 1); + setprop("/controls/electrical/switches/galley", 1); + setprop("/controls/electrical/switches/gen-1", 1); + setprop("/controls/electrical/switches/gen-2", 1); + setprop("/controls/pneumatic/switches/bleedapu", 1); + setprop("/controls/pneumatic/switches/bleed1", 1); + setprop("/controls/pneumatic/switches/bleed2", 1); + setprop("/controls/pneumatic/switches/pack1", 1); + setprop("/controls/pneumatic/switches/pack2", 1); + setprop("/controls/adirs/ir[0]/knob","1"); + setprop("/controls/adirs/ir[1]/knob","1"); + setprop("/controls/adirs/ir[2]/knob","1"); if (systems.ADIRSnew.Switches.adrSw[0].getValue() != 1) { systems.ADIRSControlPanel.adrSw(0); } if (systems.ADIRSnew.Switches.adrSw[1].getValue() != 1) { systems.ADIRSControlPanel.adrSw(1); } if (systems.ADIRSnew.Switches.adrSw[2].getValue() != 1) { systems.ADIRSControlPanel.adrSw(2); } @@ -485,40 +485,43 @@ var taxi_b = func { systems.ADIRSnew.ADIRunits[0].instAlign(); systems.ADIRSnew.ADIRunits[1].instAlign(); systems.ADIRSnew.ADIRunits[2].instAlign(); - setprop("controls/adirs/mcducbtn", 1); - setprop("controls/switches/beacon", 1); - setprop("controls/switches/wing-lights", 1); - setprop("controls/lighting/nav-lights-switch", 1); - setprop("controls/radio/rmp[0]/on", 1); - setprop("controls/radio/rmp[1]/on", 1); - setprop("controls/radio/rmp[2]/on", 1); - setprop("controls/atc/mode-knob", 2); + setprop("/controls/adirs/mcducbtn", 1); + setprop("/controls/switches/beacon", 1); + setprop("/controls/switches/wing-lights", 1); + setprop("/controls/lighting/nav-lights-switch", 1); + setprop("/controls/radio/rmp[0]/on", 1); + setprop("/controls/radio/rmp[1]/on", 1); + setprop("/controls/radio/rmp[2]/on", 1); + setprop("/controls/atc/mode-knob", 2); atc.transponderPanel.modeSwitch(3); - setprop("systems/fadec/power-avail", 1); - setprop("systems/fadec/powered-time", -310); - setprop("controls/lighting/turnoff-light-switch", 1); - setprop("controls/lighting/taxi-light-switch", 0.5); - setprop("controls/switches/landing-lights-l", 0.5); - setprop("controls/switches/landing-lights-r", 0.5); - setprop("instrumentation/altimeter[0]/setting-inhg", getprop("environment/pressure-sea-level-inhg")); + setprop("/systems/fadec/power-avail", 1); + setprop("/systems/fadec/powered-time", -310); + setprop("/controls/lighting/turnoff-light-switch", 1); + setprop("/controls/lighting/taxi-light-switch", 0.5); + setprop("/controls/switches/landing-lights-l", 0.5); + setprop("/controls/switches/landing-lights-r", 0.5); + if (pts.Instrumentation.Altimeter.std.getBoolValue()) { + libraries.toggleSTD(); + } + setprop("/instrumentation/altimeter[0]/setting-inhg", getprop("/environment/pressure-sea-level-inhg")); settimer(taxi_c, 2); } var taxi_c = func { - setprop("controls/engines/engine-start-switch", 2); - setprop("controls/engines/engine[0]/cutoff-switch", 0); - setprop("controls/engines/engine[1]/cutoff-switch", 0); + setprop("/controls/engines/engine-start-switch", 2); + setprop("/controls/engines/engine[0]/cutoff-switch", 0); + setprop("/controls/engines/engine[1]/cutoff-switch", 0); settimer(func { taxi_d(); }, 10); } var taxi_d = func { # After Start items. - setprop("controls/engines/engine-start-switch", 1); - setprop("controls/apu/master", 0); - setprop("controls/pneumatic/switches/bleedapu", 0); - setprop("controls/gear/brake-left", 0); - setprop("controls/gear/brake-right", 0); - setprop("systems/acconfig/autoconfig-running", 0); + setprop("/controls/engines/engine-start-switch", 1); + setprop("/controls/apu/master", 0); + setprop("/controls/pneumatic/switches/bleedapu", 0); + setprop("/controls/gear/brake-left", 0); + setprop("/controls/gear/brake-right", 0); + setprop("/systems/acconfig/autoconfig-running", 0); ps_load_dlg.close(); ps_loaded_dlg.open(); spinning.stop(); @@ -526,30 +529,30 @@ var taxi_d = func { # Ready to Takeoff var takeoff = func { - if (getprop("systems/acconfig/mismatch-code") == "0x000") { + if (getprop("/systems/acconfig/mismatch-code") == "0x000") { # The same as taxi, except we set some things afterwards. taxi(); var eng_one_chk_c = setlistener("/engines/engine[0]/state", func { - if (getprop("engines/engine[0]/state") == 3) { + if (getprop("/engines/engine[0]/state") == 3) { removelistener(eng_one_chk_c); - setprop("controls/switches/strobe", 1.0); - setprop("controls/lighting/taxi-light-switch", 1); - setprop("controls/switches/landing-lights-l", 1); - setprop("controls/switches/landing-lights-r", 1); - setprop("controls/flight/speedbrake-arm", 1); - setprop("controls/flight/flaps", 0.290); - setprop("controls/flight/slats", 0.666); - setprop("controls/flight/flap-lever", 1); - setprop("controls/flight/flap-pos", 2); - setprop("controls/flight/flap-txt", "1+F"); - setprop("controls/atc/mode-knob", 4); + setprop("/controls/switches/strobe", 1.0); + setprop("/controls/lighting/taxi-light-switch", 1); + setprop("/controls/switches/landing-lights-l", 1); + setprop("/controls/switches/landing-lights-r", 1); + setprop("/controls/flight/speedbrake-arm", 1); + setprop("/controls/flight/flaps", 0.290); + setprop("/controls/flight/slats", 0.666); + setprop("/controls/flight/flap-lever", 1); + setprop("/controls/flight/flap-pos", 2); + setprop("/controls/flight/flap-txt", "1+F"); + setprop("/controls/atc/mode-knob", 4); atc.transponderPanel.modeSwitch(5); libraries.flaptimer.start(); - setprop("controls/flight/elevator-trim", -0.07); + setprop("/controls/flight/elevator-trim", -0.07); systems.arm_autobrake(3); - setprop("ECAM/to-config-test", 1); + setprop("/ECAM/to-config-test", 1); settimer(func { - setprop("ECAM/to-config-test", 0); + setprop("/ECAM/to-config-test", 0); }, 1); } }); diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index a3f78a6a..7f7cc93f 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -2048,11 +2048,11 @@ - modes/altimeter/inhg + instrumentation/altimeter/inhg 1 - modes/altimeter/std + instrumentation/altimeter/std 0 @@ -2070,11 +2070,11 @@ - modes/altimeter/inhg + instrumentation/altimeter/inhg 0 - modes/altimeter/std + instrumentation/altimeter/std 0 @@ -2104,11 +2104,11 @@ - modes/altimeter/inhg + instrumentation/altimeter/inhg 1 - modes/altimeter/std + instrumentation/altimeter/std 0 @@ -2126,11 +2126,11 @@ - modes/altimeter/inhg + instrumentation/altimeter/inhg 0 - modes/altimeter/std + instrumentation/altimeter/std 0 @@ -2163,7 +2163,7 @@ true property-cycle - modes/altimeter/inhg + instrumentation/altimeter/inhg 0 1 @@ -2193,7 +2193,7 @@ rotate qnh_cpt_sw - modes/altimeter/inhg + instrumentation/altimeter/inhg 040 1-3 @@ -2206,7 +2206,7 @@ rotate qnh_fo_sw - modes/altimeter/inhg + instrumentation/altimeter/inhg 040 1-3 @@ -2434,11 +2434,11 @@ 1 - modes/altimeter/inhg + instrumentation/altimeter/inhg 1 - modes/altimeter/std + instrumentation/altimeter/std 0 @@ -2455,11 +2455,11 @@ 1 - modes/altimeter/inhg + instrumentation/altimeter/inhg 0 - modes/altimeter/std + instrumentation/altimeter/std 0 @@ -2476,7 +2476,7 @@ 1 - modes/altimeter/std + instrumentation/altimeter/std 1 diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas index d6f3455c..eb3d4729 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -14,24 +14,24 @@ var mach_act = 0; # props.nas nodes var iesi_init = props.globals.initNode("/instrumentation/iesi/iesi-init", 0, "BOOL"); var iesi_time = props.globals.initNode("/instrumentation/iesi/iesi-init-time", 0.0, "DOUBLE"); -var iesi_rate = props.globals.getNode("systems/acconfig/options/iesi-rate"); -var et = props.globals.getNode("sim/time/elapsed-sec"); -var aconfig = props.globals.getNode("systems/acconfig/autoconfig-running"); +var iesi_rate = props.globals.getNode("/systems/acconfig/options/iesi-rate", 1); +var et = props.globals.getNode("/sim/time/elapsed-sec", 1); +var aconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1); var dcess = 0; var dchot1 = 0; -var airspeed = props.globals.getNode("instrumentation/airspeed-indicator/indicated-speed-kt"); -var mach = props.globals.getNode("instrumentation/airspeed-indicator/indicated-mach"); -var pitch = props.globals.getNode("orientation/pitch-deg"); -var roll = props.globals.getNode("orientation/roll-deg"); -var skid = props.globals.getNode("instrumentation/slip-skid-ball/indicated-slip-skid"); -var altitude = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft"); -var altitude_ind = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft-pfd"); +var airspeed = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1); +var mach = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1); +var pitch = props.globals.getNode("/orientation/pitch-deg", 1); +var roll = props.globals.getNode("/orientation/roll-deg", 1); +var skid = props.globals.getNode("/instrumentation/slip-skid-ball/indicated-slip-skid", 1); +var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1); +var altitude_ind = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft-pfd", 1); -var altimeter_mode = props.globals.getNode("modes/altimeter/std"); -var qnh_hpa = props.globals.getNode("instrumentation/altimeter/setting-hpa"); -var qnh_inhg = props.globals.getNode("instrumentation/altimeter/setting-inhg"); +var altimeter_mode = props.globals.getNode("/modes/altimeter/std", 1); +var qnh_hpa = props.globals.getNode("/instrumentation/altimeter/setting-hpa", 1); +var qnh_inhg = props.globals.getNode("/instrumentation/altimeter/setting-inhg", 1); var canvas_IESI_base = { init: func(canvas_group, file) { diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index 648f27fb..482e1af2 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -18,7 +18,7 @@ var lowerECAM_wheel = nil; var lowerECAM_test = nil; var lowerECAM_display = nil; var page = "fctl"; -var oat = getprop("environment/temperature-degc"); +var oat = getprop("/environment/temperature-degc"); var blue_psi = 0; var green_psi = 0; var yellow_psi = 0; @@ -42,217 +42,217 @@ var essTrvolts = 0; LBS2KGS = 0.4535924; # Fetch Nodes -var acconfig_weight_kgs = props.globals.getNode("systems/acconfig/options/weight-kgs", 1); -var elapsed_sec = props.globals.getNode("sim/time/elapsed-sec", 1); -var ac2 = props.globals.getNode("systems/electrical/bus/ac-2", 1); -var autoconfig_running = props.globals.getNode("systems/acconfig/autoconfig-running", 1); -var ac1_src = props.globals.getNode("systems/electrical/ac1-src", 1); -var ac2_src = props.globals.getNode("systems/electrical/ac2-src", 1); -var lighting_du4 = props.globals.getNode("controls/lighting/DU/du4", 1); -var ecam_page = props.globals.getNode("ECAM/Lower/page", 1); -var hour = props.globals.getNode("sim/time/utc/hour", 1); -var minute = props.globals.getNode("sim/time/utc/minute", 1); -var apu_flap = props.globals.getNode("controls/apu/inlet-flap/position-norm", 1); -var apu_rpm = props.globals.getNode("engines/engine[2]/n1", 1); -var apu_egt = props.globals.getNode("systems/apu/egt-degC", 1); -var door_left = props.globals.getNode("ECAM/Lower/door-left", 1); -var door_right = props.globals.getNode("ECAM/Lower/door-right", 1); -var door_nose_left = props.globals.getNode("ECAM/Lower/door-nose-left", 1); -var door_nose_right = props.globals.getNode("ECAM/Lower/door-nose-right", 1); -var apu_rpm_rot = props.globals.getNode("ECAM/Lower/APU-N", 1); -var apu_egt_rot = props.globals.getNode("ECAM/Lower/APU-EGT", 1); -var oil_qt1 = props.globals.getNode("ECAM/Lower/Oil-QT[0]", 1); -var oil_qt2 = props.globals.getNode("ECAM/Lower/Oil-QT[1]", 1); -var oil_psi1 = props.globals.getNode("ECAM/Lower/Oil-PSI[0]", 1); -var oil_psi2 = props.globals.getNode("ECAM/Lower/Oil-PSI[1]", 1); -var bleedapu = props.globals.getNode("systems/pneumatic/bleedapu", 1); -var oil_psi_actual1 = props.globals.getNode("engines/engine[0]/oil-psi-actual", 1); -var oil_psi_actual2 = props.globals.getNode("engines/engine[1]/oil-psi-actual", 1); -var aileron_ind_left = props.globals.getNode("ECAM/Lower/aileron-ind-left", 1); -var aileron_ind_right = props.globals.getNode("ECAM/Lower/aileron-ind-right", 1); -var elevator_ind_left = props.globals.getNode("ECAM/Lower/elevator-ind-left", 1); -var elevator_ind_right = props.globals.getNode("ECAM/Lower/elevator-ind-right", 1); -var elevator_trim_deg = props.globals.getNode("ECAM/Lower/elevator-trim-deg", 1); -var final_deg = props.globals.getNode("fdm/jsbsim/hydraulics/rudder/final-deg", 1); -var temperature_degc = props.globals.getNode("environment/temperature-degc", 1); -var gw = props.globals.getNode("FMGC/internal/gw", 1); -var tank3_content_lbs = props.globals.getNode("fdm/jsbsim/propulsion/tank[2]/contents-lbs", 1); -var apu_master = props.globals.getNode("controls/apu/master", 1); -var ir2_knob = props.globals.getNode("controls/adirs/ir[1]/knob", 1); -var switch_bleedapu = props.globals.getNode("controls/pneumatic/switches/bleedapu", 1); -var pneumatic_xbleed_state = props.globals.getNode("systems/pneumatic/xbleed-state", 1); -var xbleed = props.globals.getNode("systems/pneumatic/xbleed", 1); -var hp_valve1_state = props.globals.getNode("systems/pneumatic/hp-valve-1-state", 1); -var hp_valve2_state = props.globals.getNode("systems/pneumatic/hp-valve-2-state", 1); -var hp_valve1 = props.globals.getNode("systems/pneumatic/hp-valve-1", 1); -var hp_valve2 = props.globals.getNode("systems/pneumatic/hp-valve-2", 1); -var eng_valve1_state = props.globals.getNode("systems/pneumatic/eng-valve-1-state", 1); -var eng_valve2_state = props.globals.getNode("systems/pneumatic/eng-valve-2-state", 1); -var eng_valve1 = props.globals.getNode("systems/pneumatic/eng-valve-1", 1); -var eng_valve2 = props.globals.getNode("systems/pneumatic/eng-valve-2", 1); -var precooler1_psi = props.globals.getNode("systems/pneumatic/precooler-1-psi", 1); -var precooler2_psi = props.globals.getNode("systems/pneumatic/precooler-2-psi", 1); -var precooler1_temp = props.globals.getNode("systems/pneumatic/precooler-1-temp", 1); -var precooler2_temp = props.globals.getNode("systems/pneumatic/precooler-2-temp", 1); -var precooler1_ovht = props.globals.getNode("systems/pneumatic/precooler-1-ovht", 1); -var precooler2_ovht = props.globals.getNode("systems/pneumatic/precooler-2-ovht", 1); -var gs_kt = props.globals.getNode("velocities/groundspeed-kt", 1); -var switch_wing_aice = props.globals.getNode("controls/switches/wing", 1); -var deice_wing = props.globals.getNode("controls/deice/wing", 1); -var eng1_n2_actual = props.globals.getNode("engines/engine[0]/n2-actual", 1); -var eng2_n2_actual = props.globals.getNode("engines/engine[1]/n2-actual", 1); -var pack1_out_temp = props.globals.getNode("systems/pressurization/pack-1-out-temp", 1); -var pack2_out_temp = props.globals.getNode("systems/pressurization/pack-2-out-temp", 1); -var pack1_comp_out_temp = props.globals.getNode("systems/pressurization/pack-1-comp-out-temp", 1); -var pack2_comp_out_temp = props.globals.getNode("systems/pressurization/pack-2-comp-out-temp", 1); -var pack1_bypass = props.globals.getNode("systems/pressurization/pack-1-bypass", 1); -var pack2_bypass = props.globals.getNode("systems/pressurization/pack-2-bypass", 1); -var pack1_flow = props.globals.getNode("systems/pressurization/pack-1-flow", 1); -var pack2_flow = props.globals.getNode("systems/pressurization/pack-2-flow", 1); -var pack1_valve = props.globals.getNode("systems/pressurization/pack-1-valve", 1); -var pack2_valve = props.globals.getNode("systems/pressurization/pack-2-valve", 1); -var switch_pack1 = props.globals.getNode("controls/pneumatic/switches/pack1", 1); -var switch_pack2 = props.globals.getNode("controls/pneumatic/switches/pack2", 1); -var oil_qt1_actual = props.globals.getNode("engines/engine[0]/oil-qt-actual", 1); -var oil_qt2_actual = props.globals.getNode("engines/engine[1]/oil-qt-actual", 1); -var fuel_used_lbs1 = props.globals.getNode("systems/fuel/fuel-used-1", 1); -var fuel_used_lbs2 = props.globals.getNode("systems/fuel/fuel-used-2", 1); -var doorL1_pos = props.globals.getNode("sim/model/door-positions/doorl1/position-norm", 1); -var doorR1_pos = props.globals.getNode("sim/model/door-positions/doorr1/position-norm", 1); -var doorL4_pos = props.globals.getNode("sim/model/door-positions/doorl4/position-norm", 1); -var doorR4_pos = props.globals.getNode("sim/model/door-positions/doorr4/position-norm", 1); -var cargobulk_pos = props.globals.getNode("sim/model/door-positions/cargobulk/position-norm", 1); -var cargofwd_pos = props.globals.getNode("sim/model/door-positions/cargofwd/position-norm", 1); -var cargoaft_pos = props.globals.getNode("sim/model/door-positions/cargoaft/position-norm", 1); +var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1); +var elapsed_sec = props.globals.getNode("/sim/time/elapsed-sec", 1); +var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1); +var autoconfig_running = props.globals.getNode("/systems/acconfig/autoconfig-running", 1); +var ac1_src = props.globals.getNode("/systems/electrical/ac1-src", 1); +var ac2_src = props.globals.getNode("/systems/electrical/ac2-src", 1); +var lighting_du4 = props.globals.getNode("/controls/lighting/DU/du4", 1); +var ecam_page = props.globals.getNode("/ECAM/Lower/page", 1); +var hour = props.globals.getNode("/sim/time/utc/hour", 1); +var minute = props.globals.getNode("/sim/time/utc/minute", 1); +var apu_flap = props.globals.getNode("/controls/apu/inlet-flap/position-norm", 1); +var apu_rpm = props.globals.getNode("/engines/engine[2]/n1", 1); +var apu_egt = props.globals.getNode("/systems/apu/egt-degC", 1); +var door_left = props.globals.getNode("/ECAM/Lower/door-left", 1); +var door_right = props.globals.getNode("/ECAM/Lower/door-right", 1); +var door_nose_left = props.globals.getNode("/ECAM/Lower/door-nose-left", 1); +var door_nose_right = props.globals.getNode("/ECAM/Lower/door-nose-right", 1); +var apu_rpm_rot = props.globals.getNode("/ECAM/Lower/APU-N", 1); +var apu_egt_rot = props.globals.getNode("/ECAM/Lower/APU-EGT", 1); +var oil_qt1 = props.globals.getNode("/ECAM/Lower/Oil-QT[0]", 1); +var oil_qt2 = props.globals.getNode("/ECAM/Lower/Oil-QT[1]", 1); +var oil_psi1 = props.globals.getNode("/ECAM/Lower/Oil-PSI[0]", 1); +var oil_psi2 = props.globals.getNode("/ECAM/Lower/Oil-PSI[1]", 1); +var bleedapu = props.globals.getNode("/systems/pneumatic/bleedapu", 1); +var oil_psi_actual1 = props.globals.getNode("/engines/engine[0]/oil-psi-actual", 1); +var oil_psi_actual2 = props.globals.getNode("/engines/engine[1]/oil-psi-actual", 1); +var aileron_ind_left = props.globals.getNode("/ECAM/Lower/aileron-ind-left", 1); +var aileron_ind_right = props.globals.getNode("/ECAM/Lower/aileron-ind-right", 1); +var elevator_ind_left = props.globals.getNode("/ECAM/Lower/elevator-ind-left", 1); +var elevator_ind_right = props.globals.getNode("/ECAM/Lower/elevator-ind-right", 1); +var elevator_trim_deg = props.globals.getNode("/ECAM/Lower/elevator-trim-deg", 1); +var final_deg = props.globals.getNode("/fdm/jsbsim/hydraulics/rudder/final-deg", 1); +var temperature_degc = props.globals.getNode("/environment/temperature-degc", 1); +var gw = props.globals.getNode("/FMGC/internal/gw", 1); +var tank3_content_lbs = props.globals.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs", 1); +var apu_master = props.globals.getNode("/controls/apu/master", 1); +var ir2_knob = props.globals.getNode("/controls/adirs/ir[1]/knob", 1); +var switch_bleedapu = props.globals.getNode("/controls/pneumatic/switches/bleedapu", 1); +var pneumatic_xbleed_state = props.globals.getNode("/systems/pneumatic/xbleed-state", 1); +var xbleed = props.globals.getNode("/systems/pneumatic/xbleed", 1); +var hp_valve1_state = props.globals.getNode("/systems/pneumatic/hp-valve-1-state", 1); +var hp_valve2_state = props.globals.getNode("/systems/pneumatic/hp-valve-2-state", 1); +var hp_valve1 = props.globals.getNode("/systems/pneumatic/hp-valve-1", 1); +var hp_valve2 = props.globals.getNode("/systems/pneumatic/hp-valve-2", 1); +var eng_valve1_state = props.globals.getNode("/systems/pneumatic/eng-valve-1-state", 1); +var eng_valve2_state = props.globals.getNode("/systems/pneumatic/eng-valve-2-state", 1); +var eng_valve1 = props.globals.getNode("/systems/pneumatic/eng-valve-1", 1); +var eng_valve2 = props.globals.getNode("/systems/pneumatic/eng-valve-2", 1); +var precooler1_psi = props.globals.getNode("/systems/pneumatic/precooler-1-psi", 1); +var precooler2_psi = props.globals.getNode("/systems/pneumatic/precooler-2-psi", 1); +var precooler1_temp = props.globals.getNode("/systems/pneumatic/precooler-1-temp", 1); +var precooler2_temp = props.globals.getNode("/systems/pneumatic/precooler-2-temp", 1); +var precooler1_ovht = props.globals.getNode("/systems/pneumatic/precooler-1-ovht", 1); +var precooler2_ovht = props.globals.getNode("/systems/pneumatic/precooler-2-ovht", 1); +var gs_kt = props.globals.getNode("/velocities/groundspeed-kt", 1); +var switch_wing_aice = props.globals.getNode("/controls/switches/wing", 1); +var deice_wing = props.globals.getNode("/controls/deice/wing", 1); +var eng1_n2_actual = props.globals.getNode("/engines/engine[0]/n2-actual", 1); +var eng2_n2_actual = props.globals.getNode("/engines/engine[1]/n2-actual", 1); +var pack1_out_temp = props.globals.getNode("/systems/pressurization/pack-1-out-temp", 1); +var pack2_out_temp = props.globals.getNode("/systems/pressurization/pack-2-out-temp", 1); +var pack1_comp_out_temp = props.globals.getNode("/systems/pressurization/pack-1-comp-out-temp", 1); +var pack2_comp_out_temp = props.globals.getNode("/systems/pressurization/pack-2-comp-out-temp", 1); +var pack1_bypass = props.globals.getNode("/systems/pressurization/pack-1-bypass", 1); +var pack2_bypass = props.globals.getNode("/systems/pressurization/pack-2-bypass", 1); +var pack1_flow = props.globals.getNode("/systems/pressurization/pack-1-flow", 1); +var pack2_flow = props.globals.getNode("/systems/pressurization/pack-2-flow", 1); +var pack1_valve = props.globals.getNode("/systems/pressurization/pack-1-valve", 1); +var pack2_valve = props.globals.getNode("/systems/pressurization/pack-2-valve", 1); +var switch_pack1 = props.globals.getNode("/controls/pneumatic/switches/pack1", 1); +var switch_pack2 = props.globals.getNode("/controls/pneumatic/switches/pack2", 1); +var oil_qt1_actual = props.globals.getNode("/engines/engine[0]/oil-qt-actual", 1); +var oil_qt2_actual = props.globals.getNode("/engines/engine[1]/oil-qt-actual", 1); +var fuel_used_lbs1 = props.globals.getNode("/systems/fuel/fuel-used-1", 1); +var fuel_used_lbs2 = props.globals.getNode("/systems/fuel/fuel-used-2", 1); +var doorL1_pos = props.globals.getNode("/sim/model/door-positions/doorl1/position-norm", 1); +var doorR1_pos = props.globals.getNode("/sim/model/door-positions/doorr1/position-norm", 1); +var doorL4_pos = props.globals.getNode("/sim/model/door-positions/doorl4/position-norm", 1); +var doorR4_pos = props.globals.getNode("/sim/model/door-positions/doorr4/position-norm", 1); +var cargobulk_pos = props.globals.getNode("/sim/model/door-positions/cargobulk/position-norm", 1); +var cargofwd_pos = props.globals.getNode("/sim/model/door-positions/cargofwd/position-norm", 1); +var cargoaft_pos = props.globals.getNode("/sim/model/door-positions/cargoaft/position-norm", 1); # Electrical nodes -var apu_volts = props.globals.getNode("systems/electrical/sources/apu/output-volt", 1); -var apu_hz = props.globals.getNode("systems/electrical/sources/apu/output-hertz", 1); -var gen_apu = props.globals.getNode("systems/electrical/relay/apu-glc/contact-pos", 1); -var switch_bat1 = props.globals.getNode("controls/electrical/switches/bat-1", 1); -var switch_bat2 = props.globals.getNode("controls/electrical/switches/bat-2", 1); -var bat1_amps = props.globals.getNode("systems/electrical/sources/bat-1/amp", 1); -var bat2_amps = props.globals.getNode("systems/electrical/sources/bat-2/amp", 1); -var bat1_volts = props.globals.getNode("systems/electrical/sources/bat-1/volt", 1); -var bat2_volts = props.globals.getNode("systems/electrical/sources/bat-2/volt", 1); -var bat1_fault = props.globals.getNode("systems/electrical/light/bat-1-fault", 1); -var bat2_fault = props.globals.getNode("systems/electrical/light/bat-2-fault", 1); -var emerGenVolts = props.globals.getNode("systems/electrical/relay/emer-glc/output", 1); -var emerGenHz = props.globals.getNode("systems/electrical/sources/emer-gen/output-hertz", 1); -var tr1_volts = props.globals.getNode("systems/electrical/relay/tr-contactor-1/output", 1); -var tr2_volts = props.globals.getNode("systems/electrical/relay/tr-contactor-2/output", 1); -var tr1_amps = props.globals.getNode("systems/electrical/relay/tr-contactor-1/output-amp", 1); -var tr2_amps = props.globals.getNode("systems/electrical/relay/tr-contactor-2/output-amp", 1); -var dc1 = props.globals.getNode("systems/electrical/bus/dc-1", 1); -var dc2 = props.globals.getNode("systems/electrical/bus/dc-2", 1); -var dc_ess = props.globals.getNode("systems/electrical/bus/dc-ess", 1); -var switch_emer_gen = props.globals.getNode("systems/electrical/sources/emer-gen/output-volt", 1); -var switch_gen1 = props.globals.getNode("controls/electrical/switches/gen-1", 1); -var switch_gen2 = props.globals.getNode("controls/electrical/switches/gen-2", 1); -var gen1_volts = props.globals.getNode("systems/electrical/sources/idg-1/output-volt", 1); -var gen2_volts = props.globals.getNode("systems/electrical/sources/idg-2/output-volt", 1); -var gen1_hz = props.globals.getNode("systems/electrical/sources/idg-1/output-hertz", 1); -var gen2_hz = props.globals.getNode("systems/electrical/sources/idg-2/output-hertz", 1); -var ext_volts = props.globals.getNode("systems/electrical/sources/ext/output-volt", 1); -var ext_hz = props.globals.getNode("systems/electrical/sources/ext/output-hertz", 1); -var galleyshed = props.globals.getNode("systems/electrical/extra/galleyshed", 1); -var switch_galley = props.globals.getNode("controls/electrical/switches/galley", 1); -var dcbat = props.globals.getNode("systems/electrical/bus/dc-bat", 1); -var ac_ess = props.globals.getNode("systems/electrical/bus/ac-ess", 1); -var ac1 = props.globals.getNode("systems/electrical/bus/ac-1", 1); -var ac2 = props.globals.getNode("systems/electrical/bus/ac-2", 1); -var switch_ac_ess_feed = props.globals.getNode("controls/electrical/switches/ac-ess-feed", 1); -var tr1_fault = props.globals.getNode("systems/failures/electrical/tr-1", 1); -var tr2_fault = props.globals.getNode("systems/failures/electrical/tr-2", 1); -var essTrVolt = props.globals.getNode("systems/electrical/relay/dc-ess-feed-tr/output", 1); -var essTrAmp = props.globals.getNode("systems/electrical/relay/dc-ess-feed-tr/output-amp", 1); +var apu_volts = props.globals.getNode("/systems/electrical/sources/apu/output-volt", 1); +var apu_hz = props.globals.getNode("/systems/electrical/sources/apu/output-hertz", 1); +var gen_apu = props.globals.getNode("/systems/electrical/relay/apu-glc/contact-pos", 1); +var switch_bat1 = props.globals.getNode("/controls/electrical/switches/bat-1", 1); +var switch_bat2 = props.globals.getNode("/controls/electrical/switches/bat-2", 1); +var bat1_amps = props.globals.getNode("/systems/electrical/sources/bat-1/amp", 1); +var bat2_amps = props.globals.getNode("/systems/electrical/sources/bat-2/amp", 1); +var bat1_volts = props.globals.getNode("/systems/electrical/sources/bat-1/volt", 1); +var bat2_volts = props.globals.getNode("/systems/electrical/sources/bat-2/volt", 1); +var bat1_fault = props.globals.getNode("/systems/electrical/light/bat-1-fault", 1); +var bat2_fault = props.globals.getNode("/systems/electrical/light/bat-2-fault", 1); +var emerGenVolts = props.globals.getNode("/systems/electrical/relay/emer-glc/output", 1); +var emerGenHz = props.globals.getNode("/systems/electrical/sources/emer-gen/output-hertz", 1); +var tr1_volts = props.globals.getNode("/systems/electrical/relay/tr-contactor-1/output", 1); +var tr2_volts = props.globals.getNode("/systems/electrical/relay/tr-contactor-2/output", 1); +var tr1_amps = props.globals.getNode("/systems/electrical/relay/tr-contactor-1/output-amp", 1); +var tr2_amps = props.globals.getNode("/systems/electrical/relay/tr-contactor-2/output-amp", 1); +var dc1 = props.globals.getNode("/systems/electrical/bus/dc-1", 1); +var dc2 = props.globals.getNode("/systems/electrical/bus/dc-2", 1); +var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1); +var switch_emer_gen = props.globals.getNode("/systems/electrical/sources/emer-gen/output-volt", 1); +var switch_gen1 = props.globals.getNode("/controls/electrical/switches/gen-1", 1); +var switch_gen2 = props.globals.getNode("/controls/electrical/switches/gen-2", 1); +var gen1_volts = props.globals.getNode("/systems/electrical/sources/idg-1/output-volt", 1); +var gen2_volts = props.globals.getNode("/systems/electrical/sources/idg-2/output-volt", 1); +var gen1_hz = props.globals.getNode("/systems/electrical/sources/idg-1/output-hertz", 1); +var gen2_hz = props.globals.getNode("/systems/electrical/sources/idg-2/output-hertz", 1); +var ext_volts = props.globals.getNode("/systems/electrical/sources/ext/output-volt", 1); +var ext_hz = props.globals.getNode("/systems/electrical/sources/ext/output-hertz", 1); +var galleyshed = props.globals.getNode("/systems/electrical/extra/galleyshed", 1); +var switch_galley = props.globals.getNode("/controls/electrical/switches/galley", 1); +var dcbat = props.globals.getNode("/systems/electrical/bus/dc-bat", 1); +var ac_ess = props.globals.getNode("/systems/electrical/bus/ac-ess", 1); +var ac1 = props.globals.getNode("/systems/electrical/bus/ac-1", 1); +var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1); +var switch_ac_ess_feed = props.globals.getNode("/controls/electrical/switches/ac-ess-feed", 1); +var tr1_fault = props.globals.getNode("/systems/failures/electrical/tr-1", 1); +var tr2_fault = props.globals.getNode("/systems/failures/electrical/tr-2", 1); +var essTrVolt = props.globals.getNode("/systems/electrical/relay/dc-ess-feed-tr/output", 1); +var essTrAmp = props.globals.getNode("/systems/electrical/relay/dc-ess-feed-tr/output-amp", 1); # Hydraulic var blue_psi = 0; var green_psi = 0; var yellow_psi = 0; -var y_resv_lo_air_press = props.globals.getNode("systems/hydraulic/yellow-resv-lo-air-press", 1); -var b_resv_lo_air_press = props.globals.getNode("systems/hydraulic/blue-resv-lo-air-press", 1); -var g_resv_lo_air_press = props.globals.getNode("systems/hydraulic/green-resv-lo-air-press", 1); -var elec_pump_y_ovht = props.globals.getNode("systems/hydraulic/elec-pump-yellow-ovht", 1); -var elec_pump_b_ovht = props.globals.getNode("systems/hydraulic/elec-pump-blue-ovht", 1); -var rat_deployed = props.globals.getNode("controls/hydraulic/rat-deployed", 1); -var y_resv_ovht = props.globals.getNode("systems/hydraulic/yellow-resv-ovht", 1); -var b_resv_ovht = props.globals.getNode("systems/hydraulic/blue-resv-ovht", 1); -var g_resv_ovht = props.globals.getNode("systems/hydraulic/green-resv-ovht", 1); +var y_resv_lo_air_press = props.globals.getNode("/systems/hydraulic/yellow-resv-lo-air-press", 1); +var b_resv_lo_air_press = props.globals.getNode("/systems/hydraulic/blue-resv-lo-air-press", 1); +var g_resv_lo_air_press = props.globals.getNode("/systems/hydraulic/green-resv-lo-air-press", 1); +var elec_pump_y_ovht = props.globals.getNode("/systems/hydraulic/elec-pump-yellow-ovht", 1); +var elec_pump_b_ovht = props.globals.getNode("/systems/hydraulic/elec-pump-blue-ovht", 1); +var rat_deployed = props.globals.getNode("/controls/hydraulic/rat-deployed", 1); +var y_resv_ovht = props.globals.getNode("/systems/hydraulic/yellow-resv-ovht", 1); +var b_resv_ovht = props.globals.getNode("/systems/hydraulic/blue-resv-ovht", 1); +var g_resv_ovht = props.globals.getNode("/systems/hydraulic/green-resv-ovht", 1); var askidsw = 0; var brakemode = 0; var accum = 0; -var L1BrakeTempc = props.globals.getNode("gear/gear[1]/L1brake-temp-degc", 1); -var L2BrakeTempc = props.globals.getNode("gear/gear[1]/L2brake-temp-degc", 1); -var R3BrakeTempc = props.globals.getNode("gear/gear[2]/R3brake-temp-degc", 1); -var R4BrakeTempc = props.globals.getNode("gear/gear[2]/R4brake-temp-degc", 1); +var L1BrakeTempc = props.globals.getNode("/gear/gear[1]/L1brake-temp-degc", 1); +var L2BrakeTempc = props.globals.getNode("/gear/gear[1]/L2brake-temp-degc", 1); +var R3BrakeTempc = props.globals.getNode("/gear/gear[2]/R3brake-temp-degc", 1); +var R4BrakeTempc = props.globals.getNode("/gear/gear[2]/R4brake-temp-degc", 1); -var eng1_running = props.globals.getNode("engines/engine[0]/running", 1); -var eng2_running = props.globals.getNode("engines/engine[1]/running", 1); -var switch_cart = props.globals.getNode("controls/electrical/ground-cart", 1); -var total_psi = props.globals.getNode("systems/pneumatic/total-psi", 1); -var spoiler_L1 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-l1/final-deg", 1); -var spoiler_L2 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-l2/final-deg", 1); -var spoiler_L3 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-l3/final-deg", 1); -var spoiler_L4 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-l4/final-deg", 1); -var spoiler_L5 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-l5/final-deg", 1); -var spoiler_R1 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-r1/final-deg", 1); -var spoiler_R2 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-r2/final-deg", 1); -var spoiler_R3 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-r3/final-deg", 1); -var spoiler_R4 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-r4/final-deg", 1); -var spoiler_R5 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-r5/final-deg", 1); -var spoiler_L1_fail = props.globals.getNode("systems/failures/spoiler-l1", 1); -var spoiler_L2_fail = props.globals.getNode("systems/failures/spoiler-l2", 1); -var spoiler_L3_fail = props.globals.getNode("systems/failures/spoiler-l3", 1); -var spoiler_L4_fail = props.globals.getNode("systems/failures/spoiler-l4", 1); -var spoiler_L5_fail = props.globals.getNode("systems/failures/spoiler-l5", 1); -var spoiler_R1_fail = props.globals.getNode("systems/failures/spoiler-r1", 1); -var spoiler_R2_fail = props.globals.getNode("systems/failures/spoiler-r2", 1); -var spoiler_R3_fail = props.globals.getNode("systems/failures/spoiler-r3", 1); -var spoiler_R4_fail = props.globals.getNode("systems/failures/spoiler-r4", 1); -var spoiler_R5_fail = props.globals.getNode("systems/failures/spoiler-r5", 1); -var elac1 = props.globals.getNode("systems/fctl/elac1", 1); -var elac2 = props.globals.getNode("systems/fctl/elac2", 1); -var sec1 = props.globals.getNode("systems/fctl/sec1", 1); -var sec2 = props.globals.getNode("systems/fctl/sec2", 1); -var sec3 = props.globals.getNode("systems/fctl/sec3", 1); -var elac1_fail = props.globals.getNode("systems/failures/elac1", 1); -var elac2_fail = props.globals.getNode("systems/failures/elac2", 1); -var sec1_fail = props.globals.getNode("systems/failures/sec1", 1); -var sec2_fail = props.globals.getNode("systems/failures/sec2", 1); -var sec3_fail = props.globals.getNode("systems/failures/sec3", 1); -var eng1_n1 = props.globals.getNode("engines/engine[0]/n1-actual", 1); -var eng2_n1 = props.globals.getNode("engines/engine[1]/n1-actual", 1); -var total_fuel_lbs = props.globals.getNode("consumables/fuel/total-fuel-lbs", 1); -var fadec1 = props.globals.getNode("systems/fadec/powered1", 1); -var fadec2 = props.globals.getNode("systems/fadec/powered2", 1); -var fuel_flow1 = props.globals.getNode("engines/engine[0]/fuel-flow_actual", 1); -var fuel_flow2 = props.globals.getNode("engines/engine[1]/fuel-flow_actual", 1); -var fuel_left_outer_temp = props.globals.getNode("consumables/fuel/tank[0]/temperature_degC", 1); -var fuel_left_inner_temp = props.globals.getNode("consumables/fuel/tank[1]/temperature_degC", 1); -var fuel_right_outer_temp = props.globals.getNode("consumables/fuel/tank[3]/temperature_degC", 1); -var fuel_right_inner_temp = props.globals.getNode("consumables/fuel/tank[4]/temperature_degC", 1); -var cutoff_switch1 = props.globals.getNode("controls/engines/engine[0]/cutoff-switch", 1); -var cutoff_switch2 = props.globals.getNode("controls/engines/engine[1]/cutoff-switch", 1); -var fuel_xfeed = props.globals.getNode("controls/fuel/x-feed", 1); -var tank0pump1 = props.globals.getNode("controls/fuel/tank0pump1", 1); -var tank0pump2 = props.globals.getNode("controls/fuel/tank0pump2", 1); -var tank1pump1 = props.globals.getNode("controls/fuel/tank1pump1", 1); -var tank1pump2 = props.globals.getNode("controls/fuel/tank1pump2", 1); -var tank2pump1 = props.globals.getNode("controls/fuel/tank2pump1", 1); -var tank2pump2 = props.globals.getNode("controls/fuel/tank2pump2", 1); -var autobreak_mode = props.globals.getNode("controls/autobrake/mode", 1); -var gear1_pos = props.globals.getNode("gear/gear[0]/position-norm", 1); -var gear2_pos = props.globals.getNode("gear/gear[1]/position-norm", 1); -var gear3_pos = props.globals.getNode("gear/gear[2]/position-norm", 1); -var gear_door_L = props.globals.getNode("systems/hydraulic/gear/door-left", 1); -var gear_door_R = props.globals.getNode("systems/hydraulic/gear/door-right", 1); -var gear_door_N = props.globals.getNode("systems/hydraulic/gear/door-nose", 1); -var gear_down = props.globals.getNode("controls/gear/gear-down", 1); -var press_vs_norm = props.globals.getNode("systems/pressurization/vs-norm", 1); -var cabinalt = props.globals.getNode("systems/pressurization/cabinalt-norm", 1); -var gear0_wow = props.globals.getNode("gear/gear[0]/wow", 1); +var eng1_running = props.globals.getNode("/engines/engine[0]/running", 1); +var eng2_running = props.globals.getNode("/engines/engine[1]/running", 1); +var switch_cart = props.globals.getNode("/controls/electrical/ground-cart", 1); +var total_psi = props.globals.getNode("/systems/pneumatic/total-psi", 1); +var spoiler_L1 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l1/final-deg", 1); +var spoiler_L2 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l2/final-deg", 1); +var spoiler_L3 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l3/final-deg", 1); +var spoiler_L4 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l4/final-deg", 1); +var spoiler_L5 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l5/final-deg", 1); +var spoiler_R1 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r1/final-deg", 1); +var spoiler_R2 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r2/final-deg", 1); +var spoiler_R3 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r3/final-deg", 1); +var spoiler_R4 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r4/final-deg", 1); +var spoiler_R5 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r5/final-deg", 1); +var spoiler_L1_fail = props.globals.getNode("/systems/failures/spoiler-l1", 1); +var spoiler_L2_fail = props.globals.getNode("/systems/failures/spoiler-l2", 1); +var spoiler_L3_fail = props.globals.getNode("/systems/failures/spoiler-l3", 1); +var spoiler_L4_fail = props.globals.getNode("/systems/failures/spoiler-l4", 1); +var spoiler_L5_fail = props.globals.getNode("/systems/failures/spoiler-l5", 1); +var spoiler_R1_fail = props.globals.getNode("/systems/failures/spoiler-r1", 1); +var spoiler_R2_fail = props.globals.getNode("/systems/failures/spoiler-r2", 1); +var spoiler_R3_fail = props.globals.getNode("/systems/failures/spoiler-r3", 1); +var spoiler_R4_fail = props.globals.getNode("/systems/failures/spoiler-r4", 1); +var spoiler_R5_fail = props.globals.getNode("/systems/failures/spoiler-r5", 1); +var elac1 = props.globals.getNode("/systems/fctl/elac1", 1); +var elac2 = props.globals.getNode("/systems/fctl/elac2", 1); +var sec1 = props.globals.getNode("/systems/fctl/sec1", 1); +var sec2 = props.globals.getNode("/systems/fctl/sec2", 1); +var sec3 = props.globals.getNode("/systems/fctl/sec3", 1); +var elac1_fail = props.globals.getNode("/systems/failures/elac1", 1); +var elac2_fail = props.globals.getNode("/systems/failures/elac2", 1); +var sec1_fail = props.globals.getNode("/systems/failures/sec1", 1); +var sec2_fail = props.globals.getNode("/systems/failures/sec2", 1); +var sec3_fail = props.globals.getNode("/systems/failures/sec3", 1); +var eng1_n1 = props.globals.getNode("/engines/engine[0]/n1-actual", 1); +var eng2_n1 = props.globals.getNode("/engines/engine[1]/n1-actual", 1); +var total_fuel_lbs = props.globals.getNode("/consumables/fuel/total-fuel-lbs", 1); +var fadec1 = props.globals.getNode("/systems/fadec/powered1", 1); +var fadec2 = props.globals.getNode("/systems/fadec/powered2", 1); +var fuel_flow1 = props.globals.getNode("/engines/engine[0]/fuel-flow_actual", 1); +var fuel_flow2 = props.globals.getNode("/engines/engine[1]/fuel-flow_actual", 1); +var fuel_left_outer_temp = props.globals.getNode("/consumables/fuel/tank[0]/temperature_degC", 1); +var fuel_left_inner_temp = props.globals.getNode("/consumables/fuel/tank[1]/temperature_degC", 1); +var fuel_right_outer_temp = props.globals.getNode("/consumables/fuel/tank[3]/temperature_degC", 1); +var fuel_right_inner_temp = props.globals.getNode("/consumables/fuel/tank[4]/temperature_degC", 1); +var cutoff_switch1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1); +var cutoff_switch2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1); +var fuel_xfeed = props.globals.getNode("/controls/fuel/x-feed", 1); +var tank0pump1 = props.globals.getNode("/controls/fuel/tank0pump1", 1); +var tank0pump2 = props.globals.getNode("/controls/fuel/tank0pump2", 1); +var tank1pump1 = props.globals.getNode("/controls/fuel/tank1pump1", 1); +var tank1pump2 = props.globals.getNode("/controls/fuel/tank1pump2", 1); +var tank2pump1 = props.globals.getNode("/controls/fuel/tank2pump1", 1); +var tank2pump2 = props.globals.getNode("/controls/fuel/tank2pump2", 1); +var autobreak_mode = props.globals.getNode("/controls/autobrake/mode", 1); +var gear1_pos = props.globals.getNode("/gear/gear[0]/position-norm", 1); +var gear2_pos = props.globals.getNode("/gear/gear[1]/position-norm", 1); +var gear3_pos = props.globals.getNode("/gear/gear[2]/position-norm", 1); +var gear_door_L = props.globals.getNode("/systems/hydraulic/gear/door-left", 1); +var gear_door_R = props.globals.getNode("/systems/hydraulic/gear/door-right", 1); +var gear_door_N = props.globals.getNode("/systems/hydraulic/gear/door-nose", 1); +var gear_down = props.globals.getNode("/controls/gear/gear-down", 1); +var press_vs_norm = props.globals.getNode("/systems/pressurization/vs-norm", 1); +var cabinalt = props.globals.getNode("/systems/pressurization/cabinalt-norm", 1); +var gear0_wow = props.globals.getNode("/gear/gear[0]/wow", 1); # Create Nodes: var apu_load = props.globals.initNode("/systems/electrical/extra/apu-load", 0, "DOUBLE"); @@ -1682,25 +1682,25 @@ var canvas_lowerECAM_elec = { # Managment of the connecting lines between the components - if (getprop("systems/electrical/relay/apu-glc/contact-pos") and (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") or getprop("systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos"))) { + if (getprop("/systems/electrical/relay/apu-glc/contact-pos") and (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") or getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos"))) { me["APU-out"].show(); } else { me["APU-out"].hide(); } - if (getprop("systems/electrical/relay/ext-epc/contact-pos") and (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") or getprop("systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos"))) { + if (getprop("/systems/electrical/relay/ext-epc/contact-pos") and (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") or getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos"))) { me["EXT-out"].show(); } else { me["EXT-out"].hide(); } - if (gen1_volts.getValue() >= 110 and getprop("systems/electrical/relay/gen-1-glc/contact-pos")) { + if (gen1_volts.getValue() >= 110 and getprop("/systems/electrical/relay/gen-1-glc/contact-pos")) { me["ELEC-Line-GEN1-AC1"].show(); } else { me["ELEC-Line-GEN1-AC1"].hide(); } - if (gen2_volts.getValue() >= 110 and getprop("systems/electrical/relay/gen-2-glc/contact-pos")) { + if (gen2_volts.getValue() >= 110 and getprop("/systems/electrical/relay/gen-2-glc/contact-pos")) { me["ELEC-Line-GEN2-AC2"].show(); } else { me["ELEC-Line-GEN2-AC2"].hide(); @@ -1718,38 +1718,38 @@ var canvas_lowerECAM_elec = { me["AC2-in"].hide(); } - if (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") and getprop("systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos")) { + if (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") and getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos")) { me["ELEC-Line-APU-AC1"].show(); me["ELEC-Line-APU-EXT"].show(); me["ELEC-Line-EXT-AC2"].show(); } else { - if (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos")) { + if (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos")) { me["ELEC-Line-APU-AC1"].show(); } else { me["ELEC-Line-APU-AC1"].hide(); } - if ((getprop("systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos") and getprop("systems/electrical/relay/apu-glc/contact-pos") and !getprop("systems/electrical/relay/gen-2-glc/contact-pos")) or (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") and getprop("systems/electrical/relay/ext-epc/contact-pos") and !getprop("systems/electrical/relay/gen-1-glc/contact-pos"))) { + if ((getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos") and getprop("/systems/electrical/relay/apu-glc/contact-pos") and !getprop("/systems/electrical/relay/gen-2-glc/contact-pos")) or (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") and getprop("/systems/electrical/relay/ext-epc/contact-pos") and !getprop("/systems/electrical/relay/gen-1-glc/contact-pos"))) { me["ELEC-Line-APU-EXT"].show(); } else { me["ELEC-Line-APU-EXT"].hide(); } - if (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos")) { + if (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos")) { me["ELEC-Line-EXT-AC2"].show(); } else { me["ELEC-Line-EXT-AC2"].hide(); } } - if (getprop("systems/electrical/relay/ac-ess-feed-1/contact-pos") == 1) { + if (getprop("/systems/electrical/relay/ac-ess-feed-1/contact-pos") == 1) { if (ac1.getValue() >= 110) { me["ELEC-Line-AC1-ACESS"].show(); } else { me["ELEC-Line-AC1-ACESS"].hide(); } me["ELEC-Line-AC2-ACESS"].hide(); - } elsif (getprop("systems/electrical/relay/ac-ess-feed-2/contact-pos") == 1) { + } elsif (getprop("/systems/electrical/relay/ac-ess-feed-2/contact-pos") == 1) { me["ELEC-Line-AC1-ACESS"].hide(); if (ac2.getValue() >= 110) { me["ELEC-Line-AC2-ACESS"].show(); @@ -1761,7 +1761,7 @@ var canvas_lowerECAM_elec = { me["ELEC-Line-AC2-ACESS"].hide(); } - if (getprop("systems/electrical/relay/tr-contactor-1/contact-pos") == 1) { + if (getprop("/systems/electrical/relay/tr-contactor-1/contact-pos") == 1) { if (ac1.getValue() < 110) { me["ELEC-Line-AC1-TR1"].setColorFill(0.7333,0.3803,0); } else { @@ -1774,7 +1774,7 @@ var canvas_lowerECAM_elec = { me["ELEC-Line-TR1-DC1"].hide(); } - if (getprop("systems/electrical/relay/tr-contactor-2/contact-pos") == 1) { + if (getprop("/systems/electrical/relay/tr-contactor-2/contact-pos") == 1) { if (ac2.getValue() < 110) { me["ELEC-Line-AC2-TR2"].setColorFill(0.7333,0.3803,0); } else { @@ -1787,25 +1787,25 @@ var canvas_lowerECAM_elec = { me["ELEC-Line-TR2-DC2"].hide(); } - if (getprop("systems/electrical/relay/dc-bus-tie-dc-1/contact-pos")) { + if (getprop("/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos")) { me["ELEC-Line-DC1-DCESS_DCBAT"].show(); } else { me["ELEC-Line-DC1-DCESS_DCBAT"].hide(); } - if (getprop("systems/electrical/relay/dc-ess-feed-bat/contact-pos")) { + if (getprop("/systems/electrical/relay/dc-ess-feed-bat/contact-pos")) { me["ELEC-Line-DC1-DCESS"].show(); } else { me["ELEC-Line-DC1-DCESS"].hide(); } - if (getprop("systems/electrical/relay/dc-ess-feed-bat/contact-pos") or getprop("systems/electrical/relay/dc-bus-tie-dc-1/contact-pos")) { + if (getprop("/systems/electrical/relay/dc-ess-feed-bat/contact-pos") or getprop("/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos")) { me["ELEC-Line-DC1-DCBAT"].show(); } else { me["ELEC-Line-DC1-DCBAT"].hide(); } - if (getprop("systems/electrical/relay/dc-bus-tie-dc-2/contact-pos")) { + if (getprop("/systems/electrical/relay/dc-bus-tie-dc-2/contact-pos")) { me["ELEC-Line-DC2-DCBAT"].show(); me["ELEC-Line-DC2-DCESS_DCBAT"].show(); } else { @@ -1813,7 +1813,7 @@ var canvas_lowerECAM_elec = { me["ELEC-Line-DC2-DCESS_DCBAT"].hide(); } - if (getprop("systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos")) { + if (getprop("/systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos")) { me["EMERGEN-out"].show(); me["ELEC-Line-Emergen-ESSTR"].show(); } else { @@ -1821,13 +1821,13 @@ var canvas_lowerECAM_elec = { me["ELEC-Line-Emergen-ESSTR"].hide(); } - if (systems.ELEC.Bus.acEss.getValue() >= 110 and !getprop("systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos") and (!getprop("systems/electrical/relay/tr-contactor-1/contact-pos") or !getprop("systems/electrical/relay/tr-contactor-2/contact-pos"))) { + if (systems.ELEC.Bus.acEss.getValue() >= 110 and !getprop("/systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos") and (!getprop("/systems/electrical/relay/tr-contactor-1/contact-pos") or !getprop("/systems/electrical/relay/tr-contactor-2/contact-pos"))) { me["ELEC-Line-ACESS-TRESS"].show(); } else { me["ELEC-Line-ACESS-TRESS"].hide(); } - if (getprop("systems/electrical/relay/dc-ess-feed-tr/contact-pos")) { + if (getprop("/systems/electrical/relay/dc-ess-feed-tr/contact-pos")) { me["ELEC-Line-ESSTR-DCESS"].show(); } else { me["ELEC-Line-ESSTR-DCESS"].hide(); @@ -2308,7 +2308,7 @@ var canvas_lowerECAM_fuel = { update: func() { _weight_kgs = acconfig_weight_kgs.getValue(); - # if (getprop("engines/engine[0]/n1-actual") < getprop("controls/engines/idle-limit")) { + # if (getprop("/engines/engine[0]/n1-actual") < getprop("/controls/engines/idle-limit")) { if (eng1_n1.getValue() <= 18.8) { me["ENG1idFFlow"].setColor(0.7333,0.3803,0); me["FUEL-ENG-1-label"].setColor(0.7333,0.3803,0); @@ -2317,7 +2317,7 @@ var canvas_lowerECAM_fuel = { me["FUEL-ENG-1-label"].setColor(0.8078,0.8039,0.8078); } - # if (getprop("engines/engine[1]/n1-actual") < getprop("controls/engines/idle-limit")) { + # if (getprop("/engines/engine[1]/n1-actual") < getprop("/controls/engines/idle-limit")) { if (eng2_n1.getValue() <= 18.5) { me["ENG2idFFlow"].setColor(0.7333,0.3803,0); me["FUEL-ENG-2-label"].setColor(0.7333,0.3803,0); @@ -3484,13 +3484,13 @@ setlistener("sim/signals/fdm-initialized", func { lowerECAM_test = canvas_lowerECAM_test.new(group_test, "Aircraft/A320-family/Models/Instruments/Common/res/du-test.svg"); lowerECAM_update.start(); - if (getprop("systems/acconfig/options/lecam-rate") > 1) { + if (getprop("/systems/acconfig/options/lecam-rate") > 1) { l_rateApply(); } }); var l_rateApply = func { - lowerECAM_update.restart(0.05 * getprop("systems/acconfig/options/lecam-rate")); + lowerECAM_update.restart(0.05 * getprop("/systems/acconfig/options/lecam-rate")); } var lowerECAM_update = maketimer(0.05, func { @@ -3504,4 +3504,4 @@ var showLowerECAM = func { setlistener("/systems/electrical/bus/ac-2", func() { canvas_lowerECAM_base.updateDu4(); -}, 0, 0); \ No newline at end of file +}, 0, 0); diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 8e309109..d8b9803c 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -33,24 +33,24 @@ var fplnl5 = ""; var fplnl5s = ""; var fplnl6 = ""; var fplnl6s = ""; -setprop("MCDUC/colors/wht/r", 1); -setprop("MCDUC/colors/wht/g", 1); -setprop("MCDUC/colors/wht/b", 1); -setprop("MCDUC/colors/grn/r", 0.0509); -setprop("MCDUC/colors/grn/g", 0.7529); -setprop("MCDUC/colors/grn/b", 0.2941); -setprop("MCDUC/colors/blu/r", 0.0901); -setprop("MCDUC/colors/blu/g", 0.6039); -setprop("MCDUC/colors/blu/b", 0.7176); -setprop("MCDUC/colors/amb/r", 0.7333); -setprop("MCDUC/colors/amb/g", 0.3803); -setprop("MCDUC/colors/amb/b", 0.0000); -setprop("MCDUC/colors/yel/r", 0.9333); -setprop("MCDUC/colors/yel/g", 0.9333); -setprop("MCDUC/colors/yel/b", 0.0000); -setprop("MCDUC/colors/mag/r", 0.6902); -setprop("MCDUC/colors/mag/g", 0.3333); -setprop("MCDUC/colors/mag/b", 0.7541); +setprop("/MCDUC/colors/wht/r", 1); +setprop("/MCDUC/colors/wht/g", 1); +setprop("/MCDUC/colors/wht/b", 1); +setprop("/MCDUC/colors/grn/r", 0.0509); +setprop("/MCDUC/colors/grn/g", 0.7529); +setprop("/MCDUC/colors/grn/b", 0.2941); +setprop("/MCDUC/colors/blu/r", 0.0901); +setprop("/MCDUC/colors/blu/g", 0.6039); +setprop("/MCDUC/colors/blu/b", 0.7176); +setprop("/MCDUC/colors/amb/r", 0.7333); +setprop("/MCDUC/colors/amb/g", 0.3803); +setprop("/MCDUC/colors/amb/b", 0.0000); +setprop("/MCDUC/colors/yel/r", 0.9333); +setprop("/MCDUC/colors/yel/g", 0.9333); +setprop("/MCDUC/colors/yel/b", 0.0000); +setprop("/MCDUC/colors/mag/r", 0.6902); +setprop("/MCDUC/colors/mag/g", 0.3333); +setprop("/MCDUC/colors/mag/b", 0.7541); var WHITE = [1.0000,1.0000,1.0000]; var GREEN = [0.0509,0.7529,0.2941]; var BLUE = [0.0901,0.6039,0.7176]; @@ -59,154 +59,154 @@ var YELLOW = [0.9333,0.9333,0.0000]; var MAGENTA = [0.6902,0.3333,0.7541]; # Fetch nodes: -var mcdu_keyboard_left = props.globals.getNode("FMGC/keyboard-left", 0); -var mcdu_keyboard_right = props.globals.getNode("FMGC/keyboard-right", 0); +var mcdu_keyboard_left = props.globals.getNode("/FMGC/keyboard-left", 0); +var mcdu_keyboard_right = props.globals.getNode("/FMGC/keyboard-right", 0); #ACCONFIG -var ac1 = props.globals.getNode("systems/electrical/bus/ac-1", 1); -var ac2 = props.globals.getNode("systems/electrical/bus/ac-2", 1); -var mcdu1_lgt = props.globals.getNode("controls/lighting/DU/mcdu1", 1); -var mcdu2_lgt = props.globals.getNode("controls/lighting/DU/mcdu2", 1); -var acType = props.globals.getNode("MCDUC/type", 1); -var engType = props.globals.getNode("MCDUC/eng", 1); -var database1 = props.globals.getNode("FMGC/internal/navdatabase", 1); -var database2 = props.globals.getNode("FMGC/internal/navdatabase2", 1); -var databaseCode = props.globals.getNode("FMGC/internal/navdatabasecode", 1); +var ac1 = props.globals.getNode("/systems/electrical/bus/ac-1", 1); +var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1); +var mcdu1_lgt = props.globals.getNode("/controls/lighting/DU/mcdu1", 1); +var mcdu2_lgt = props.globals.getNode("/controls/lighting/DU/mcdu2", 1); +var acType = props.globals.getNode("/MCDUC/type", 1); +var engType = props.globals.getNode("/MCDUC/eng", 1); +var database1 = props.globals.getNode("/FMGC/internal/navdatabase", 1); +var database2 = props.globals.getNode("/FMGC/internal/navdatabase2", 1); +var databaseCode = props.globals.getNode("/FMGC/internal/navdatabasecode", 1); # RADNAV -var vor1 = props.globals.getNode("FMGC/internal/vor1-mcdu", 1); -var vor2 = props.globals.getNode("FMGC/internal/vor2-mcdu", 1); -var ils1 = props.globals.getNode("FMGC/internal/ils1-mcdu", 1); -var adf1 = props.globals.getNode("FMGC/internal/adf1-mcdu", 1); -var adf2 = props.globals.getNode("FMGC/internal/adf2-mcdu", 1); -var vor1FreqSet = props.globals.getNode("FMGC/internal/vor1freq-set", 1); -var vor1CRSSet = props.globals.getNode("FMGC/internal/vor1crs-set", 1); -var vor2FreqSet = props.globals.getNode("FMGC/internal/vor2freq-set", 1); -var vor2CRSSet = props.globals.getNode("FMGC/internal/vor2crs-set", 1); -var ils1FreqSet = props.globals.getNode("FMGC/internal/ils1freq-set", 1); -var ils1CRSSet = props.globals.getNode("FMGC/internal/ils1crs-set", 1); -var adf1FreqSet = props.globals.getNode("FMGC/internal/adf1freq-set", 1); -var adf2FreqSet = props.globals.getNode("FMGC/internal/adf2freq-set", 1); -var ils1CRS = props.globals.getNode("instrumentation/nav[0]/radials/selected-deg", 1); -var vor1CRS = props.globals.getNode("instrumentation/nav[2]/radials/selected-deg", 1); -var vor2CRS = props.globals.getNode("instrumentation/nav[3]/radials/selected-deg", 1); +var vor1 = props.globals.getNode("/FMGC/internal/vor1-mcdu", 1); +var vor2 = props.globals.getNode("/FMGC/internal/vor2-mcdu", 1); +var ils1 = props.globals.getNode("/FMGC/internal/ils1-mcdu", 1); +var adf1 = props.globals.getNode("/FMGC/internal/adf1-mcdu", 1); +var adf2 = props.globals.getNode("/FMGC/internal/adf2-mcdu", 1); +var vor1FreqSet = props.globals.getNode("/FMGC/internal/vor1freq-set", 1); +var vor1CRSSet = props.globals.getNode("/FMGC/internal/vor1crs-set", 1); +var vor2FreqSet = props.globals.getNode("/FMGC/internal/vor2freq-set", 1); +var vor2CRSSet = props.globals.getNode("/FMGC/internal/vor2crs-set", 1); +var ils1FreqSet = props.globals.getNode("/FMGC/internal/ils1freq-set", 1); +var ils1CRSSet = props.globals.getNode("/FMGC/internal/ils1crs-set", 1); +var adf1FreqSet = props.globals.getNode("/FMGC/internal/adf1freq-set", 1); +var adf2FreqSet = props.globals.getNode("/FMGC/internal/adf2freq-set", 1); +var ils1CRS = props.globals.getNode("/instrumentation/nav[0]/radials/selected-deg", 1); +var vor1CRS = props.globals.getNode("/instrumentation/nav[2]/radials/selected-deg", 1); +var vor2CRS = props.globals.getNode("/instrumentation/nav[3]/radials/selected-deg", 1); # INT-A -var flightNum = props.globals.getNode("MCDUC/flight-num", 1); -var flightNumSet = props.globals.getNode("MCDUC/flight-num-set", 1); -var depArpt = props.globals.getNode("FMGC/internal/dep-arpt", 1); -var arrArpt = props.globals.getNode("FMGC/internal/arr-arpt", 1); -var toFromSet = props.globals.getNode("FMGC/internal/tofrom-set", 1); -var alt_airport = props.globals.getNode("FMGC/internal/alt-airport", 1); -var altSet = props.globals.getNode("FMGC/internal/alt-set", 1); -var costIndex = props.globals.getNode("FMGC/internal/cost-index", 1); -var costIndexSet = props.globals.getNode("FMGC/internal/cost-index-set", 1); -var cruiseFL = props.globals.getNode("FMGC/internal/cruise-fl", 1); -var cruiseSet = props.globals.getNode("FMGC/internal/cruise-lvl-set", 1); -var cruiseTemp = props.globals.getNode("FMGC/internal/cruise-temp", 1); -var cruiseTempSet = props.globals.getNode("FMGC/internal/cruise-temp-set", 1); -var tropo = props.globals.getNode("FMGC/internal/tropo", 1); -var tropoSet = props.globals.getNode("FMGC/internal/tropo-set", 1); -var gndtemp = props.globals.getNode("FMGC/internal/gndtemp", 1); -var gndtempSet = props.globals.getNode("FMGC/internal/gndtemp-set", 1); -var ADIRSMCDUBTN = props.globals.getNode("controls/adirs/mcducbtn", 1); +var flightNum = props.globals.getNode("/MCDUC/flight-num", 1); +var flightNumSet = props.globals.getNode("/MCDUC/flight-num-set", 1); +var depArpt = props.globals.getNode("/FMGC/internal/dep-arpt", 1); +var arrArpt = props.globals.getNode("/FMGC/internal/arr-arpt", 1); +var toFromSet = props.globals.getNode("/FMGC/internal/tofrom-set", 1); +var alt_airport = props.globals.getNode("/FMGC/internal/alt-airport", 1); +var altSet = props.globals.getNode("/FMGC/internal/alt-set", 1); +var costIndex = props.globals.getNode("/FMGC/internal/cost-index", 1); +var costIndexSet = props.globals.getNode("/FMGC/internal/cost-index-set", 1); +var cruiseFL = props.globals.getNode("/FMGC/internal/cruise-fl", 1); +var cruiseSet = props.globals.getNode("/FMGC/internal/cruise-lvl-set", 1); +var cruiseTemp = props.globals.getNode("/FMGC/internal/cruise-temp", 1); +var cruiseTempSet = props.globals.getNode("/FMGC/internal/cruise-temp-set", 1); +var tropo = props.globals.getNode("/FMGC/internal/tropo", 1); +var tropoSet = props.globals.getNode("/FMGC/internal/tropo-set", 1); +var gndtemp = props.globals.getNode("/FMGC/internal/gndtemp", 1); +var gndtempSet = props.globals.getNode("/FMGC/internal/gndtemp-set", 1); +var ADIRSMCDUBTN = props.globals.getNode("/controls/adirs/mcducbtn", 1); # IRSINIT variables -var align_set = props.globals.getNode("FMGC/internal/align-set", 1); +var align_set = props.globals.getNode("/FMGC/internal/align-set", 1); # ROUTE SELECTION -var alt_selected = props.globals.getNode("FMGC/internal/alt-selected", 1); +var alt_selected = props.globals.getNode("/FMGC/internal/alt-selected", 1); # INT-B -var zfwcg = props.globals.getNode("FMGC/internal/zfwcg", 1); -var zfwcgSet = props.globals.getNode("FMGC/internal/zfwcg-set", 1); -var zfw = props.globals.getNode("FMGC/internal/zfw", 1); -var zfwSet = props.globals.getNode("FMGC/internal/zfw-set", 1); -var block = props.globals.getNode("FMGC/internal/block", 1); -var blockSet = props.globals.getNode("FMGC/internal/block-set", 1); -var taxi_fuel = props.globals.getNode("FMGC/internal/taxi-fuel", 1); -var trip_fuel = props.globals.getNode("FMGC/internal/trip-fuel", 1); -var trip_time = props.globals.getNode("FMGC/internal/trip-time", 1); -var rte_rsv = props.globals.getNode("FMGC/internal/rte-rsv", 1); -var rte_percent = props.globals.getNode("FMGC/internal/rte-percent", 1); -var alt_fuel = props.globals.getNode("FMGC/internal/alt-fuel", 1); -var alt_time = props.globals.getNode("FMGC/internal/alt-time", 1); -var final_fuel = props.globals.getNode("FMGC/internal/final-fuel", 1); -var final_time = props.globals.getNode("FMGC/internal/final-time", 1); -var min_dest_fob = props.globals.getNode("FMGC/internal/min-dest-fob", 1); -var tow = props.globals.getNode("FMGC/internal/tow", 1); -var lw = props.globals.getNode("FMGC/internal/lw", 1); -var trip_wind = props.globals.getNode("FMGC/internal/trip-wind", 1); -var extra_fuel = props.globals.getNode("FMGC/internal/extra-fuel", 1); -var extra_time = props.globals.getNode("FMGC/internal/extra-time", 1); +var zfwcg = props.globals.getNode("/FMGC/internal/zfwcg", 1); +var zfwcgSet = props.globals.getNode("/FMGC/internal/zfwcg-set", 1); +var zfw = props.globals.getNode("/FMGC/internal/zfw", 1); +var zfwSet = props.globals.getNode("/FMGC/internal/zfw-set", 1); +var block = props.globals.getNode("/FMGC/internal/block", 1); +var blockSet = props.globals.getNode("/FMGC/internal/block-set", 1); +var taxi_fuel = props.globals.getNode("/FMGC/internal/taxi-fuel", 1); +var trip_fuel = props.globals.getNode("/FMGC/internal/trip-fuel", 1); +var trip_time = props.globals.getNode("/FMGC/internal/trip-time", 1); +var rte_rsv = props.globals.getNode("/FMGC/internal/rte-rsv", 1); +var rte_percent = props.globals.getNode("/FMGC/internal/rte-percent", 1); +var alt_fuel = props.globals.getNode("/FMGC/internal/alt-fuel", 1); +var alt_time = props.globals.getNode("/FMGC/internal/alt-time", 1); +var final_fuel = props.globals.getNode("/FMGC/internal/final-fuel", 1); +var final_time = props.globals.getNode("/FMGC/internal/final-time", 1); +var min_dest_fob = props.globals.getNode("/FMGC/internal/min-dest-fob", 1); +var tow = props.globals.getNode("/FMGC/internal/tow", 1); +var lw = props.globals.getNode("/FMGC/internal/lw", 1); +var trip_wind = props.globals.getNode("/FMGC/internal/trip-wind", 1); +var extra_fuel = props.globals.getNode("/FMGC/internal/extra-fuel", 1); +var extra_time = props.globals.getNode("/FMGC/internal/extra-time", 1); # FUELPRED -var state1 = props.globals.getNode("engines/engine[0]/state", 1); -var state2 = props.globals.getNode("engines/engine[1]/state", 1); -var engrdy = props.globals.getNode("engines/ready", 1); -var pri_utc = props.globals.getNode("FMGC/internal/pri-utc", 1); -var alt_utc = props.globals.getNode("FMGC/internal/alt-utc", 1); -var pri_efob = props.globals.getNode("FMGC/internal/pri-efob", 1); -var alt_efob = props.globals.getNode("FMGC/internal/alt-efob", 1); -var fob = props.globals.getNode("FMGC/internal/fob", 1); -var fffq_sensor = props.globals.getNode("FMGC/internal/fffq-sensor", 1); -var gw = props.globals.getNode("FMGC/internal/gw", 1); -var cg = props.globals.getNode("FMGC/internal/cg", 1); +var state1 = props.globals.getNode("/engines/engine[0]/state", 1); +var state2 = props.globals.getNode("/engines/engine[1]/state", 1); +var engrdy = props.globals.getNode("/engines/ready", 1); +var pri_utc = props.globals.getNode("/FMGC/internal/pri-utc", 1); +var alt_utc = props.globals.getNode("/FMGC/internal/alt-utc", 1); +var pri_efob = props.globals.getNode("/FMGC/internal/pri-efob", 1); +var alt_efob = props.globals.getNode("/FMGC/internal/alt-efob", 1); +var fob = props.globals.getNode("/FMGC/internal/fob", 1); +var fffq_sensor = props.globals.getNode("/FMGC/internal/fffq-sensor", 1); +var gw = props.globals.getNode("/FMGC/internal/gw", 1); +var cg = props.globals.getNode("/FMGC/internal/cg", 1); # PROG -var cruiseFL_prog = props.globals.getNode("FMGC/internal/cruise-fl-prog", 1); +var cruiseFL_prog = props.globals.getNode("/FMGC/internal/cruise-fl-prog", 1); # PERF -var altitude = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft", 1); +var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1); # TO PERF -var v1 = props.globals.getNode("FMGC/internal/v1", 1); -var v1Set = props.globals.getNode("FMGC/internal/v1-set", 1); -var vr = props.globals.getNode("FMGC/internal/vr", 1); -var vrSet = props.globals.getNode("FMGC/internal/vr-set", 1); -var v2 = props.globals.getNode("FMGC/internal/v2", 1); -var v2Set = props.globals.getNode("FMGC/internal/v2-set", 1); +var v1 = props.globals.getNode("/FMGC/internal/v1", 1); +var v1Set = props.globals.getNode("/FMGC/internal/v1-set", 1); +var vr = props.globals.getNode("/FMGC/internal/vr", 1); +var vrSet = props.globals.getNode("/FMGC/internal/vr-set", 1); +var v2 = props.globals.getNode("/FMGC/internal/v2", 1); +var v2Set = props.globals.getNode("/FMGC/internal/v2-set", 1); -var clbReducFt = props.globals.getNode("systems/thrust/clbreduc-ft", 1); -var reducFt = props.globals.getNode("FMGC/internal/accel-agl-ft", 1); # It's not AGL anymore -var thrAccSet = props.globals.getNode("MCDUC/thracc-set", 1); -var flapTO = props.globals.getNode("FMGC/internal/to-flap", 1); -var THSTO = props.globals.getNode("FMGC/internal/to-ths", 1); -var flapTHSSet = props.globals.getNode("FMGC/internal/flap-ths-set", 1); -var flex = props.globals.getNode("FMGC/internal/flex", 1); -var flexSet = props.globals.getNode("FMGC/internal/flex-set", 1); -var engOutAcc = props.globals.getNode("FMGC/internal/eng-out-reduc", 1); -var engOutAccSet = props.globals.getNode("MCDUC/reducacc-set", 1); -var transAlt = props.globals.getNode("FMGC/internal/trans-alt", 1); -var managedSpeed = props.globals.getNode("it-autoflight/input/spd-managed", 1); +var clbReducFt = props.globals.getNode("/systems/thrust/clbreduc-ft", 1); +var reducFt = props.globals.getNode("/FMGC/internal/accel-agl-ft", 1); # It's not AGL anymore +var thrAccSet = props.globals.getNode("/MCDUC/thracc-set", 1); +var flapTO = props.globals.getNode("/FMGC/internal/to-flap", 1); +var THSTO = props.globals.getNode("/FMGC/internal/to-ths", 1); +var flapTHSSet = props.globals.getNode("/FMGC/internal/flap-ths-set", 1); +var flex = props.globals.getNode("/FMGC/internal/flex", 1); +var flexSet = props.globals.getNode("/FMGC/internal/flex-set", 1); +var engOutAcc = props.globals.getNode("/FMGC/internal/eng-out-reduc", 1); +var engOutAccSet = props.globals.getNode("/MCDUC/reducacc-set", 1); +var transAlt = props.globals.getNode("/FMGC/internal/trans-alt", 1); +var managedSpeed = props.globals.getNode("/it-autoflight/input/spd-managed", 1); # CLB PERF -var activate_once = props.globals.getNode("FMGC/internal/activate-once", 1); -var activate_twice = props.globals.getNode("FMGC/internal/activate-twice", 1); +var activate_once = props.globals.getNode("/FMGC/internal/activate-once", 1); +var activate_twice = props.globals.getNode("/FMGC/internal/activate-twice", 1); # CRZ PERF # DES PERF # APPR PERF -var dest_qnh = props.globals.getNode("FMGC/internal/dest-qnh", 1); -var dest_temp = props.globals.getNode("FMGC/internal/dest-temp", 1); -var dest_mag = props.globals.getNode("FMGC/internal/dest-mag", 1); -var dest_wind = props.globals.getNode("FMGC/internal/dest-wind", 1); -var vapp_speed_set = props.globals.getNode("FMGC/internal/vapp-speed-set", 1); -var final = props.globals.getNode("FMGC/internal/final", 1); -var radio = props.globals.getNode("FMGC/internal/radio", 1); -var baro = props.globals.getNode("FMGC/internal/baro", 1); -var radio_no = props.globals.getNode("FMGC/internal/radio-no", 1); -var ldg_config_3_set = props.globals.getNode("FMGC/internal/ldg-config-3-set", 1); -var ldg_config_f_set = props.globals.getNode("FMGC/internal/ldg-config-f-set", 1); +var dest_qnh = props.globals.getNode("/FMGC/internal/dest-qnh", 1); +var dest_temp = props.globals.getNode("/FMGC/internal/dest-temp", 1); +var dest_mag = props.globals.getNode("/FMGC/internal/dest-mag", 1); +var dest_wind = props.globals.getNode("/FMGC/internal/dest-wind", 1); +var vapp_speed_set = props.globals.getNode("/FMGC/internal/vapp-speed-set", 1); +var final = props.globals.getNode("/FMGC/internal/final", 1); +var radio = props.globals.getNode("/FMGC/internal/radio", 1); +var baro = props.globals.getNode("/FMGC/internal/baro", 1); +var radio_no = props.globals.getNode("/FMGC/internal/radio-no", 1); +var ldg_config_3_set = props.globals.getNode("/FMGC/internal/ldg-config-3-set", 1); +var ldg_config_f_set = props.globals.getNode("/FMGC/internal/ldg-config-f-set", 1); # GA PERF # Fetch nodes into vectors -var pageProp = [props.globals.getNode("MCDU[0]/page", 1), props.globals.getNode("MCDU[1]/page", 1)]; -var active = [props.globals.getNode("MCDU[0]/active", 1), props.globals.getNode("MCDU[1]/active", 1)]; -var scratchpad = [props.globals.getNode("MCDU[0]/scratchpad", 1), props.globals.getNode("MCDU[1]/scratchpad", 1)]; +var pageProp = [props.globals.getNode("/MCDU[0]/page", 1), props.globals.getNode("/MCDU[1]/page", 1)]; +var active = [props.globals.getNode("/MCDU[0]/active", 1), props.globals.getNode("/MCDU[1]/active", 1)]; +var scratchpad = [props.globals.getNode("/MCDU[0]/scratchpad", 1), props.globals.getNode("/MCDU[1]/scratchpad", 1)]; # Create Nodes: var pageSwitch = [props.globals.initNode("/MCDU[0]/internal/switch", 0, "BOOL"), props.globals.initNode("/MCDU[1]/internal/switch", 0, "BOOL")]; @@ -298,8 +298,8 @@ var canvas_MCDU_base = { }, updateCommon: func(i) { page = pageProp[i].getValue(); - if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) { - color_selected = getprop("MCDU[" ~ i ~ "]/scratchpad-color"); + if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 1) { + color_selected = getprop("/MCDU[" ~ i ~ "]/scratchpad-color"); if (color_selected == "grn") { me["Scratchpad"].setColor(GREEN); } else if (color_selected == "blu") { @@ -1168,8 +1168,8 @@ var canvas_MCDU_base = { } else if (cruiseSet.getValue() == 1) { me["INITA_CruiseFLTemp"].hide(); me["Simple_L6"].setColor(0.0901,0.6039,0.7176); - setprop("FMGC/internal/cruise-temp", 15 - (2 * cruiseFL.getValue() / 10)); - setprop("FMGC/internal/cruise-temp-set", 1); + setprop("/FMGC/internal/cruise-temp", 15 - (2 * cruiseFL.getValue() / 10)); + setprop("/FMGC/internal/cruise-temp-set", 1); me["Simple_L6"].setText(sprintf("%s", "FL" ~ cruiseFL.getValue()) ~ sprintf("/%sg", cruiseTemp.getValue())); } else { me["INITA_CruiseFLTemp"].show(); @@ -1215,12 +1215,12 @@ var canvas_MCDU_base = { } me["Simple_R6S"].setText("GND TEMP"); - if (getprop("FMGC/status/phase") == 0 and !getprop("FMGC/internal/gndtemp-set")) { - setprop("FMGC/internal/gndtemp", 15 - (2 * getprop("position/gear-agl-ft") / 1000)); + if (getprop("/FMGC/status/phase") == 0 and !getprop("/FMGC/internal/gndtemp-set")) { + setprop("/FMGC/internal/gndtemp", 15 - (2 * getprop("/position/gear-agl-ft") / 1000)); me["Simple_R6"].setText(sprintf("%.0fg", gndtemp.getValue())); me["Simple_R6"].setFontSize(small); } else { - if (getprop("FMGC/internal/gndtemp-set")) { + if (getprop("/FMGC/internal/gndtemp-set")) { me["Simple_R6"].setFontSize(normal); } else { me["Simple_R6"].setFontSize(small); @@ -1300,10 +1300,10 @@ var canvas_MCDU_base = { me["Simple_L1S"].setText("LAT"); me["Simple_R1S"].setText("LONG"); - if (getprop("FMGC/internal/align-ref-lat-edit")) { + if (getprop("/FMGC/internal/align-ref-lat-edit")) { me["IRSINIT_1"].show(); me["IRSINIT_2"].hide(); - } else if (getprop("FMGC/internal/align-ref-long-edit")) { + } else if (getprop("/FMGC/internal/align-ref-long-edit")) { me["IRSINIT_1"].hide(); me["IRSINIT_2"].show(); } else { @@ -1312,20 +1312,20 @@ var canvas_MCDU_base = { } if (toFromSet.getValue() == 1) { - degrees = getprop("FMGC/internal/align-ref-lat-degrees"); - minutes = getprop("FMGC/internal/align-ref-lat-minutes"); - sign = getprop("FMGC/internal/align-ref-lat-sign"); - dms_lat = getprop("FMGC/flightplan[2]/wp[0]/lat"); + degrees = getprop("/FMGC/internal/align-ref-lat-degrees"); + minutes = getprop("/FMGC/internal/align-ref-lat-minutes"); + sign = getprop("/FMGC/internal/align-ref-lat-sign"); + dms_lat = getprop("/FMGC/flightplan[2]/wp[0]/lat"); degrees_lat = int(dms_lat); minutes_lat = sprintf("%.1f",abs((dms_lat - degrees_lat) * 60)); sign_lat = degrees_lat >= 0 ? "N" : "S"; lat_same = degrees_lat == degrees and minutes_lat == minutes and sign_lat == sign; me["Simple_L1"].setText(abs(sprintf("%.0f", degrees)) ~ "g" ~ sprintf("%.1f", minutes) ~ " " ~ sign); - degrees = getprop("FMGC/internal/align-ref-long-degrees"); - minutes = getprop("FMGC/internal/align-ref-long-minutes"); - sign = getprop("FMGC/internal/align-ref-long-sign"); - dms_long = getprop("FMGC/flightplan[2]/wp[0]/lon"); + degrees = getprop("/FMGC/internal/align-ref-long-degrees"); + minutes = getprop("/FMGC/internal/align-ref-long-minutes"); + sign = getprop("/FMGC/internal/align-ref-long-sign"); + dms_long = getprop("/FMGC/flightplan[2]/wp[0]/lon"); degrees_long = int(dms_long); minutes_long = sprintf("%.1f",abs((dms_long - degrees_long) * 60)); sign_long = degrees_long >= 0 ? "E" : "W"; @@ -1333,7 +1333,7 @@ var canvas_MCDU_base = { me["Simple_R1"].setText(abs(sprintf("%.0f", degrees)) ~ "g" ~ sprintf("%.1f", minutes) ~ " " ~ sign); if (lat_same and long_same) { - me["Simple_C1"].setText(getprop("FMGC/flightplan[2]/wp[0]/id")); + me["Simple_C1"].setText(getprop("/FMGC/flightplan[2]/wp[0]/id")); me["Simple_C1"].setColor(GREEN); } else { me["Simple_C1"].setText("----"); @@ -1346,27 +1346,27 @@ var canvas_MCDU_base = { me["Simple_C1"].setColor(WHITE); } - dms = getprop("position/latitude-deg"); + dms = getprop("/position/latitude-deg"); degrees = int(dms); minutes = sprintf("%.1f",abs((dms - degrees) * 60)); sign = degrees >= 0 ? "N" : "S"; me["Simple_L2"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign); - dms2 = getprop("position/longitude-deg"); + dms2 = getprop("/position/longitude-deg"); degrees2 = int(dms2); minutes2 = sprintf("%.1f",abs((dms2 - degrees2) * 60)); sign2 = degrees2 >= 0 ? "E" : "W"; me["Simple_R2"].setText(abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2); - if (getprop("systems/navigation/adr/operating-1") and getprop("FMGC/internal/align1-done")) { + if (getprop("/systems/navigation/adr/operating-1") and getprop("/FMGC/internal/align1-done")) { me["Simple_C3"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2); } else { me["Simple_C3"].setText("-----.--/-----.--"); } - if (getprop("systems/navigation/adr/operating-2") and getprop("FMGC/internal/align2-done")) { + if (getprop("/systems/navigation/adr/operating-2") and getprop("/FMGC/internal/align2-done")) { me["Simple_C4"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2); } else { me["Simple_C4"].setText("-----.--/-----.--"); } - if (getprop("systems/navigation/adr/operating-3") and getprop("FMGC/internal/align3-done")) { + if (getprop("/systems/navigation/adr/operating-3") and getprop("/FMGC/internal/align3-done")) { me["Simple_C5"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2); } else { me["Simple_C5"].setText("-----.--/-----.--"); @@ -1383,19 +1383,19 @@ var canvas_MCDU_base = { me.showRightArrow(0, 0, 0, 0, 0, 1); } - if (getprop("systems/navigation/adr/operating-1") and systems.ADIRSnew.ADIRunits[0].inAlign == 0) { + if (getprop("/systems/navigation/adr/operating-1") and systems.ADIRSnew.ADIRunits[0].inAlign == 0) { me["Simple_C3S"].setText("IRS1 ALIGNED ON GPS"); } else { me["Simple_C3S"].setText("IRS1 ALIGNING ON GPS"); } - if (getprop("systems/navigation/adr/operating-2") and systems.ADIRSnew.ADIRunits[1].inAlign == 0) { + if (getprop("/systems/navigation/adr/operating-2") and systems.ADIRSnew.ADIRunits[1].inAlign == 0) { me["Simple_C4S"].setText("IRS2 ALIGNED ON GPS"); } else { me["Simple_C4S"].setText("IRS2 ALIGNING ON GPS"); } - if (getprop("systems/navigation/adr/operating-3") and systems.ADIRSnew.ADIRunits[2].inAlign == 0) { + if (getprop("/systems/navigation/adr/operating-3") and systems.ADIRSnew.ADIRunits[2].inAlign == 0) { me["Simple_C5S"].setText("IRS3 ALIGNED ON GPS"); } else { me["Simple_C5S"].setText("IRS3 ALIGNING ON GPS"); @@ -1529,10 +1529,10 @@ var canvas_MCDU_base = { me["Simple_R6S"].setText("EXTRA/TIME"); if (blockSet.getValue() == 1 and zfwSet.getValue() == 1) { - setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); - setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); - setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); - setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); + setprop("/FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("/FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("/FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("/FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); me["Simple_L2"].setText(sprintf("%4.1f/" ~ trip_time.getValue(), trip_fuel.getValue())); me["Simple_L3"].setText(sprintf("%4.1f/", rte_rsv.getValue()) ~ sprintf("%4.1f", rte_percent.getValue())); @@ -1681,19 +1681,19 @@ var canvas_MCDU_base = { me["Simple_R6S"].setText("EXTRA/TIME"); if (blockSet.getValue() == 1 and zfwSet.getValue() == 1) { - setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); - setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); - setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); - setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); + setprop("/FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("/FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("/FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("/FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); me["Simple_L3"].setText(sprintf("%4.1f/", rte_rsv.getValue()) ~ sprintf("%4.1f", rte_percent.getValue())); me["Simple_L4"].setText(sprintf("%4.1f/" ~ alt_time.getValue(), alt_fuel.getValue())); me["Simple_L5"].setText(sprintf("%4.1f/" ~ final_time.getValue(), final_fuel.getValue())); me["Simple_L6"].setText(sprintf("%2.1f", min_dest_fob.getValue())); - setprop("FMGC/internal/fob", num(getprop("consumables/fuel/total-fuel-lbs") / 1000)); - setprop("FMGC/internal/gw", num(getprop("fdm/jsbsim/inertia/weight-lbs") / 1000)); - setprop("FMGC/internal/cg", num(getprop("FMGC/internal/zfwcg"))); + setprop("/FMGC/internal/fob", num(getprop("/consumables/fuel/total-fuel-lbs") / 1000)); + setprop("/FMGC/internal/gw", num(getprop("/fdm/jsbsim/inertia/weight-lbs") / 1000)); + setprop("/FMGC/internal/cg", num(getprop("/FMGC/internal/zfwcg"))); me["Simple_R4"].setText(sprintf("%4.1f/" ~ fffq_sensor.getValue(), fob.getValue())); me["Simple_R5"].setText(sprintf("%4.1f/", gw.getValue()) ~ sprintf("%4.1f", cg.getValue())); me["Simple_R6"].setText(sprintf("%4.1f/" ~ extra_time.getValue(), extra_fuel.getValue())); @@ -1734,17 +1734,17 @@ var canvas_MCDU_base = { } } else if (page == "PROGTO" or page == "PROGCLB" or page == "PROGCRZ" or page == "PROGDES") { - if (getprop("FMGC/status/phase") == 0 or getprop("FMGC/status/phase") == 1) { - setprop("MCDU[" ~ i ~ "]/page", "PROGTO"); + if (getprop("/FMGC/status/phase") == 0 or getprop("/FMGC/status/phase") == 1) { + setprop("/MCDU[" ~ i ~ "]/page", "PROGTO"); page = "PROGTO"; - } else if (getprop("FMGC/status/phase") == 2) { - setprop("MCDU[" ~ i ~ "]/page", "PROGCLB"); + } else if (getprop("/FMGC/status/phase") == 2) { + setprop("/MCDU[" ~ i ~ "]/page", "PROGCLB"); page = "PROGCLB"; - } else if (getprop("FMGC/status/phase") == 3) { - setprop("MCDU[" ~ i ~ "]/page", "PROGCRZ"); + } else if (getprop("/FMGC/status/phase") == 3) { + setprop("/MCDU[" ~ i ~ "]/page", "PROGCRZ"); page = "PROGCRZ"; - } else if (getprop("FMGC/status/phase") == 4 or getprop("FMGC/status/phase") == 5 or getprop("FMGC/status/phase") == 6) { - setprop("MCDU[" ~ i ~ "]/page", "PROGDES"); + } else if (getprop("/FMGC/status/phase") == 4 or getprop("/FMGC/status/phase") == 5 or getprop("/FMGC/status/phase") == 6) { + setprop("/MCDU[" ~ i ~ "]/page", "PROGDES"); page = "PROGDES"; } @@ -1836,8 +1836,8 @@ var canvas_MCDU_base = { } if (cruiseSet.getValue() == 1 and page != "PROGDES") { - if (getprop("it-autoflight/input/alt") > cruiseFL_prog.getValue() * 100) { - me["Simple_L1"].setText(sprintf("%s", "FL" ~ getprop("it-autoflight/input/alt") / 100)); + if (getprop("/it-autoflight/input/alt") > cruiseFL_prog.getValue() * 100) { + me["Simple_L1"].setText(sprintf("%s", "FL" ~ getprop("/it-autoflight/input/alt") / 100)); } else { me["Simple_L1"].setText(sprintf("%s", "FL" ~ cruiseFL_prog.getValue())); } @@ -1950,7 +1950,7 @@ var canvas_MCDU_base = { me["Simple_R5S"].setText("ENG OUT ACC"); me["Simple_R6S"].setText("NEXT "); - if (getprop("FMGC/status/phase") == 0 or getprop("FMGC/status/phase") == 7) { + if (getprop("/FMGC/status/phase") == 0 or getprop("/FMGC/status/phase") == 7) { me["Simple_L6_Arrow"].show(); me["Simple_L6"].show(); me["Simple_L6S"].show(); @@ -1960,7 +1960,7 @@ var canvas_MCDU_base = { me["Simple_L6S"].hide(); } - if (getprop("FMGC/status/phase") == 1) { + if (getprop("/FMGC/status/phase") == 1) { me["Simple_Title"].setColor(0.0509,0.7529,0.2941); } else { me["Simple_Title"].setColor(1, 1, 1); @@ -2028,9 +2028,9 @@ var canvas_MCDU_base = { } if (zfwSet.getValue() == 1 and blockSet.getValue() == 1) { - me["Simple_C1"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/flap2_to"))); - me["Simple_C2"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/slat_to"))); - me["Simple_C3"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/clean_to"))); + me["Simple_C1"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/flap2_to"))); + me["Simple_C2"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/slat_to"))); + me["Simple_C3"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/clean_to"))); } else { me["Simple_C1"].setText(" ---"); me["Simple_C2"].setText(" ---"); @@ -2096,7 +2096,7 @@ var canvas_MCDU_base = { pageSwitch[i].setBoolValue(1); } - if (getprop("FMGC/status/phase") == 2) { + if (getprop("/FMGC/status/phase") == 2) { me["Simple_Title"].setColor(0.0509,0.7529,0.2941); me.showLeft(0, 0, 0, 0, 1, 0); me.showLeftS(0, 0, 0, 0, 1, 0); @@ -2126,7 +2126,7 @@ var canvas_MCDU_base = { me.colorLeft("ack", "ack", "ack", "ack", "ack", "amb"); me.colorLeftS("ack", "ack", "ack", "ack", "ack", "amb"); me.colorLeftArrow("ack", "ack", "ack", "ack", "ack", "amb"); - } else if (getprop("FMGC/status/phase") == 5) { + } else if (getprop("/FMGC/status/phase") == 5) { me["Simple_L6S"].setText(""); me["Simple_L6"].setText(""); me.colorLeft("ack", "ack", "ack", "ack", "ack", "blu"); @@ -2134,8 +2134,8 @@ var canvas_MCDU_base = { me.colorLeftArrow("ack", "ack", "ack", "ack", "ack", "blu"); me.showLeftArrow(0, 0, 0, 0, 0, -1); } else { - setprop("FMGC/internal/activate-once", 0); - setprop("FMGC/internal/activate-twice", 0); + setprop("/FMGC/internal/activate-once", 0); + setprop("/FMGC/internal/activate-twice", 0); } } else { me["Simple_Title"].setColor(1, 1, 1); @@ -2162,10 +2162,10 @@ var canvas_MCDU_base = { me.fontLeft(0, 0, 0, symbol, 0, 0); } else { me["Simple_L1"].setText("SELECTED"); - if (getprop("it-autoflight/input/kts-mach")) { - me["Simple_L4"].setText(sprintf(" %3.3f", getprop("it-autoflight/input/spd-mach"))); + if (getprop("/it-autoflight/input/kts-mach")) { + me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/spd-mach"))); } else { - me["Simple_L4"].setText(sprintf(" %s", int(getprop("it-autoflight/input/spd-kts")))); + me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/spd-kts")))); } me.fontLeft(0, 0, 0, default, 0, 0); } @@ -2180,17 +2180,17 @@ var canvas_MCDU_base = { } me["Simple_L3S"].setText(" MANAGED"); - if (getprop("it-autoflight/input/kts-mach")) { - me["Simple_L3"].setText(sprintf(" %3.3f", getprop("FMGC/internal/mng-spd"))); + if (getprop("/it-autoflight/input/kts-mach")) { + me["Simple_L3"].setText(sprintf(" %3.3f", getprop("/FMGC/internal/mng-spd"))); } else { - me["Simple_L3"].setText(sprintf(" %s", int(getprop("FMGC/internal/mng-spd")))); + me["Simple_L3"].setText(sprintf(" %s", int(getprop("/FMGC/internal/mng-spd")))); } me["Simple_L5S"].setText(" EXPEDITE"); me["Simple_L5"].setText(" T/O PHASE"); me["Simple_C2"].setText(" PRED TO"); - me["Simple_R2"].setText(sprintf("FL%s", getprop("it-autoflight/input/alt") / 100)); + me["Simple_R2"].setText(sprintf("FL%s", getprop("/it-autoflight/input/alt") / 100)); me["Simple_R3S"].setText("DIST"); me["Simple_R3"].setText("---"); @@ -2260,7 +2260,7 @@ var canvas_MCDU_base = { pageSwitch[i].setBoolValue(1); } - if (getprop("FMGC/status/phase") == 3) { + if (getprop("/FMGC/status/phase") == 3) { me["Simple_Title"].setColor(0.0509,0.7529,0.2941); if (managedSpeed.getValue() == 1) { @@ -2284,7 +2284,7 @@ var canvas_MCDU_base = { me.colorLeft("ack", "ack", "ack", "ack", "ack", "amb"); me.colorLeftS("ack", "ack", "ack", "ack", "ack", "amb"); me.colorLeftArrow("ack", "ack", "ack", "ack", "ack", "amb"); - } else if (getprop("FMGC/status/phase") == 5) { + } else if (getprop("/FMGC/status/phase") == 5) { me["Simple_L6S"].setText(""); me["Simple_L6"].setText(""); me.colorLeft("ack", "ack", "ack", "ack", "ack", "blu"); @@ -2292,8 +2292,8 @@ var canvas_MCDU_base = { me.colorLeftArrow("ack", "ack", "ack", "ack", "ack", "blu"); me.showLeftArrow(0, 0, 0, 0, 0, -1); } else { - setprop("FMGC/internal/activate-once", 0); - setprop("FMGC/internal/activate-twice", 0); + setprop("/FMGC/internal/activate-once", 0); + setprop("/FMGC/internal/activate-twice", 0); } } else { me["Simple_Title"].setColor(1, 1, 1); @@ -2314,10 +2314,10 @@ var canvas_MCDU_base = { me.fontLeft(0, 0, 0, symbol, 0, 0); } else { me["Simple_L1"].setText("SELECTED"); - if (getprop("it-autoflight/input/kts-mach")) { - me["Simple_L4"].setText(sprintf(" %3.3f", getprop("it-autoflight/input/spd-mach"))); + if (getprop("/it-autoflight/input/kts-mach")) { + me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/spd-mach"))); } else { - me["Simple_L4"].setText(sprintf(" %s", int(getprop("it-autoflight/input/spd-kts")))); + me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/spd-kts")))); } me.fontLeft(0, 0, 0, default, 0, 0); } @@ -2334,10 +2334,10 @@ var canvas_MCDU_base = { me["Simple_L2S"].setText(" CI"); me["Simple_L3S"].setText(" MANAGED"); - if (getprop("it-autoflight/input/kts-mach")) { - me["Simple_L3"].setText(sprintf(" %3.3f", getprop("FMGC/internal/mng-spd"))); + if (getprop("/it-autoflight/input/kts-mach")) { + me["Simple_L3"].setText(sprintf(" %3.3f", getprop("/FMGC/internal/mng-spd"))); } else { - me["Simple_L3"].setText(sprintf(" %s", int(getprop("FMGC/internal/mng-spd")))); + me["Simple_L3"].setText(sprintf(" %s", int(getprop("/FMGC/internal/mng-spd")))); } me["Simple_R1S"].setText("DEST EFOB"); @@ -2409,7 +2409,7 @@ var canvas_MCDU_base = { pageSwitch[i].setBoolValue(1); } - if (getprop("FMGC/status/phase") == 4) { + if (getprop("/FMGC/status/phase") == 4) { me["Simple_Title"].setColor(0.0509,0.7529,0.2941); me.showLeft(0, 0, 0, 0, 1, 0); me.showRight(0, 1, 0, 1, 0, 0); @@ -2438,7 +2438,7 @@ var canvas_MCDU_base = { me.colorLeft("ack", "ack", "ack", "ack", "ack", "amb"); me.colorLeftS("ack", "ack", "ack", "ack", "ack", "amb"); me.colorLeftArrow("ack", "ack", "ack", "ack", "ack", "amb"); - } else if (getprop("FMGC/status/phase") == 5) { + } else if (getprop("/FMGC/status/phase") == 5) { me["Simple_L6S"].setText(""); me["Simple_L6"].setText(""); me.colorLeft("ack", "ack", "ack", "ack", "ack", "blu"); @@ -2446,8 +2446,8 @@ var canvas_MCDU_base = { me.colorLeftArrow("ack", "ack", "ack", "ack", "ack", "blu"); me.showLeftArrow(0, 0, 0, 0, 0, -1); } else { - setprop("FMGC/internal/activate-once", 0); - setprop("FMGC/internal/activate-twice", 0); + setprop("/FMGC/internal/activate-once", 0); + setprop("/FMGC/internal/activate-twice", 0); } } else { me["Simple_Title"].setColor(1, 1, 1); @@ -2473,10 +2473,10 @@ var canvas_MCDU_base = { me.fontLeft(0, 0, 0, symbol, 0, 0); } else { me["Simple_L1"].setText("SELECTED"); - if (getprop("it-autoflight/input/kts-mach")) { - me["Simple_L4"].setText(sprintf(" %3.3f", getprop("it-autoflight/input/spd-mach"))); + if (getprop("/it-autoflight/input/kts-mach")) { + me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/spd-mach"))); } else { - me["Simple_L4"].setText(sprintf(" %3.0f", getprop("it-autoflight/input/spd-kts"))); + me["Simple_L4"].setText(sprintf(" %3.0f", getprop("/it-autoflight/input/spd-kts"))); } me.fontLeft(0, 0, 0, default, 0, 0); } @@ -2493,10 +2493,10 @@ var canvas_MCDU_base = { me["Simple_L2S"].setText(" CI"); me["Simple_L3S"].setText(" MANAGED"); - if (getprop("it-autoflight/input/kts-mach")) { - me["Simple_L3"].setText(sprintf(" %3.3f", getprop("FMGC/internal/mng-spd"))); + if (getprop("/it-autoflight/input/kts-mach")) { + me["Simple_L3"].setText(sprintf(" %3.3f", getprop("/FMGC/internal/mng-spd"))); } else { - me["Simple_L3"].setText(sprintf(" %3.0f", getprop("FMGC/internal/mng-spd"))); + me["Simple_L3"].setText(sprintf(" %3.0f", getprop("/FMGC/internal/mng-spd"))); } me["Simple_L5"].setText(" EXPEDITE"); @@ -2505,7 +2505,7 @@ var canvas_MCDU_base = { me["Simple_R1"].setText("---"); me["Simple_C2"].setText(" PRED TO"); - me["Simple_R2"].setText(sprintf("FL%3.0f", getprop("it-autoflight/input/alt") / 100)); + me["Simple_R2"].setText(sprintf("FL%3.0f", getprop("/it-autoflight/input/alt") / 100)); me["Simple_R3S"].setText("DIST"); me["Simple_R3"].setText("---"); @@ -2576,7 +2576,7 @@ var canvas_MCDU_base = { pageSwitch[i].setBoolValue(1); } - if (getprop("FMGC/status/phase") == 5) { + if (getprop("/FMGC/status/phase") == 5) { me["Simple_Title"].setColor(0.0509,0.7529,0.2941); } else { me["Simple_Title"].setColor(1, 1, 1); @@ -2623,8 +2623,8 @@ var canvas_MCDU_base = { } me["Simple_R2S"].setText("BARO"); - if (getprop("FMGC/internal/baro") != 99999) { - me["Simple_R2"].setText(sprintf("%.0f", getprop("FMGC/internal/baro"))); + if (getprop("/FMGC/internal/baro") != 99999) { + me["Simple_R2"].setText(sprintf("%.0f", getprop("/FMGC/internal/baro"))); me.fontRight(0, default, 0, 0, 0, 0); me.fontSizeRight(0, normal, 0, 0, 0, 0); } else { @@ -2634,11 +2634,11 @@ var canvas_MCDU_base = { } me["Simple_R3S"].setText("RADIO"); - if (getprop("FMGC/internal/radio") != 99999) { - me["Simple_R3"].setText(sprintf("%.0f", getprop("FMGC/internal/radio"))); + if (getprop("/FMGC/internal/radio") != 99999) { + me["Simple_R3"].setText(sprintf("%.0f", getprop("/FMGC/internal/radio"))); me.fontRight(0, 0, default, 0, 0, 0); me.fontSizeRight(0, 0, normal, 0, 0, 0); - } else if (getprop("FMGC/internal/radio-no")) { + } else if (getprop("/FMGC/internal/radio-no")) { me["Simple_R3"].setText("NO"); me.fontRight(0, 0, default, 0, 0, 0); me.fontSizeRight(0, 0, normal, 0, 0, 0); @@ -2669,11 +2669,11 @@ var canvas_MCDU_base = { me["Simple_L5S"].setText(" VAPP"); if (zfwSet.getValue() == 1 and blockSet.getValue() == 1) { - me["Simple_C1"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/flap2_appr"))); - me["Simple_C2"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/slat_appr"))); - me["Simple_C3"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/clean_appr"))); - me["Simple_C5"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/vls_appr"))); - me["Simple_L5"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/vapp_appr"))); + me["Simple_C1"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/flap2_appr"))); + me["Simple_C2"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/slat_appr"))); + me["Simple_C3"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/clean_appr"))); + me["Simple_C5"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/vls_appr"))); + me["Simple_L5"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/vapp_appr"))); me.fontLeft(0, 0, 0, 0, default, 0); if (vapp_speed_set.getValue()) { me.fontSizeLeft(0, 0, 0, 0, normal, 0); @@ -2686,7 +2686,7 @@ var canvas_MCDU_base = { me["Simple_C3"].setText(" ---"); me["Simple_C5"].setText(" ---"); if (vapp_speed_set.getValue()) { - me["Simple_L5"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/vapp_appr"))); + me["Simple_L5"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/vapp_appr"))); me.fontLeft(0, 0, 0, 0, default, 0); me.fontSizeLeft(0, 0, 0, 0, normal, 0); } else { @@ -2754,7 +2754,7 @@ var canvas_MCDU_base = { pageSwitch[i].setBoolValue(1); } - if (getprop("FMGC/status/phase") == 6) { + if (getprop("/FMGC/status/phase") == 6) { me["Simple_Title"].setColor(0.0509,0.7529,0.2941); } else { me["Simple_Title"].setColor(1, 1, 1); @@ -2779,9 +2779,9 @@ var canvas_MCDU_base = { me["Simple_R5S"].setText("ENG OUT ACC"); if (zfwSet.getValue() == 1 and blockSet.getValue() == 1) { - me["Simple_C1"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/flap2_appr"))); - me["Simple_C2"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/slat_appr"))); - me["Simple_C3"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/clean_appr"))); + me["Simple_C1"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/flap2_appr"))); + me["Simple_C2"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/slat_appr"))); + me["Simple_C3"].setText(sprintf("%3.0f", getprop("/FMGC/internal/computed-speeds/clean_appr"))); } else { me["Simple_C1"].setText(" ---"); me["Simple_C2"].setText(" ---"); @@ -3371,12 +3371,12 @@ var canvas_MCDU_base = { } forindex (var item; myDeparture[i].arrowsMatrix[matrixArrow]) { if (item == 5) { - me["Simple_L6_Arrow"].setColor(getprop("MCDUC/colors/" ~ myDeparture[i].arrowsColour[0][5] ~ "/r"), getprop("MCDUC/colors/" ~ myDeparture[i].arrowsColour[0][5] ~ "/g"), getprop("MCDUC/colors/" ~ myDeparture[i].arrowsColour[0][5] ~ "/b")); + me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[0][5] ~ "/r"), getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[0][5] ~ "/g"), getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[0][5] ~ "/b")); continue; } if (myDeparture[i].arrowsMatrix[matrixArrow][item] == 1) { me["arrow" ~ (item + 1) ~ sign].show(); - me["arrow" ~ (item + 1) ~ sign].setColor(getprop("MCDUC/colors/" ~ myDeparture[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("MCDUC/colors/" ~ myDeparture[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("MCDUC/colors/" ~ myDeparture[i].arrowsColour[matrixArrow][item] ~ "/b")); + me["arrow" ~ (item + 1) ~ sign].setColor(getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("/MCDUC/colors/" ~ myDeparture[i].arrowsColour[matrixArrow][item] ~ "/b")); } else { me["arrow" ~ (item + 1) ~ sign].hide(); } @@ -4021,12 +4021,12 @@ var canvas_MCDU_base = { } forindex (var item; myArrival[i].arrowsMatrix[matrixArrow]) { if (item == 5) { - me["Simple_L6_Arrow"].setColor(getprop("MCDUC/colors/" ~ myArrival[i].arrowsColour[0][5] ~ "/r"), getprop("MCDUC/colors/" ~ myArrival[i].arrowsColour[0][5] ~ "/g"), getprop("MCDUC/colors/" ~ myArrival[i].arrowsColour[0][5] ~ "/b")); + me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[0][5] ~ "/r"), getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[0][5] ~ "/g"), getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[0][5] ~ "/b")); continue; } if (myArrival[i].arrowsMatrix[matrixArrow][item] == 1) { me["arrow" ~ (item + 1) ~ sign].show(); - me["arrow" ~ (item + 1) ~ sign].setColor(getprop("MCDUC/colors/" ~ myArrival[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("MCDUC/colors/" ~ myArrival[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("MCDUC/colors/" ~ myArrival[i].arrowsColour[matrixArrow][item] ~ "/b")); + me["arrow" ~ (item + 1) ~ sign].setColor(getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("/MCDUC/colors/" ~ myArrival[i].arrowsColour[matrixArrow][item] ~ "/b")); } else { me["arrow" ~ (item + 1) ~ sign].hide(); } @@ -4353,12 +4353,12 @@ var canvas_MCDU_base = { } forindex (var item; myHold[i].arrowsMatrix[matrixArrow]) { if (item == 5) { - me["Simple_L6_Arrow"].setColor(getprop("MCDUC/colors/" ~ myHold[i].arrowsColour[0][5] ~ "/r"), getprop("MCDUC/colors/" ~ myHold[i].arrowsColour[0][5] ~ "/g"), getprop("MCDUC/colors/" ~ myHold[i].arrowsColour[0][5] ~ "/b")); + me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[0][5] ~ "/r"), getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[0][5] ~ "/g"), getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[0][5] ~ "/b")); continue; } if (myHold[i].arrowsMatrix[matrixArrow][item] == 1) { me["arrow" ~ (item + 1) ~ sign].show(); - me["arrow" ~ (item + 1) ~ sign].setColor(getprop("MCDUC/colors/" ~ myHold[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("MCDUC/colors/" ~ myHold[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("MCDUC/colors/" ~ myHold[i].arrowsColour[matrixArrow][item] ~ "/b")); + me["arrow" ~ (item + 1) ~ sign].setColor(getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("/MCDUC/colors/" ~ myHold[i].arrowsColour[matrixArrow][item] ~ "/b")); } else { me["arrow" ~ (item + 1) ~ sign].hide(); } @@ -4676,7 +4676,7 @@ var canvas_MCDU_base = { if (myDirTo[i] != nil) { me["Simple_Title"].setText(sprintf("%s", myDirTo[i].title[0])); - me["Simple_Title"].setColor(getprop("MCDUC/colors/" ~ myDirTo[i].titleColour ~ "/r"), getprop("MCDUC/colors/" ~ myDirTo[i].titleColour ~ "/g"), getprop("MCDUC/colors/" ~ myDirTo[i].titleColour ~ "/b")); + me["Simple_Title"].setColor(getprop("/MCDUC/colors/" ~ myDirTo[i].titleColour ~ "/r"), getprop("/MCDUC/colors/" ~ myDirTo[i].titleColour ~ "/g"), getprop("/MCDUC/colors/" ~ myDirTo[i].titleColour ~ "/b")); forindex (var matrixArrow; myDirTo[i].arrowsMatrix) { if (matrixArrow == 0) { @@ -4688,7 +4688,7 @@ var canvas_MCDU_base = { if (item == 5) { continue; } if (myDirTo[i].arrowsMatrix[matrixArrow][item] == 1) { me["arrow" ~ (item + 1) ~ sign].show(); - me["arrow" ~ (item + 1) ~ sign].setColor(getprop("MCDUC/colors/" ~ myDirTo[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("MCDUC/colors/" ~ myDirTo[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("MCDUC/colors/" ~ myDirTo[i].arrowsColour[matrixArrow][item] ~ "/b")); + me["arrow" ~ (item + 1) ~ sign].setColor(getprop("/MCDUC/colors/" ~ myDirTo[i].arrowsColour[matrixArrow][item] ~ "/r"), getprop("/MCDUC/colors/" ~ myDirTo[i].arrowsColour[matrixArrow][item] ~ "/g"), getprop("/MCDUC/colors/" ~ myDirTo[i].arrowsColour[matrixArrow][item] ~ "/b")); } else { me["arrow" ~ (item + 1) ~ sign].hide(); } @@ -4916,162 +4916,162 @@ var canvas_MCDU_base = { # ack = ignore, wht = white, grn = green, blu = blue, amb = amber, yel = yellow, mag = magenta colorLeft: func(a, b, c, d, e, f) { if (a != "ack") { - me["Simple_L1"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b")); + me["Simple_L1"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b")); } if (b != "ack") { - me["Simple_L2"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b")); + me["Simple_L2"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b")); } if (c != "ack") { - me["Simple_L3"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b")); + me["Simple_L3"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b")); } if (d != "ack") { - me["Simple_L4"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b")); + me["Simple_L4"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b")); } if (e != "ack") { - me["Simple_L5"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b")); + me["Simple_L5"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b")); } if (f != "ack") { - me["Simple_L6"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b")); + me["Simple_L6"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b")); } }, colorLeftS: func(a, b, c, d, e, f) { if (a != "ack") { - me["Simple_L1S"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b")); + me["Simple_L1S"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b")); } if (b != "ack") { - me["Simple_L2S"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b")); + me["Simple_L2S"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b")); } if (c != "ack") { - me["Simple_L3S"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b")); + me["Simple_L3S"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b")); } if (d != "ack") { - me["Simple_L4S"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b")); + me["Simple_L4S"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b")); } if (e != "ack") { - me["Simple_L5S"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b")); + me["Simple_L5S"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b")); } if (f != "ack") { - me["Simple_L6S"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b")); + me["Simple_L6S"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b")); } }, colorLeftArrow: func(a, b, c, d, e, f) { if (a != "ack") { - me["Simple_L1_Arrow"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b")); + me["Simple_L1_Arrow"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b")); } if (b != "ack") { - me["Simple_L2_Arrow"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b")); + me["Simple_L2_Arrow"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b")); } if (c != "ack") { - me["Simple_L3_Arrow"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b")); + me["Simple_L3_Arrow"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b")); } if (d != "ack") { - me["Simple_L4_Arrow"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b")); + me["Simple_L4_Arrow"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b")); } if (e != "ack") { - me["Simple_L5_Arrow"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b")); + me["Simple_L5_Arrow"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b")); } if (f != "ack") { - me["Simple_L6_Arrow"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b")); + me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b")); } }, colorRight: func(a, b, c, d, e, f) { if (a != "ack") { - me["Simple_R1"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b")); + me["Simple_R1"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b")); } if (b != "ack") { - me["Simple_R2"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b")); + me["Simple_R2"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b")); } if (c != "ack") { - me["Simple_R3"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b")); + me["Simple_R3"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b")); } if (d != "ack") { - me["Simple_R4"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b")); + me["Simple_R4"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b")); } if (e != "ack") { - me["Simple_R5"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b")); + me["Simple_R5"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b")); } if (f != "ack") { - me["Simple_R6"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b")); + me["Simple_R6"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b")); } }, colorRightS: func(a, b, c, d, e, f) { if (a != "ack") { - me["Simple_R1S"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b")); + me["Simple_R1S"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b")); } if (b != "ack") { - me["Simple_R2S"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b")); + me["Simple_R2S"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b")); } if (c != "ack") { - me["Simple_R3S"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b")); + me["Simple_R3S"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b")); } if (d != "ack") { - me["Simple_R4S"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b")); + me["Simple_R4S"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b")); } if (e != "ack") { - me["Simple_R5S"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b")); + me["Simple_R5S"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b")); } if (f != "ack") { - me["Simple_R6S"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b")); + me["Simple_R6S"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b")); } }, colorRightArrow: func(a, b, c, d, e, f) { if (a != "ack") { - me["Simple_R1_Arrow"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b")); + me["Simple_R1_Arrow"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b")); } if (b != "ack") { - me["Simple_R2_Arrow"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b")); + me["Simple_R2_Arrow"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b")); } if (c != "ack") { - me["Simple_R3_Arrow"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b")); + me["Simple_R3_Arrow"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b")); } if (d != "ack") { - me["Simple_R4_Arrow"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b")); + me["Simple_R4_Arrow"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b")); } if (e != "ack") { - me["Simple_R5_Arrow"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b")); + me["Simple_R5_Arrow"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b")); } if (f != "ack") { - me["Simple_R6_Arrow"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b")); + me["Simple_R6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b")); } }, colorCenter: func(a, b, c, d, e, f) { if (a != "ack") { - me["Simple_C1"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b")); + me["Simple_C1"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b")); } if (b != "ack") { - me["Simple_C2"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b")); + me["Simple_C2"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b")); } if (c != "ack") { - me["Simple_C3"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b")); + me["Simple_C3"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b")); } if (d != "ack") { - me["Simple_C4"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b")); + me["Simple_C4"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b")); } if (e != "ack") { - me["Simple_C5"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b")); + me["Simple_C5"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b")); } if (f != "ack") { - me["Simple_C6"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b")); + me["Simple_C6"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b")); } }, colorCenterS: func(a, b, c, d, e, f) { if (a != "ack") { - me["Simple_C1S"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b")); + me["Simple_C1S"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b")); } if (b != "ack") { - me["Simple_C2S"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b")); + me["Simple_C2S"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b")); } if (c != "ack") { - me["Simple_C3S"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b")); + me["Simple_C3S"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b")); } if (d != "ack") { - me["Simple_C4S"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b")); + me["Simple_C4S"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b")); } if (e != "ack") { - me["Simple_C5S"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b")); + me["Simple_C5S"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b")); } if (f != "ack") { - me["Simple_C6S"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b")); + me["Simple_C6S"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b")); } }, # -1 = hide, 0 = ignore, 1 = show @@ -5696,4 +5696,4 @@ setlistener("/MCDU[0]/page", func { setlistener("/MCDU[1]/page", func { pageSwitch[1].setBoolValue(0); -}, 0, 0); \ No newline at end of file +}, 0, 0); diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 0e1d32ed..f15de027 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -17,125 +17,125 @@ var altTens = 0; var altPolarity = ""; # Fetch nodes: -var state1 = props.globals.getNode("systems/thrust/state1", 1); -var state2 = props.globals.getNode("systems/thrust/state2", 1); -var throttle_mode = props.globals.getNode("modes/pfd/fma/throttle-mode", 1); -var pitch_mode = props.globals.getNode("modes/pfd/fma/pitch-mode", 1); -var pitch_mode_armed = props.globals.getNode("modes/pfd/fma/pitch-mode-armed", 1); -var pitch_mode2_armed = props.globals.getNode("modes/pfd/fma/pitch-mode2-armed", 1); -var pitch_mode_armed_box = props.globals.getNode("modes/pfd/fma/pitch-mode-armed-box", 1); -var pitch_mode2_armed_box = props.globals.getNode("modes/pfd/fma/pitch-mode2-armed-box", 1); -var roll_mode = props.globals.getNode("modes/pfd/fma/roll-mode", 1); -var roll_mode_armed = props.globals.getNode("modes/pfd/fma/roll-mode-armed", 1); -var roll_mode_box = props.globals.getNode("modes/pfd/fma/roll-mode-box", 1); -var roll_mode_armed_box = props.globals.getNode("modes/pfd/fma/roll-mode-armed-box", 1); -var thr1 = props.globals.getNode("controls/engines/engine[0]/throttle-pos", 1); -var thr2 = props.globals.getNode("controls/engines/engine[1]/throttle-pos", 1); -var wow0 = props.globals.getNode("gear/gear[0]/wow"); -var wow1 = props.globals.getNode("gear/gear[1]/wow"); -var wow2 = props.globals.getNode("gear/gear[2]/wow"); -var pitch = props.globals.getNode("orientation/pitch-deg", 1); -var roll = props.globals.getNode("orientation/roll-deg", 1); -var elapsedtime = props.globals.getNode("sim/time/elapsed-sec", 1); -var acess = props.globals.getNode("systems/electrical/bus/ac-ess", 1); -var ac2 = props.globals.getNode("systems/electrical/bus/ac-2", 1); -var du1_lgt = props.globals.getNode("controls/lighting/DU/du1", 1); -var du6_lgt = props.globals.getNode("controls/lighting/DU/du6", 1); -var acconfig = props.globals.getNode("systems/acconfig/autoconfig-running", 1); -var acconfig_mismatch = props.globals.getNode("systems/acconfig/mismatch-code", 1); -var cpt_du_xfr = props.globals.getNode("modes/cpt-du-xfr", 1); -var fo_du_xfr = props.globals.getNode("modes/fo-du-xfr", 1); -var eng_out = props.globals.getNode("systems/thrust/eng-out", 1); -var eng0_state = props.globals.getNode("engines/engine[0]/state", 1); -var eng1_state = props.globals.getNode("engines/engine[1]/state", 1); -var alpha_floor = props.globals.getNode("systems/thrust/alpha-floor", 1); -var toga_lk = props.globals.getNode("systems/thrust/toga-lk", 1); -var thrust_limit = props.globals.getNode("controls/engines/thrust-limit", 1); -var flex = props.globals.getNode("FMGC/internal/flex", 1); -var lvr_clb = props.globals.getNode("systems/thrust/lvrclb", 1); -var throt_box = props.globals.getNode("modes/pfd/fma/throttle-mode-box", 1); -var pitch_box = props.globals.getNode("modes/pfd/fma/pitch-mode-box", 1); -var ap_box = props.globals.getNode("modes/pfd/fma/ap-mode-box", 1); -var fd_box = props.globals.getNode("modes/pfd/fma/fd-mode-box", 1); -var at_box = props.globals.getNode("modes/pfd/fma/athr-mode-box", 1); -var fbw_law = props.globals.getNode("it-fbw/law", 1); -var ap_mode = props.globals.getNode("modes/pfd/fma/ap-mode", 1); -var fd_mode = props.globals.getNode("modes/pfd/fma/fd-mode", 1); -var at_mode = props.globals.getNode("modes/pfd/fma/at-mode", 1); -var alt_std_mode = props.globals.getNode("modes/altimeter/std", 1); -var alt_inhg_mode = props.globals.getNode("modes/altimeter/inhg", 1); -var alt_hpa = props.globals.getNode("instrumentation/altimeter/setting-hpa", 1); -var alt_inhg = props.globals.getNode("instrumentation/altimeter/setting-inhg", 1); -var target_altitude = props.globals.getNode("autopilot/settings/target-altitude-ft", 1); -var altitude = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft", 1); -var altitude_pfd = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft-pfd", 1); -var trans_alt = props.globals.getNode("FMGC/internal/trans-alt", 1); -var alt_diff = props.globals.getNode("instrumentation/pfd/alt-diff", 1); -var ground_diff = props.globals.getNode("instrumentation/pfd/ground-diff", 1); -var landing_diff = props.globals.getNode("instrumentation/pfd/landing-diff", 1); -var ap_alt = props.globals.getNode("it-autoflight/internal/alt", 1); -var alt_agl = props.globals.getNode("position/altitude-agl-ft", 1); -var vs_needle = props.globals.getNode("instrumentation/pfd/vs-needle", 1); -var vs_digit = props.globals.getNode("instrumentation/pfd/vs-digit-trans", 1); -var ap_vs_pfd = props.globals.getNode("it-autoflight/internal/vert-speed-fpm-pfd", 1); -var athr_arm = props.globals.getNode("modes/pfd/fma/athr-armed", 1); -var FMGC_max_spd = props.globals.getNode("FMGC/internal/maxspeed", 1); -var ind_spd_kt = props.globals.getNode("instrumentation/airspeed-indicator/indicated-speed-kt", 1); -var ind_spd_mach = props.globals.getNode("instrumentation/airspeed-indicator/indicated-mach", 1); -var at_mach_mode = props.globals.getNode("it-autoflight/input/kts-mach", 1); -var at_input_spd_mach = props.globals.getNode("it-autoflight/input/spd-mach", 1); -var at_input_spd_kts = props.globals.getNode("it-autoflight/input/spd-kts", 1); -var fd_roll = props.globals.getNode("it-autoflight/fd/roll-bar", 1); -var fd_pitch = props.globals.getNode("it-autoflight/fd/pitch-bar", 1); -var decision = props.globals.getNode("instrumentation/mk-viii/inputs/arinc429/decision-height", 1); -var slip_skid = props.globals.getNode("instrumentation/pfd/slip-skid", 1); -var FMGCphase = props.globals.getNode("FMGC/status/phase", 1); -var loc = props.globals.getNode("instrumentation/nav[0]/heading-needle-deflection-norm", 1); -var gs = props.globals.getNode("instrumentation/nav[0]/gs-needle-deflection-norm", 1); -var show_hdg = props.globals.getNode("it-autoflight/custom/show-hdg", 1); -var ap_hdg = props.globals.getNode("it-autoflight/input/hdg", 1); -var ap_trk_sw = props.globals.getNode("it-autoflight/custom/trk-fpa", 1); -var ap_ils_mode = props.globals.getNode("modes/pfd/ILS1", 1); -var ap_ils_mode2 = props.globals.getNode("modes/pfd/ILS2", 1); -var loc_in_range = props.globals.getNode("instrumentation/nav[0]/in-range", 1); -var gs_in_range = props.globals.getNode("instrumentation/nav[0]/gs-in-range", 1); -var nav0_signalq = props.globals.getNode("instrumentation/nav[0]/signal-quality-norm", 1); -var hasloc = props.globals.getNode("instrumentation/nav[0]/nav-loc", 1); -var hasgs = props.globals.getNode("instrumentation/nav[0]/has-gs", 1); -var pfdrate = props.globals.getNode("systems/acconfig/options/pfd-rate", 1); -var managed_spd = props.globals.getNode("it-autoflight/input/spd-managed", 1); -var at_tgt_ias = props.globals.getNode("FMGC/internal/target-ias-pfd", 1); -var ap1 = props.globals.getNode("it-autoflight/output/ap1", 1); -var ap2 = props.globals.getNode("it-autoflight/output/ap2", 1); -var fd1 = props.globals.getNode("it-autoflight/output/fd1", 1); -var fd2 = props.globals.getNode("it-autoflight/output/fd2", 1); -var athr = props.globals.getNode("it-autoflight/output/athr", 1); -var gear_agl = props.globals.getNode("position/gear-agl-ft", 1); -var aileron_input = props.globals.getNode("controls/flight/aileron-input-fast", 1); -var elevator_input = props.globals.getNode("controls/flight/elevator-input-fast", 1); -var att_switch = props.globals.getNode("controls/switching/ATTHDG", 1); -var air_switch = props.globals.getNode("controls/switching/AIRDATA", 1); -var appr_enabled = props.globals.getNode("it-autoflight/output/appr-armed/", 1); -var loc_enabled = props.globals.getNode("it-autoflight/output/loc-armed/", 1); -var vert_gs = props.globals.getNode("it-autoflight/output/vert/", 1); -var vert_state = props.globals.getNode("it-autoflight/output/vert/", 1); -var ils_data1 = props.globals.getNode("FMGC/internal/ils1-mcdu/", 1); +var state1 = props.globals.getNode("/systems/thrust/state1", 1); +var state2 = props.globals.getNode("/systems/thrust/state2", 1); +var throttle_mode = props.globals.getNode("/modes/pfd/fma/throttle-mode", 1); +var pitch_mode = props.globals.getNode("/modes/pfd/fma/pitch-mode", 1); +var pitch_mode_armed = props.globals.getNode("/modes/pfd/fma/pitch-mode-armed", 1); +var pitch_mode2_armed = props.globals.getNode("/modes/pfd/fma/pitch-mode2-armed", 1); +var pitch_mode_armed_box = props.globals.getNode("/modes/pfd/fma/pitch-mode-armed-box", 1); +var pitch_mode2_armed_box = props.globals.getNode("/modes/pfd/fma/pitch-mode2-armed-box", 1); +var roll_mode = props.globals.getNode("/modes/pfd/fma/roll-mode", 1); +var roll_mode_armed = props.globals.getNode("/modes/pfd/fma/roll-mode-armed", 1); +var roll_mode_box = props.globals.getNode("/modes/pfd/fma/roll-mode-box", 1); +var roll_mode_armed_box = props.globals.getNode("/modes/pfd/fma/roll-mode-armed-box", 1); +var thr1 = props.globals.getNode("/controls/engines/engine[0]/throttle-pos", 1); +var thr2 = props.globals.getNode("/controls/engines/engine[1]/throttle-pos", 1); +var wow0 = props.globals.getNode("/gear/gear[0]/wow"); +var wow1 = props.globals.getNode("/gear/gear[1]/wow"); +var wow2 = props.globals.getNode("/gear/gear[2]/wow"); +var pitch = props.globals.getNode("/orientation/pitch-deg", 1); +var roll = props.globals.getNode("/orientation/roll-deg", 1); +var elapsedtime = props.globals.getNode("/sim/time/elapsed-sec", 1); +var acess = props.globals.getNode("/systems/electrical/bus/ac-ess", 1); +var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1); +var du1_lgt = props.globals.getNode("/controls/lighting/DU/du1", 1); +var du6_lgt = props.globals.getNode("/controls/lighting/DU/du6", 1); +var acconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1); +var acconfig_mismatch = props.globals.getNode("/systems/acconfig/mismatch-code", 1); +var cpt_du_xfr = props.globals.getNode("/modes/cpt-du-xfr", 1); +var fo_du_xfr = props.globals.getNode("/modes/fo-du-xfr", 1); +var eng_out = props.globals.getNode("/systems/thrust/eng-out", 1); +var eng0_state = props.globals.getNode("/engines/engine[0]/state", 1); +var eng1_state = props.globals.getNode("/engines/engine[1]/state", 1); +var alpha_floor = props.globals.getNode("/systems/thrust/alpha-floor", 1); +var toga_lk = props.globals.getNode("/systems/thrust/toga-lk", 1); +var thrust_limit = props.globals.getNode("/controls/engines/thrust-limit", 1); +var flex = props.globals.getNode("/FMGC/internal/flex", 1); +var lvr_clb = props.globals.getNode("/systems/thrust/lvrclb", 1); +var throt_box = props.globals.getNode("/modes/pfd/fma/throttle-mode-box", 1); +var pitch_box = props.globals.getNode("/modes/pfd/fma/pitch-mode-box", 1); +var ap_box = props.globals.getNode("/modes/pfd/fma/ap-mode-box", 1); +var fd_box = props.globals.getNode("/modes/pfd/fma/fd-mode-box", 1); +var at_box = props.globals.getNode("/modes/pfd/fma/athr-mode-box", 1); +var fbw_law = props.globals.getNode("/it-fbw/law", 1); +var ap_mode = props.globals.getNode("/modes/pfd/fma/ap-mode", 1); +var fd_mode = props.globals.getNode("/modes/pfd/fma/fd-mode", 1); +var at_mode = props.globals.getNode("/modes/pfd/fma/at-mode", 1); +var alt_std_mode = props.globals.getNode("/instrumentation/altimeter/std", 1); +var alt_inhg_mode = props.globals.getNode("/instrumentation/altimeter/inhg", 1); +var alt_hpa = props.globals.getNode("/instrumentation/altimeter/setting-hpa", 1); +var alt_inhg = props.globals.getNode("/instrumentation/altimeter/setting-inhg", 1); +var target_altitude = props.globals.getNode("/autopilot/settings/target-altitude-ft", 1); +var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1); +var altitude_pfd = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft-pfd", 1); +var trans_alt = props.globals.getNode("/FMGC/internal/trans-alt", 1); +var alt_diff = props.globals.getNode("/instrumentation/pfd/alt-diff", 1); +var ground_diff = props.globals.getNode("/instrumentation/pfd/ground-diff", 1); +var landing_diff = props.globals.getNode("/instrumentation/pfd/landing-diff", 1); +var ap_alt = props.globals.getNode("/it-autoflight/internal/alt", 1); +var alt_agl = props.globals.getNode("/position/altitude-agl-ft", 1); +var vs_needle = props.globals.getNode("/instrumentation/pfd/vs-needle", 1); +var vs_digit = props.globals.getNode("/instrumentation/pfd/vs-digit-trans", 1); +var ap_vs_pfd = props.globals.getNode("/it-autoflight/internal/vert-speed-fpm-pfd", 1); +var athr_arm = props.globals.getNode("/modes/pfd/fma/athr-armed", 1); +var FMGC_max_spd = props.globals.getNode("/FMGC/internal/maxspeed", 1); +var ind_spd_kt = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1); +var ind_spd_mach = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1); +var at_mach_mode = props.globals.getNode("/it-autoflight/input/kts-mach", 1); +var at_input_spd_mach = props.globals.getNode("/it-autoflight/input/spd-mach", 1); +var at_input_spd_kts = props.globals.getNode("/it-autoflight/input/spd-kts", 1); +var fd_roll = props.globals.getNode("/it-autoflight/fd/roll-bar", 1); +var fd_pitch = props.globals.getNode("/it-autoflight/fd/pitch-bar", 1); +var decision = props.globals.getNode("/instrumentation/mk-viii/inputs/arinc429/decision-height", 1); +var slip_skid = props.globals.getNode("/instrumentation/pfd/slip-skid", 1); +var FMGCphase = props.globals.getNode("/FMGC/status/phase", 1); +var loc = props.globals.getNode("/instrumentation/nav[0]/heading-needle-deflection-norm", 1); +var gs = props.globals.getNode("/instrumentation/nav[0]/gs-needle-deflection-norm", 1); +var show_hdg = props.globals.getNode("/it-autoflight/custom/show-hdg", 1); +var ap_hdg = props.globals.getNode("/it-autoflight/input/hdg", 1); +var ap_trk_sw = props.globals.getNode("/it-autoflight/custom/trk-fpa", 1); +var ap_ils_mode = props.globals.getNode("/modes/pfd/ILS1", 1); +var ap_ils_mode2 = props.globals.getNode("/modes/pfd/ILS2", 1); +var loc_in_range = props.globals.getNode("/instrumentation/nav[0]/in-range", 1); +var gs_in_range = props.globals.getNode("/instrumentation/nav[0]/gs-in-range", 1); +var nav0_signalq = props.globals.getNode("/instrumentation/nav[0]/signal-quality-norm", 1); +var hasloc = props.globals.getNode("/instrumentation/nav[0]/nav-loc", 1); +var hasgs = props.globals.getNode("/instrumentation/nav[0]/has-gs", 1); +var pfdrate = props.globals.getNode("/systems/acconfig/options/pfd-rate", 1); +var managed_spd = props.globals.getNode("/it-autoflight/input/spd-managed", 1); +var at_tgt_ias = props.globals.getNode("/FMGC/internal/target-ias-pfd", 1); +var ap1 = props.globals.getNode("/it-autoflight/output/ap1", 1); +var ap2 = props.globals.getNode("/it-autoflight/output/ap2", 1); +var fd1 = props.globals.getNode("/it-autoflight/output/fd1", 1); +var fd2 = props.globals.getNode("/it-autoflight/output/fd2", 1); +var athr = props.globals.getNode("/it-autoflight/output/athr", 1); +var gear_agl = props.globals.getNode("/position/gear-agl-ft", 1); +var aileron_input = props.globals.getNode("/controls/flight/aileron-input-fast", 1); +var elevator_input = props.globals.getNode("/controls/flight/elevator-input-fast", 1); +var att_switch = props.globals.getNode("/controls/switching/ATTHDG", 1); +var air_switch = props.globals.getNode("/controls/switching/AIRDATA", 1); +var appr_enabled = props.globals.getNode("/it-autoflight/output/appr-armed/", 1); +var loc_enabled = props.globals.getNode("/it-autoflight/output/loc-armed/", 1); +var vert_gs = props.globals.getNode("/it-autoflight/output/vert/", 1); +var vert_state = props.globals.getNode("/it-autoflight/output/vert/", 1); +var ils_data1 = props.globals.getNode("/FMGC/internal/ils1-mcdu/", 1); # Independent MCDU ILS not implemented yet, use MCDU1 in the meantime -# var ils_data2 = props.globals.getNode("FMGC/internal/ils2-mcdu/", 1); -var dme_in_range = props.globals.getNode("instrumentation/nav[0]/dme-in-range", 1); -var dme_data = props.globals.getNode("instrumentation/dme[0]/indicated-distance-nm", 1); -var ils_crs = props.globals.getNode("instrumentation/nav[0]/radials/selected-deg", 1); -var ils1_crs_set = props.globals.getNode("FMGC/internal/ils1crs-set/", 1); -var outer_marker = props.globals.getNode("instrumentation/marker-beacon/outer", 1); -var middle_marker = props.globals.getNode("instrumentation/marker-beacon/middle", 1); -var inner_marker = props.globals.getNode("instrumentation/marker-beacon/inner", 1); -var v1 = props.globals.getNode("FMGC/internal/v1", 1); -var v1_set = props.globals.getNode("FMGC/internal/v1-set", 1); -var vr = props.globals.getNode("FMGC/internal/vr", 1); -var vr_set = props.globals.getNode("FMGC/internal/vr-set", 1); -var v2 = props.globals.getNode("FMGC/internal/v2", 1); -var v2_set = props.globals.getNode("FMGC/internal/v2-set", 1); -var flap_config = props.globals.getNode("controls/flight/flap-lever", 1); +# var ils_data2 = props.globals.getNode("/FMGC/internal/ils2-mcdu/", 1); +var dme_in_range = props.globals.getNode("/instrumentation/nav[0]/dme-in-range", 1); +var dme_data = props.globals.getNode("/instrumentation/dme[0]/indicated-distance-nm", 1); +var ils_crs = props.globals.getNode("/instrumentation/nav[0]/radials/selected-deg", 1); +var ils1_crs_set = props.globals.getNode("/FMGC/internal/ils1crs-set/", 1); +var outer_marker = props.globals.getNode("/instrumentation/marker-beacon/outer", 1); +var middle_marker = props.globals.getNode("/instrumentation/marker-beacon/middle", 1); +var inner_marker = props.globals.getNode("/instrumentation/marker-beacon/inner", 1); +var v1 = props.globals.getNode("/FMGC/internal/v1", 1); +var v1_set = props.globals.getNode("/FMGC/internal/v1-set", 1); +var vr = props.globals.getNode("/FMGC/internal/vr", 1); +var vr_set = props.globals.getNode("/FMGC/internal/vr-set", 1); +var v2 = props.globals.getNode("/FMGC/internal/v2", 1); +var v2_set = props.globals.getNode("/FMGC/internal/v2-set", 1); +var flap_config = props.globals.getNode("/controls/flight/flap-lever", 1); var hundredAbove = props.globals.getNode("/instrumentation/pfd/hundred-above", 1); var minimum = props.globals.getNode("/instrumentation/pfd/minimums", 1); @@ -782,33 +782,33 @@ var canvas_PFD_base = { if (gear_agl_cur <= 2500) { me["AI_agl"].show(); me["FMA_dh_box"].hide(); #not implemented - if (int(getprop("FMGC/internal/radio")) != 99999) { + if (int(getprop("/FMGC/internal/radio")) != 99999) { me["FMA_dh"].setText("RADIO"); me["FMA_dh"].show(); - me["FMA_dhn"].setText(sprintf("%.0f", getprop("FMGC/internal/radio"))); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/radio"))); me["FMA_dhn"].show(); me["FMA_nodh"].hide(); - hundredAbove.setValue(getprop("FMGC/internal/radio") + 100); - minimum.setValue(getprop("FMGC/internal/radio")); - if (gear_agl_cur <= getprop("FMGC/internal/radio") + 100) { + hundredAbove.setValue(getprop("/FMGC/internal/radio") + 100); + minimum.setValue(getprop("/FMGC/internal/radio")); + if (gear_agl_cur <= getprop("/FMGC/internal/radio") + 100) { me["AI_agl"].setColor(0.7333,0.3803,0); } else { me["AI_agl"].setColor(0.0509,0.7529,0.2941); } - } else if (int(getprop("FMGC/internal/baro")) != 99999) { + } else if (int(getprop("/FMGC/internal/baro")) != 99999) { me["FMA_dh"].setText("BARO"); me["FMA_dh"].show(); - me["FMA_dhn"].setText(sprintf("%.0f", getprop("FMGC/internal/baro"))); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/baro"))); me["FMA_dhn"].show(); me["FMA_nodh"].hide(); - hundredAbove.setValue(getprop("FMGC/internal/baro") + 100); - minimum.setValue(getprop("FMGC/internal/baro")); - if (gear_agl_cur <= getprop("FMGC/internal/baro") + 100) { + hundredAbove.setValue(getprop("/FMGC/internal/baro") + 100); + minimum.setValue(getprop("/FMGC/internal/baro")); + if (gear_agl_cur <= getprop("/FMGC/internal/baro") + 100) { me["AI_agl"].setColor(0.7333,0.3803,0); } else { me["AI_agl"].setColor(0.0509,0.7529,0.2941); } - } else if (getprop("FMGC/internal/radio-no")) { + } else if (getprop("/FMGC/internal/radio-no")) { me["FMA_dh"].setText("BARO"); me["FMA_dh"].show(); me["FMA_dhn"].setText("100"); @@ -837,19 +837,19 @@ var canvas_PFD_base = { me["AI_agl"].hide(); me["FMA_nodh"].hide(); me["FMA_dh_box"].hide(); #not implemented - if (int(getprop("FMGC/internal/radio")) != 99999) { + if (int(getprop("/FMGC/internal/radio")) != 99999) { me["FMA_dh"].setText("RADIO"); me["FMA_dh"].show(); - me["FMA_dhn"].setText(sprintf("%.0f", getprop("FMGC/internal/radio"))); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/radio"))); me["FMA_dhn"].show(); me["FMA_nodh"].hide(); - } else if (int(getprop("FMGC/internal/baro")) != 99999) { + } else if (int(getprop("/FMGC/internal/baro")) != 99999) { me["FMA_dh"].setText("BARO"); me["FMA_dh"].show(); - me["FMA_dhn"].setText(sprintf("%.0f", getprop("FMGC/internal/baro"))); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/baro"))); me["FMA_dhn"].show(); me["FMA_nodh"].hide(); - } else if (getprop("FMGC/internal/radio-no")) { + } else if (getprop("/FMGC/internal/radio-no")) { me["FMA_dh"].setText("BARO"); me["FMA_dh"].show(); me["FMA_dhn"].setText("100"); @@ -1206,8 +1206,8 @@ var canvas_PFD_1 = { me["ASI_scale"].setTranslation(0, me.ASI * 6.6); me["ASI_max"].setTranslation(0, me.ASImax * -6.6); - if (!getprop("FMGC/status/to-state") and FMGCphase.getValue() >= 1 and !wow1.getValue() and !wow2.getValue()) { - me.FMGC_vls = getprop("FMGC/internal/computed-speeds/vls_min"); + if (!getprop("/FMGC/status/to-state") and FMGCphase.getValue() >= 1 and !wow1.getValue() and !wow2.getValue()) { + me.FMGC_vls = getprop("/FMGC/internal/computed-speeds/vls_min"); if (me.FMGC_vls <= 30) { me.VLSmin = 0 - me.ASI; } else if (me.FMGC_vls >= 420) { @@ -1215,7 +1215,7 @@ var canvas_PFD_1 = { } else { me.VLSmin = me.FMGC_vls - 30 - me.ASI; } - me.FMGC_prot = getprop("FMGC/internal/computed-speeds/alpha_prot"); + me.FMGC_prot = getprop("/FMGC/internal/computed-speeds/alpha_prot"); if (me.FMGC_prot <= 30) { me.ALPHAprot = 0 - me.ASI; } else if (me.FMGC_prot >= 420) { @@ -1223,7 +1223,7 @@ var canvas_PFD_1 = { } else { me.ALPHAprot = me.FMGC_prot - 30 - me.ASI; } - me.FMGC_max = getprop("FMGC/internal/computed-speeds/alpha_max"); + me.FMGC_max = getprop("/FMGC/internal/computed-speeds/alpha_max"); if (me.FMGC_max <= 30) { me.ALPHAmax = 0 - me.ASI; } else if (me.FMGC_max >= 420) { @@ -1231,7 +1231,7 @@ var canvas_PFD_1 = { } else { me.ALPHAmax = me.FMGC_max - 30 - me.ASI; } - me.FMGC_vsw = getprop("FMGC/internal/computed-speeds/vsw"); + me.FMGC_vsw = getprop("/FMGC/internal/computed-speeds/vsw"); if (me.FMGC_vsw <= 30) { me.ALPHAvsw = 0 - me.ASI; } else if (me.FMGC_vsw >= 420) { @@ -1244,7 +1244,7 @@ var canvas_PFD_1 = { me["ALPHA_PROT"].setTranslation(0, me.ALPHAprot * -6.6); me["ALPHA_MAX"].setTranslation(0, me.ALPHAmax * -6.6); me["ALPHA_SW"].setTranslation(0, me.ALPHAvsw * -6.6); - if (getprop("it-fbw/law") == 0) { + if (getprop("/it-fbw/law") == 0) { me["ALPHA_PROT"].show(); me["ALPHA_MAX"].show(); me["ALPHA_SW"].hide(); @@ -1256,12 +1256,12 @@ var canvas_PFD_1 = { } if (managed_spd.getValue() == 1) { - if (getprop("FMGC/internal/decel") == 1) { - vapp = getprop("FMGC/internal/computed-speeds/vapp"); + if (getprop("/FMGC/internal/decel") == 1) { + vapp = getprop("/FMGC/internal/computed-speeds/vapp"); tgt_ias = vapp; tgt_kts = vapp; } else if (FMGCphase.getValue() == 6) { - vapp = getprop("FMGC/internal/computed-speeds/clean"); + vapp = getprop("/FMGC/internal/computed-speeds/clean"); tgt_ias = clean; tgt_kts = clean; } else { @@ -1409,7 +1409,7 @@ var canvas_PFD_1 = { me["F_target"].hide(); me["clean_speed"].hide(); - tgt_S = getprop("FMGC/internal/computed-speeds/slat"); + tgt_S = getprop("/FMGC/internal/computed-speeds/slat"); if (tgt_S <= 30) { me.Strgt = 0 - me.ASI; @@ -1443,7 +1443,7 @@ var canvas_PFD_1 = { me["S_target"].hide(); me["clean_speed"].hide(); - tgt_F = getprop("FMGC/internal/computed-speeds/flap2"); + tgt_F = getprop("/FMGC/internal/computed-speeds/flap2"); if (tgt_F <= 30) { me.Ftrgt = 0 - me.ASI; @@ -1477,7 +1477,7 @@ var canvas_PFD_1 = { me["S_target"].hide(); me["clean_speed"].hide(); - tgt_F = getprop("FMGC/internal/computed-speeds/flap3"); + tgt_F = getprop("/FMGC/internal/computed-speeds/flap3"); if (tgt_F <= 30) { me.Ftrgt = 0 - me.ASI; @@ -1516,7 +1516,7 @@ var canvas_PFD_1 = { me["S_target"].hide(); me["F_target"].hide(); - tgt_clean = getprop("FMGC/internal/computed-speeds/clean"); + tgt_clean = getprop("/FMGC/internal/computed-speeds/clean"); me.cleantrgt = tgt_clean - 30 - me.ASI; me.SPDcleantrgtdiff = tgt_clean - ind_spd; @@ -1692,13 +1692,13 @@ var canvas_PFD_1 = { me["ground"].hide(); } - if (!getprop("ECAM/alt-alert-flash") and !getprop("ECAM/alt-alert-steady")) { + if (!getprop("/ECAM/alt-alert-flash") and !getprop("/ECAM/alt-alert-steady")) { alt_going1 = 0; amber_going1 = 0; me["ALT_box_flash"].hide(); me["ALT_box_amber"].hide(); } else { - if (getprop("ECAM/alt-alert-flash")) { + if (getprop("/ECAM/alt-alert-flash")) { if (alt_going1 == 1) { me["ALT_box_flash"].hide(); altTimer1.stop(); @@ -1716,7 +1716,7 @@ var canvas_PFD_1 = { } else { me["ALT_box_amber"].show(); } - } elsif (getprop("ECAM/alt-alert-steady")) { + } elsif (getprop("/ECAM/alt-alert-steady")) { if (amber_going1 == 1) { me["ALT_box"].show(); me["ALT_box_amber"].hide(); @@ -1944,8 +1944,8 @@ var canvas_PFD_2 = { me["ASI_scale"].setTranslation(0, me.ASI * 6.6); me["ASI_max"].setTranslation(0, me.ASImax * -6.6); - if (!getprop("FMGC/status/to-state") and FMGCphase.getValue() >= 1 and !wow1.getValue() and !wow2.getValue()) { - me.FMGC_vls = getprop("FMGC/internal/computed-speeds/vls_min"); + if (!getprop("/FMGC/status/to-state") and FMGCphase.getValue() >= 1 and !wow1.getValue() and !wow2.getValue()) { + me.FMGC_vls = getprop("/FMGC/internal/computed-speeds/vls_min"); if (me.FMGC_vls <= 30) { me.VLSmin = 0 - me.ASI; } else if (me.FMGC_vls >= 420) { @@ -1953,7 +1953,7 @@ var canvas_PFD_2 = { } else { me.VLSmin = me.FMGC_vls - 30 - me.ASI; } - me.FMGC_prot = getprop("FMGC/internal/computed-speeds/alpha_prot"); + me.FMGC_prot = getprop("/FMGC/internal/computed-speeds/alpha_prot"); if (me.FMGC_prot <= 30) { me.ALPHAprot = 0 - me.ASI; } else if (me.FMGC_prot >= 420) { @@ -1961,7 +1961,7 @@ var canvas_PFD_2 = { } else { me.ALPHAprot = me.FMGC_prot - 30 - me.ASI; } - me.FMGC_max = getprop("FMGC/internal/computed-speeds/alpha_max"); + me.FMGC_max = getprop("/FMGC/internal/computed-speeds/alpha_max"); if (me.FMGC_max <= 30) { me.ALPHAmax = 0 - me.ASI; } else if (me.FMGC_max >= 420) { @@ -1969,7 +1969,7 @@ var canvas_PFD_2 = { } else { me.ALPHAmax = me.FMGC_max - 30 - me.ASI; } - me.FMGC_vsw = getprop("FMGC/internal/computed-speeds/vsw"); + me.FMGC_vsw = getprop("/FMGC/internal/computed-speeds/vsw"); if (me.FMGC_vsw <= 30) { me.ALPHAvsw = 0 - me.ASI; } else if (me.FMGC_vsw >= 420) { @@ -1982,7 +1982,7 @@ var canvas_PFD_2 = { me["ALPHA_PROT"].setTranslation(0, me.ALPHAprot * -6.6); me["ALPHA_MAX"].setTranslation(0, me.ALPHAmax * -6.6); me["ALPHA_SW"].setTranslation(0, me.ALPHAvsw * -6.6); - if (getprop("it-fbw/law") == 0) { + if (getprop("/it-fbw/law") == 0) { me["ALPHA_PROT"].show(); me["ALPHA_MAX"].show(); me["ALPHA_SW"].hide(); @@ -1994,12 +1994,12 @@ var canvas_PFD_2 = { } if (managed_spd.getValue() == 1) { - if (getprop("FMGC/internal/decel") == 1) { - vapp = getprop("FMGC/internal/computed-speeds/vapp"); + if (getprop("/FMGC/internal/decel") == 1) { + vapp = getprop("/FMGC/internal/computed-speeds/vapp"); tgt_ias = vapp; tgt_kts = vapp; } else if (FMGCphase.getValue() == 6) { - clean = getprop("FMGC/internal/computed-speeds/clean"); + clean = getprop("/FMGC/internal/computed-speeds/clean"); tgt_ias = clean; tgt_kts = clean; } else { @@ -2148,7 +2148,7 @@ var canvas_PFD_2 = { me["F_target"].hide(); me["clean_speed"].hide(); - tgt_S = tgt_S = getprop("FMGC/internal/computed-speeds/slat"); + tgt_S = tgt_S = getprop("/FMGC/internal/computed-speeds/slat"); if (tgt_S <= 30) { me.Strgt = 0 - me.ASI; @@ -2182,7 +2182,7 @@ var canvas_PFD_2 = { me["S_target"].hide(); me["clean_speed"].hide(); - tgt_F = tgt_S = getprop("FMGC/internal/computed-speeds/flap2"); + tgt_F = tgt_S = getprop("/FMGC/internal/computed-speeds/flap2"); if (tgt_F <= 30) { me.Ftrgt = 0 - me.ASI; @@ -2216,7 +2216,7 @@ var canvas_PFD_2 = { me["S_target"].hide(); me["clean_speed"].hide(); - tgt_F = tgt_S = getprop("FMGC/internal/computed-speeds/flap3"); + tgt_F = tgt_S = getprop("/FMGC/internal/computed-speeds/flap3"); if (tgt_F <= 30) { me.Ftrgt = 0 - me.ASI; @@ -2255,7 +2255,7 @@ var canvas_PFD_2 = { me["S_target"].hide(); me["F_target"].hide(); - tgt_clean = tgt_S = getprop("FMGC/internal/computed-speeds/clean"); + tgt_clean = tgt_S = getprop("/FMGC/internal/computed-speeds/clean"); me.cleantrgt = tgt_clean - 30 - me.ASI; me.SPDcleantrgtdiff = tgt_clean - ind_spd; @@ -2430,13 +2430,13 @@ var canvas_PFD_2 = { me["ground"].hide(); } - if (!getprop("ECAM/alt-alert-flash") and !getprop("ECAM/alt-alert-steady")) { + if (!getprop("/ECAM/alt-alert-flash") and !getprop("/ECAM/alt-alert-steady")) { alt_going2 = 0; amber_going2 = 0; me["ALT_box_flash"].hide(); me["ALT_box_amber"].hide(); } else { - if (getprop("ECAM/alt-alert-flash")) { + if (getprop("/ECAM/alt-alert-flash")) { if (alt_going2 == 1) { me["ALT_box_flash"].hide(); altTimer2.stop(); @@ -2454,7 +2454,7 @@ var canvas_PFD_2 = { } else { me["ALT_box_amber"].hide(); } - } elsif (getprop("ECAM/alt-alert-steady")) { + } elsif (getprop("/ECAM/alt-alert-steady")) { if (amber_going2 == 1) { me["ALT_box"].show(); me["ALT_box_amber"].hide(); @@ -2798,4 +2798,3 @@ var dhTimer = maketimer(0.50, func { dh_count = dh_count + 1; } }); - diff --git a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas index 97355f0a..22e7eef3 100644 --- a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas +++ b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas @@ -34,70 +34,70 @@ var du3_test_amount = props.globals.initNode("/instrumentation/du/du3-test-amoun var du3_offtime = props.globals.initNode("/instrumentation/du/du3-off-time", 0.0, "DOUBLE"); # Fetch nodes: -var acconfig_weight_kgs = props.globals.getNode("systems/acconfig/options/weight-kgs", 1); -var et = props.globals.getNode("sim/time/elapsed-sec", 1); -var acconfig = props.globals.getNode("systems/acconfig/autoconfig-running", 1); -var acess = props.globals.getNode("systems/electrical/bus/ac-ess", 1); -var eng_option = props.globals.getNode("options/eng", 1); -var du3_lgt = props.globals.getNode("controls/lighting/DU/du3", 1); -var rev_1 = props.globals.getNode("engines/engine[0]/reverser-pos-norm", 1); -var rev_2 = props.globals.getNode("engines/engine[1]/reverser-pos-norm", 1); -var eng1_n1mode = props.globals.getNode("systems/fadec/eng1/n1", 1); -var eng1_eprmode = props.globals.getNode("systems/fadec/eng1/epr", 1); -var eng2_n1mode = props.globals.getNode("systems/fadec/eng2/n1", 1); -var eng2_eprmode = props.globals.getNode("systems/fadec/eng2/epr", 1); -var eng1_n2mode = props.globals.getNode("systems/fadec/eng1/n2", 1); -var eng2_n2mode = props.globals.getNode("systems/fadec/eng2/n2", 1); -var flap_text = props.globals.getNode("controls/flight/flap-txt", 1); -var flap_pos = props.globals.getNode("controls/flight/flap-pos", 1); -var fuel = props.globals.getNode("consumables/fuel/total-fuel-lbs", 1); -var modeautobrake = props.globals.getNode("controls/autobrake/mode", 1); -var speedbrakearm = props.globals.getNode("controls/flight/speedbrake-arm", 1); -var ECAMtoconfig = props.globals.getNode("ECAM/to-config", 1); -var gear = props.globals.getNode("gear/gear[1]/position-norm", 1); -var smoke = props.globals.getNode("controls/lighting/no-smoking-sign", 1); -var seatbelt = props.globals.getNode("controls/lighting/seatbelt-sign", 1); -var flaps3_ovr = props.globals.getNode("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 1); -var wow0 = props.globals.getNode("gear/gear[0]/wow"); -var eng1_n1 = props.globals.getNode("engines/engine[0]/n1-actual", 1); -var eng2_n1 = props.globals.getNode("engines/engine[1]/n1-actual", 1); -var eng1_n2 = props.globals.getNode("engines/engine[0]/n2-actual", 1); -var eng2_n2 = props.globals.getNode("engines/engine[1]/n2-actual", 1); -var eng1_epr = props.globals.getNode("engines/engine[0]/epr-actual", 1); -var eng2_epr = props.globals.getNode("engines/engine[1]/epr-actual", 1); -var eng1_egt = props.globals.getNode("engines/engine[0]/egt-actual", 1); -var eng2_egt = props.globals.getNode("engines/engine[1]/egt-actual", 1); -var eng1_egtmode = props.globals.getNode("systems/fadec/eng1/egt", 1); -var eng2_egtmode = props.globals.getNode("systems/fadec/eng2/egt", 1); -var eng1_ffmode = props.globals.getNode("systems/fadec/eng1/ff", 1); -var eng2_ffmode = props.globals.getNode("systems/fadec/eng2/ff", 1); -var fadecpower_1 = props.globals.getNode("systems/fadec/powered1", 1); -var fadecpower_2 = props.globals.getNode("systems/fadec/powered2", 1); -var fadecpowerup = props.globals.getNode("systems/fadec/powerup", 1); -var thr_limit = props.globals.getNode("controls/engines/thrust-limit", 1); -var n1_limit = props.globals.getNode("controls/engines/n1-limit", 1); -var epr_limit = props.globals.getNode("controls/engines/epr-limit", 1); -var n1mode1 = props.globals.getNode("systems/fadec/n1mode1", 1); -var n1mode2 = props.globals.getNode("systems/fadec/n1mode2", 1); -var ECAM_line1 = props.globals.getNode("ECAM/msg/line1", 1); -var ECAM_line2 = props.globals.getNode("ECAM/msg/line2", 1); -var ECAM_line3 = props.globals.getNode("ECAM/msg/line3", 1); -var ECAM_line4 = props.globals.getNode("ECAM/msg/line4", 1); -var ECAM_line5 = props.globals.getNode("ECAM/msg/line5", 1); -var ECAM_line6 = props.globals.getNode("ECAM/msg/line6", 1); -var ECAM_line7 = props.globals.getNode("ECAM/msg/line7", 1); -var ECAM_line8 = props.globals.getNode("ECAM/msg/line8", 1); -var ECAM_line1c = props.globals.getNode("ECAM/msg/linec1", 1); -var ECAM_line2c = props.globals.getNode("ECAM/msg/linec2", 1); -var ECAM_line3c = props.globals.getNode("ECAM/msg/linec3", 1); -var ECAM_line4c = props.globals.getNode("ECAM/msg/linec4", 1); -var ECAM_line5c = props.globals.getNode("ECAM/msg/linec5", 1); -var ECAM_line6c = props.globals.getNode("ECAM/msg/linec6", 1); -var ECAM_line7c = props.globals.getNode("ECAM/msg/linec7", 1); -var ECAM_line8c = props.globals.getNode("ECAM/msg/linec8", 1); -var ECAMleft = props.globals.getNode("ECAM/left-msg", 1); -var ECAMright = props.globals.getNode("ECAM/right-msg", 1); -var rate = props.globals.getNode("systems/acconfig/options/uecam-rate", 1); +var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1); +var et = props.globals.getNode("/sim/time/elapsed-sec", 1); +var acconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1); +var acess = props.globals.getNode("/systems/electrical/bus/ac-ess", 1); +var eng_option = props.globals.getNode("/options/eng", 1); +var du3_lgt = props.globals.getNode("/controls/lighting/DU/du3", 1); +var rev_1 = props.globals.getNode("/engines/engine[0]/reverser-pos-norm", 1); +var rev_2 = props.globals.getNode("/engines/engine[1]/reverser-pos-norm", 1); +var eng1_n1mode = props.globals.getNode("/systems/fadec/eng1/n1", 1); +var eng1_eprmode = props.globals.getNode("/systems/fadec/eng1/epr", 1); +var eng2_n1mode = props.globals.getNode("/systems/fadec/eng2/n1", 1); +var eng2_eprmode = props.globals.getNode("/systems/fadec/eng2/epr", 1); +var eng1_n2mode = props.globals.getNode("/systems/fadec/eng1/n2", 1); +var eng2_n2mode = props.globals.getNode("/systems/fadec/eng2/n2", 1); +var flap_text = props.globals.getNode("/controls/flight/flap-txt", 1); +var flap_pos = props.globals.getNode("/controls/flight/flap-pos", 1); +var fuel = props.globals.getNode("/consumables/fuel/total-fuel-lbs", 1); +var modeautobrake = props.globals.getNode("/controls/autobrake/mode", 1); +var speedbrakearm = props.globals.getNode("/controls/flight/speedbrake-arm", 1); +var ECAMtoconfig = props.globals.getNode("/ECAM/to-config", 1); +var gear = props.globals.getNode("/gear/gear[1]/position-norm", 1); +var smoke = props.globals.getNode("/controls/lighting/no-smoking-sign", 1); +var seatbelt = props.globals.getNode("/controls/lighting/seatbelt-sign", 1); +var flaps3_ovr = props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 1); +var wow0 = props.globals.getNode("/gear/gear[0]/wow"); +var eng1_n1 = props.globals.getNode("/engines/engine[0]/n1-actual", 1); +var eng2_n1 = props.globals.getNode("/engines/engine[1]/n1-actual", 1); +var eng1_n2 = props.globals.getNode("/engines/engine[0]/n2-actual", 1); +var eng2_n2 = props.globals.getNode("/engines/engine[1]/n2-actual", 1); +var eng1_epr = props.globals.getNode("/engines/engine[0]/epr-actual", 1); +var eng2_epr = props.globals.getNode("/engines/engine[1]/epr-actual", 1); +var eng1_egt = props.globals.getNode("/engines/engine[0]/egt-actual", 1); +var eng2_egt = props.globals.getNode("/engines/engine[1]/egt-actual", 1); +var eng1_egtmode = props.globals.getNode("/systems/fadec/eng1/egt", 1); +var eng2_egtmode = props.globals.getNode("/systems/fadec/eng2/egt", 1); +var eng1_ffmode = props.globals.getNode("/systems/fadec/eng1/ff", 1); +var eng2_ffmode = props.globals.getNode("/systems/fadec/eng2/ff", 1); +var fadecpower_1 = props.globals.getNode("/systems/fadec/powered1", 1); +var fadecpower_2 = props.globals.getNode("/systems/fadec/powered2", 1); +var fadecpowerup = props.globals.getNode("/systems/fadec/powerup", 1); +var thr_limit = props.globals.getNode("/controls/engines/thrust-limit", 1); +var n1_limit = props.globals.getNode("/controls/engines/n1-limit", 1); +var epr_limit = props.globals.getNode("/controls/engines/epr-limit", 1); +var n1mode1 = props.globals.getNode("/systems/fadec/n1mode1", 1); +var n1mode2 = props.globals.getNode("/systems/fadec/n1mode2", 1); +var ECAM_line1 = props.globals.getNode("/ECAM/msg/line1", 1); +var ECAM_line2 = props.globals.getNode("/ECAM/msg/line2", 1); +var ECAM_line3 = props.globals.getNode("/ECAM/msg/line3", 1); +var ECAM_line4 = props.globals.getNode("/ECAM/msg/line4", 1); +var ECAM_line5 = props.globals.getNode("/ECAM/msg/line5", 1); +var ECAM_line6 = props.globals.getNode("/ECAM/msg/line6", 1); +var ECAM_line7 = props.globals.getNode("/ECAM/msg/line7", 1); +var ECAM_line8 = props.globals.getNode("/ECAM/msg/line8", 1); +var ECAM_line1c = props.globals.getNode("/ECAM/msg/linec1", 1); +var ECAM_line2c = props.globals.getNode("/ECAM/msg/linec2", 1); +var ECAM_line3c = props.globals.getNode("/ECAM/msg/linec3", 1); +var ECAM_line4c = props.globals.getNode("/ECAM/msg/linec4", 1); +var ECAM_line5c = props.globals.getNode("/ECAM/msg/linec5", 1); +var ECAM_line6c = props.globals.getNode("/ECAM/msg/linec6", 1); +var ECAM_line7c = props.globals.getNode("/ECAM/msg/linec7", 1); +var ECAM_line8c = props.globals.getNode("/ECAM/msg/linec8", 1); +var ECAMleft = props.globals.getNode("/ECAM/left-msg", 1); +var ECAMright = props.globals.getNode("/ECAM/right-msg", 1); +var rate = props.globals.getNode("/systems/acconfig/options/uecam-rate", 1); var canvas_upperECAM_base = { init: func(canvas_group, file) { @@ -473,124 +473,124 @@ var canvas_upperECAM_base = { # Right ECAM Messages if (rightmsg == "MSG") { - me["ECAMR1"].setText(sprintf("%s", getprop("ECAM/rightmsg/line1"))); - me["ECAMR2"].setText(sprintf("%s", getprop("ECAM/rightmsg/line2"))); - me["ECAMR3"].setText(sprintf("%s", getprop("ECAM/rightmsg/line3"))); - me["ECAMR4"].setText(sprintf("%s", getprop("ECAM/rightmsg/line4"))); - me["ECAMR5"].setText(sprintf("%s", getprop("ECAM/rightmsg/line5"))); - me["ECAMR6"].setText(sprintf("%s", getprop("ECAM/rightmsg/line6"))); - me["ECAMR7"].setText(sprintf("%s", getprop("ECAM/rightmsg/line7"))); - me["ECAMR8"].setText(sprintf("%s", getprop("ECAM/rightmsg/line8"))); + me["ECAMR1"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line1"))); + me["ECAMR2"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line2"))); + me["ECAMR3"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line3"))); + me["ECAMR4"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line4"))); + me["ECAMR5"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line5"))); + me["ECAMR6"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line6"))); + me["ECAMR7"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line7"))); + me["ECAMR8"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line8"))); - if (getprop("ECAM/rightmsg/linec1") == "w") { + if (getprop("/ECAM/rightmsg/linec1") == "w") { me["ECAMR1"].setColor(0.8078,0.8039,0.8078); - } else if (getprop("ECAM/rightmsg/linec1") == "c") { + } else if (getprop("/ECAM/rightmsg/linec1") == "c") { me["ECAMR1"].setColor(0.0901,0.6039,0.7176); - } else if (getprop("ECAM/rightmsg/linec1") == "g") { + } else if (getprop("/ECAM/rightmsg/linec1") == "g") { me["ECAMR1"].setColor(0.0509,0.7529,0.2941); - } else if (getprop("ECAM/rightmsg/linec1") == "a") { + } else if (getprop("/ECAM/rightmsg/linec1") == "a") { me["ECAMR1"].setColor(0.7333,0.3803,0); - } else if (getprop("ECAM/rightmsg/linec1") == "r") { + } else if (getprop("/ECAM/rightmsg/linec1") == "r") { me["ECAMR1"].setColor(1,0,0); - } else if (getprop("ECAM/rightmsg/linec1") == "m") { + } else if (getprop("/ECAM/rightmsg/linec1") == "m") { me["ECAMR1"].setColor(0.6901,0.3333,0.7450); } - if (getprop("ECAM/rightmsg/linec2") == "w") { + if (getprop("/ECAM/rightmsg/linec2") == "w") { me["ECAMR2"].setColor(0.8078,0.8039,0.8078); - } else if (getprop("ECAM/rightmsg/linec2") == "c") { + } else if (getprop("/ECAM/rightmsg/linec2") == "c") { me["ECAMR2"].setColor(0.0901,0.6039,0.7176); - } else if (getprop("ECAM/rightmsg/linec2") == "g") { + } else if (getprop("/ECAM/rightmsg/linec2") == "g") { me["ECAMR2"].setColor(0.0509,0.7529,0.2941); - } else if (getprop("ECAM/rightmsg/linec2") == "a") { + } else if (getprop("/ECAM/rightmsg/linec2") == "a") { me["ECAMR2"].setColor(0.7333,0.3803,0); - } else if (getprop("ECAM/rightmsg/linec2") == "r") { + } else if (getprop("/ECAM/rightmsg/linec2") == "r") { me["ECAMR2"].setColor(1,0,0); - } else if (getprop("ECAM/rightmsg/linec2") == "m") { + } else if (getprop("/ECAM/rightmsg/linec2") == "m") { me["ECAMR2"].setColor(0.6901,0.3333,0.7450); } - if (getprop("ECAM/rightmsg/linec3") == "w") { + if (getprop("/ECAM/rightmsg/linec3") == "w") { me["ECAMR3"].setColor(0.8078,0.8039,0.8078); - } else if (getprop("ECAM/rightmsg/linec3") == "c") { + } else if (getprop("/ECAM/rightmsg/linec3") == "c") { me["ECAMR3"].setColor(0.0901,0.6039,0.7176); - } else if (getprop("ECAM/rightmsg/linec3") == "g") { + } else if (getprop("/ECAM/rightmsg/linec3") == "g") { me["ECAMR3"].setColor(0.0509,0.7529,0.2941); - } else if (getprop("ECAM/rightmsg/linec3") == "a") { + } else if (getprop("/ECAM/rightmsg/linec3") == "a") { me["ECAMR3"].setColor(0.7333,0.3803,0); - } else if (getprop("ECAM/rightmsg/linec3") == "r") { + } else if (getprop("/ECAM/rightmsg/linec3") == "r") { me["ECAMR3"].setColor(1,0,0); - } else if (getprop("ECAM/rightmsg/linec3") == "m") { + } else if (getprop("/ECAM/rightmsg/linec3") == "m") { me["ECAMR3"].setColor(0.6901,0.3333,0.7450); } - if (getprop("ECAM/rightmsg/linec4") == "w") { + if (getprop("/ECAM/rightmsg/linec4") == "w") { me["ECAMR4"].setColor(0.8078,0.8039,0.8078); - } else if (getprop("ECAM/rightmsg/linec4") == "c") { + } else if (getprop("/ECAM/rightmsg/linec4") == "c") { me["ECAMR4"].setColor(0.0901,0.6039,0.7176); - } else if (getprop("ECAM/rightmsg/linec4") == "g") { + } else if (getprop("/ECAM/rightmsg/linec4") == "g") { me["ECAMR4"].setColor(0.0509,0.7529,0.2941); - } else if (getprop("ECAM/rightmsg/linec4") == "a") { + } else if (getprop("/ECAM/rightmsg/linec4") == "a") { me["ECAMR4"].setColor(0.7333,0.3803,0); - } else if (getprop("ECAM/rightmsg/linec4") == "r") { + } else if (getprop("/ECAM/rightmsg/linec4") == "r") { me["ECAMR4"].setColor(1,0,0); - } else if (getprop("ECAM/rightmsg/linec4") == "m") { + } else if (getprop("/ECAM/rightmsg/linec4") == "m") { me["ECAMR4"].setColor(0.6901,0.3333,0.7450); } - if (getprop("ECAM/rightmsg/linec5") == "w") { + if (getprop("/ECAM/rightmsg/linec5") == "w") { me["ECAMR5"].setColor(0.8078,0.8039,0.8078); - } else if (getprop("ECAM/rightmsg/linec5") == "c") { + } else if (getprop("/ECAM/rightmsg/linec5") == "c") { me["ECAMR5"].setColor(0.0901,0.6039,0.7176); - } else if (getprop("ECAM/rightmsg/linec5") == "g") { + } else if (getprop("/ECAM/rightmsg/linec5") == "g") { me["ECAMR5"].setColor(0.0509,0.7529,0.2941); - } else if (getprop("ECAM/rightmsg/linec5") == "a") { + } else if (getprop("/ECAM/rightmsg/linec5") == "a") { me["ECAMR5"].setColor(0.7333,0.3803,0); - } else if (getprop("ECAM/rightmsg/linec5") == "r") { + } else if (getprop("/ECAM/rightmsg/linec5") == "r") { me["ECAMR5"].setColor(1,0,0); - } else if (getprop("ECAM/rightmsg/linec5") == "m") { + } else if (getprop("/ECAM/rightmsg/linec5") == "m") { me["ECAMR5"].setColor(0.6901,0.3333,0.7450); } - if (getprop("ECAM/rightmsg/linec6") == "w") { + if (getprop("/ECAM/rightmsg/linec6") == "w") { me["ECAMR6"].setColor(0.8078,0.8039,0.8078); - } else if (getprop("ECAM/rightmsg/linec6") == "c") { + } else if (getprop("/ECAM/rightmsg/linec6") == "c") { me["ECAMR6"].setColor(0.0901,0.6039,0.7176); - } else if (getprop("ECAM/rightmsg/linec6") == "g") { + } else if (getprop("/ECAM/rightmsg/linec6") == "g") { me["ECAMR6"].setColor(0.0509,0.7529,0.2941); - } else if (getprop("ECAM/rightmsg/linec6") == "a") { + } else if (getprop("/ECAM/rightmsg/linec6") == "a") { me["ECAMR6"].setColor(0.7333,0.3803,0); - } else if (getprop("ECAM/rightmsg/linec6") == "r") { + } else if (getprop("/ECAM/rightmsg/linec6") == "r") { me["ECAMR6"].setColor(1,0,0); - } else if (getprop("ECAM/rightmsg/linec6") == "m") { + } else if (getprop("/ECAM/rightmsg/linec6") == "m") { me["ECAMR6"].setColor(0.6901,0.3333,0.7450); } - if (getprop("ECAM/rightmsg/linec7") == "w") { + if (getprop("/ECAM/rightmsg/linec7") == "w") { me["ECAMR7"].setColor(0.8078,0.8039,0.8078); - } else if (getprop("ECAM/rightmsg/linec7") == "c") { + } else if (getprop("/ECAM/rightmsg/linec7") == "c") { me["ECAMR7"].setColor(0.0901,0.6039,0.7176); - } else if (getprop("ECAM/rightmsg/linec7") == "g") { + } else if (getprop("/ECAM/rightmsg/linec7") == "g") { me["ECAMR7"].setColor(0.0509,0.7529,0.2941); - } else if (getprop("ECAM/rightmsg/linec7") == "a") { + } else if (getprop("/ECAM/rightmsg/linec7") == "a") { me["ECAMR7"].setColor(0.7333,0.3803,0); - } else if (getprop("ECAM/rightmsg/linec7") == "r") { + } else if (getprop("/ECAM/rightmsg/linec7") == "r") { me["ECAMR7"].setColor(1,0,0); - } else if (getprop("ECAM/rightmsg/linec7") == "m") { + } else if (getprop("/ECAM/rightmsg/linec7") == "m") { me["ECAMR7"].setColor(0.6901,0.3333,0.7450); } - if (getprop("ECAM/rightmsg/linec8") == "w") { + if (getprop("/ECAM/rightmsg/linec8") == "w") { me["ECAMR8"].setColor(0.8078,0.8039,0.8078); - } else if (getprop("ECAM/rightmsg/linec8") == "c") { + } else if (getprop("/ECAM/rightmsg/linec8") == "c") { me["ECAMR8"].setColor(0.0901,0.6039,0.7176); - } else if (getprop("ECAM/rightmsg/linec8") == "g") { + } else if (getprop("/ECAM/rightmsg/linec8") == "g") { me["ECAMR8"].setColor(0.0509,0.7529,0.2941); - } else if (getprop("ECAM/rightmsg/linec8") == "a") { + } else if (getprop("/ECAM/rightmsg/linec8") == "a") { me["ECAMR8"].setColor(0.7333,0.3803,0); - } else if (getprop("ECAM/rightmsg/linec8") == "r") { + } else if (getprop("/ECAM/rightmsg/linec8") == "r") { me["ECAMR8"].setColor(1,0,0); - } else if (getprop("ECAM/rightmsg/linec8") == "m") { + } else if (getprop("/ECAM/rightmsg/linec8") == "m") { me["ECAMR8"].setColor(0.6901,0.3333,0.7450); } diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index c19d9bbb..fc91d9e7 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -751,19 +751,19 @@ var messages_priority_3 = func { } # C-Chord - if ((pts.Modes.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("systems/navigation/adr/output/baro-alt-1-capt")) < 200) or !pts.Modes.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.Modes.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("systems/navigation/adr/output/baro-alt-1-capt")) < 750) or !pts.Modes.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.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; diff --git a/Nasal/ECAM/ECAM-main.nas b/Nasal/ECAM/ECAM-main.nas index 8b2e29a3..189a2b8b 100644 --- a/Nasal/ECAM/ECAM-main.nas +++ b/Nasal/ECAM/ECAM-main.nas @@ -264,8 +264,8 @@ var SystemDisplay = { me.autoCall("door"); me.fctl20sec = 9; } elsif (phase == 2) { - aileron = pts.JSBSim.FBW.aileron.getValue(); - elevator = pts.JSBSim.FBW.elevator.getValue(); + aileron = pts.Fdm.JSBsim.Fbw.aileron.getValue(); + elevator = pts.Fdm.JSBsim.Fbw.elevator.getValue(); if (abs(aileron) >= 0.15 or abs(elevator) >= 0.15 and me.fctl20sec == 9) { me.autoCall("fctl"); diff --git a/Nasal/Libraries/buttons.nas b/Nasal/Libraries/buttons.nas index 385008da..2446be47 100644 --- a/Nasal/Libraries/buttons.nas +++ b/Nasal/Libraries/buttons.nas @@ -169,4 +169,15 @@ setlistener("/controls/apu/master", func() { # poor mans set-reset latch systems.APUController.APU.signals.emer = 0; systems.APUController.APU.signals.autoshutdown = 0; } -}, 0, 0); \ No newline at end of file +}, 0, 0); + +var toggleSTD = func { + if (pts.Instrumentation.Altimeter.std.getBoolValue()) { + pts.Instrumentation.Altimeter.settingInhg.setValue(pts.Instrumentation.Altimeter.oldQnh.getValue()); + pts.Instrumentation.Altimeter.std.setBoolValue(0); + } else { + pts.Instrumentation.Altimeter.oldQnh.setValue(pts.Instrumentation.Altimeter.settingInhg.getValue()); + pts.Instrumentation.Altimeter.settingInhg.setValue(29.92); + pts.Instrumentation.Altimeter.std.setBoolValue(1); + } +} diff --git a/Nasal/Libraries/efis.nas b/Nasal/Libraries/efis.nas index 78dc89b8..218032d8 100644 --- a/Nasal/Libraries/efis.nas +++ b/Nasal/Libraries/efis.nas @@ -1,99 +1,84 @@ # A3XX EFIS Controller # Copyright (c) 2020 Josh Davidson (Octal450) -setlistener("/sim/signals/fdm-initialized", func { - setprop("/instrumentation/efis[0]/nd/display-mode", "NAV"); - setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 2); - setprop("/instrumentation/efis[0]/inputs/range-nm", 20); - setprop("/instrumentation/efis[0]/inputs/tfc", 0); - setprop("/instrumentation/efis[0]/inputs/CSTR", 0); - setprop("/instrumentation/efis[0]/inputs/wpt", 0); - setprop("/instrumentation/efis[0]/inputs/VORD", 0); - setprop("/instrumentation/efis[0]/inputs/DME", 0); - setprop("/instrumentation/efis[0]/inputs/NDB", 0); - setprop("/instrumentation/efis[0]/inputs/arpt", 0); - setprop("/instrumentation/efis[1]/nd/display-mode", "NAV"); - setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 2); - setprop("/instrumentation/efis[1]/inputs/range-nm", 20); - setprop("/instrumentation/efis[1]/inputs/tfc", 0); - setprop("/instrumentation/efis[1]/inputs/CSTR", 0); - setprop("/instrumentation/efis[1]/inputs/wpt", 0); - setprop("/instrumentation/efis[1]/inputs/VORD", 0); - setprop("/instrumentation/efis[1]/inputs/DME", 0); - setprop("/instrumentation/efis[1]/inputs/NDB", 0); - setprop("/instrumentation/efis[1]/inputs/arpt", 0); +var mode = "NAV"; +var rng = 20; + +setlistener("sim/signals/fdm-initialized", func { # Fix completely retarded shit on the ND + pts.Instrumentation.Efis.Mfd.pnlModeNum[0].setValue(2); + pts.Instrumentation.Efis.Mfd.pnlModeNum[1].setValue(2); + pts.Instrumentation.Efis.Nd.displayMode[0].setValue("NAV"); + pts.Instrumentation.Efis.Nd.displayMode[1].setValue("NAV"); }); var setCptND = func(d) { - var mode = getprop("instrumentation/efis[0]/nd/display-mode"); - + mode = pts.Instrumentation.Efis.Nd.displayMode[0].getValue(); if (d == 1) { if (mode == "ILS") { - setprop("instrumentation/efis[0]/nd/display-mode", "VOR"); - setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 1); + pts.Instrumentation.Efis.Nd.displayMode[0].setValue("VOR"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[0].setValue(1); } else if (mode == "VOR") { - setprop("instrumentation/efis[0]/nd/display-mode", "NAV"); - setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 2); + pts.Instrumentation.Efis.Nd.displayMode[0].setValue("NAV"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[0].setValue(2); } else if (mode == "NAV") { - setprop("instrumentation/efis[0]/nd/display-mode", "ARC"); - setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 3); + pts.Instrumentation.Efis.Nd.displayMode[0].setValue("ARC"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[0].setValue(3); } else if (mode == "ARC") { - setprop("instrumentation/efis[0]/nd/display-mode", "PLAN"); - setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 4); + pts.Instrumentation.Efis.Nd.displayMode[0].setValue("PLAN"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[0].setValue(4); } } else if (d == -1) { if (mode == "PLAN") { - setprop("instrumentation/efis[0]/nd/display-mode", "ARC"); - setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 3); + pts.Instrumentation.Efis.Nd.displayMode[0].setValue("ARC"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[0].setValue(3); } else if (mode == "ARC") { - setprop("instrumentation/efis[0]/nd/display-mode", "NAV"); - setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 2); + pts.Instrumentation.Efis.Nd.displayMode[0].setValue("NAV"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[0].setValue(2); } else if (mode == "NAV") { - setprop("instrumentation/efis[0]/nd/display-mode", "VOR"); - setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 1); + pts.Instrumentation.Efis.Nd.displayMode[0].setValue("VOR"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[0].setValue(1); } else if (mode == "VOR") { - setprop("instrumentation/efis[0]/nd/display-mode", "ILS"); - setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 0); + pts.Instrumentation.Efis.Nd.displayMode[0].setValue("ILS"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[0].setValue(0); } } } var setFoND = func(d) { - var mode = getprop("instrumentation/efis[1]/nd/display-mode"); - + mode = pts.Instrumentation.Efis.Nd.displayMode[1].getValue(); if (d == 1) { if (mode == "ILS") { - setprop("instrumentation/efis[1]/nd/display-mode", "VOR"); - setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 1); + pts.Instrumentation.Efis.Nd.displayMode[1].setValue("VOR"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[1].setValue(1); } else if (mode == "VOR") { - setprop("instrumentation/efis[1]/nd/display-mode", "NAV"); - setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 2); + pts.Instrumentation.Efis.Nd.displayMode[1].setValue("NAV"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[1].setValue(2); } else if (mode == "NAV") { - setprop("instrumentation/efis[1]/nd/display-mode", "ARC"); - setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 3); + pts.Instrumentation.Efis.Nd.displayMode[1].setValue("ARC"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[1].setValue(3); } else if (mode == "ARC") { - setprop("instrumentation/efis[1]/nd/display-mode", "PLAN"); - setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 4); + pts.Instrumentation.Efis.Nd.displayMode[1].setValue("PLAN"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[1].setValue(4); } } else if (d == -1) { if (mode == "PLAN") { - setprop("instrumentation/efis[1]/nd/display-mode", "ARC"); - setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 3); + pts.Instrumentation.Efis.Nd.displayMode[1].setValue("ARC"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[1].setValue(3); } else if (mode == "ARC") { - setprop("instrumentation/efis[1]/nd/display-mode", "NAV"); - setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 2); + pts.Instrumentation.Efis.Nd.displayMode[1].setValue("NAV"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[1].setValue(2); } else if (mode == "NAV") { - setprop("instrumentation/efis[1]/nd/display-mode", "VOR"); - setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 1); + pts.Instrumentation.Efis.Nd.displayMode[1].setValue("VOR"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[1].setValue(1); } else if (mode == "VOR") { - setprop("instrumentation/efis[1]/nd/display-mode", "ILS"); - setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 0); + pts.Instrumentation.Efis.Nd.displayMode[1].setValue("ILS"); + pts.Instrumentation.Efis.Mfd.pnlModeNum[1].setValue(0); } } } var setNDRange = func(n, d) { - var rng = getprop("instrumentation/efis[" ~ n ~ "]/inputs/range-nm"); + rng = pts.Instrumentation.Efis.Inputs.rangeNm[n].getValue(); if (d == 1) { rng = rng * 2; if (rng > 320) { @@ -105,111 +90,46 @@ var setNDRange = func(n, d) { rng = 10; } } - setprop("instrumentation/efis[" ~ n ~ "]/inputs/range-nm", rng); + pts.Instrumentation.Efis.Inputs.rangeNm[n].setValue(rng); } var cpt_efis_btns = func(i) { if (i == "cstr") { - setprop("instrumentation/efis[0]/inputs/CSTR", 1); - setprop("instrumentation/efis[0]/inputs/wpt", 0); - setprop("instrumentation/efis[0]/inputs/VORD", 0); - setprop("instrumentation/efis[0]/inputs/DME", 0); - setprop("instrumentation/efis[0]/inputs/NDB", 0); - setprop("instrumentation/efis[0]/inputs/arpt", 0); + setEfisOptions(0, 0, 1, 0, 0, 0, 0); } else if (i == "wpt") { - setprop("instrumentation/efis[0]/inputs/CSTR", 0); - setprop("instrumentation/efis[0]/inputs/wpt", 1); - setprop("instrumentation/efis[0]/inputs/VORD", 0); - setprop("instrumentation/efis[0]/inputs/DME", 0); - setprop("instrumentation/efis[0]/inputs/NDB", 0); - setprop("instrumentation/efis[0]/inputs/arpt", 0); + setEfisOptions(0, 0, 0, 0, 0, 0, 1); } else if (i == "vord") { - setprop("instrumentation/efis[0]/inputs/CSTR", 0); - setprop("instrumentation/efis[0]/inputs/wpt", 0); - setprop("instrumentation/efis[0]/inputs/VORD", 1); - setprop("instrumentation/efis[0]/inputs/DME", 1); - setprop("instrumentation/efis[0]/inputs/NDB", 0); - setprop("instrumentation/efis[0]/inputs/arpt", 0); + setEfisOptions(0, 0, 0, 1, 0, 1, 0); } else if (i == "ndb") { - setprop("instrumentation/efis[0]/inputs/CSTR", 0); - setprop("instrumentation/efis[0]/inputs/wpt", 0); - setprop("instrumentation/efis[0]/inputs/VORD", 0); - setprop("instrumentation/efis[0]/inputs/DME", 0); - setprop("instrumentation/efis[0]/inputs/NDB", 1); - setprop("instrumentation/efis[0]/inputs/arpt", 0); + setEfisOptions(0, 0, 0, 0, 1, 0, 0); } else if (i == "arpt") { - setprop("instrumentation/efis[0]/inputs/CSTR", 0); - setprop("instrumentation/efis[0]/inputs/wpt", 0); - setprop("instrumentation/efis[0]/inputs/VORD", 0); - setprop("instrumentation/efis[0]/inputs/DME", 0); - setprop("instrumentation/efis[0]/inputs/NDB", 0); - setprop("instrumentation/efis[0]/inputs/arpt", 1); + setEfisOptions(0, 1, 0, 0, 0, 0, 0); } else if (i == "off") { - setprop("instrumentation/efis[0]/inputs/CSTR", 0); - setprop("instrumentation/efis[0]/inputs/wpt", 0); - setprop("instrumentation/efis[0]/inputs/VORD", 0); - setprop("instrumentation/efis[0]/inputs/DME", 0); - setprop("instrumentation/efis[0]/inputs/NDB", 0); - setprop("instrumentation/efis[0]/inputs/arpt", 0); + setEfisOptions(0, 0, 0, 0, 0, 0, 0); } } var fo_efis_btns = func(i) { if (i == "cstr") { - setprop("instrumentation/efis[1]/inputs/CSTR", 1); - setprop("instrumentation/efis[1]/inputs/wpt", 0); - setprop("instrumentation/efis[1]/inputs/VORD", 0); - setprop("instrumentation/efis[1]/inputs/DME", 0); - setprop("instrumentation/efis[1]/inputs/NDB", 0); - setprop("instrumentation/efis[1]/inputs/arpt", 0); + setEfisOptions(1, 0, 1, 0, 0, 0, 0); } else if (i == "wpt") { - setprop("instrumentation/efis[1]/inputs/CSTR", 0); - setprop("instrumentation/efis[1]/inputs/wpt", 1); - setprop("instrumentation/efis[1]/inputs/VORD", 0); - setprop("instrumentation/efis[1]/inputs/DME", 0); - setprop("instrumentation/efis[1]/inputs/NDB", 0); - setprop("instrumentation/efis[1]/inputs/arpt", 0); + setEfisOptions(1, 0, 0, 0, 0, 0, 1); } else if (i == "vord") { - setprop("instrumentation/efis[1]/inputs/CSTR", 0); - setprop("instrumentation/efis[1]/inputs/wpt", 0); - setprop("instrumentation/efis[1]/inputs/VORD", 1); - setprop("instrumentation/efis[1]/inputs/DME", 1); - setprop("instrumentation/efis[1]/inputs/NDB", 0); - setprop("instrumentation/efis[1]/inputs/arpt", 0); + setEfisOptions(1, 0, 0, 1, 0, 1, 0); } else if (i == "ndb") { - setprop("instrumentation/efis[1]/inputs/CSTR", 0); - setprop("instrumentation/efis[1]/inputs/wpt", 0); - setprop("instrumentation/efis[1]/inputs/VORD", 0); - setprop("instrumentation/efis[1]/inputs/DME", 0); - setprop("instrumentation/efis[1]/inputs/NDB", 1); - setprop("instrumentation/efis[1]/inputs/arpt", 0); + setEfisOptions(1, 0, 0, 0, 1, 0, 0); } else if (i == "arpt") { - setprop("instrumentation/efis[1]/inputs/CSTR", 0); - setprop("instrumentation/efis[1]/inputs/wpt", 0); - setprop("instrumentation/efis[1]/inputs/VORD", 0); - setprop("instrumentation/efis[1]/inputs/DME", 0); - setprop("instrumentation/efis[1]/inputs/NDB", 0); - setprop("instrumentation/efis[1]/inputs/arpt", 1); + setEfisOptions(1, 1, 0, 0, 0, 0, 0); } else if (i == "off") { - setprop("instrumentation/efis[1]/inputs/CSTR", 0); - setprop("instrumentation/efis[1]/inputs/wpt", 0); - setprop("instrumentation/efis[1]/inputs/VORD", 0); - setprop("instrumentation/efis[1]/inputs/DME", 0); - setprop("instrumentation/efis[1]/inputs/NDB", 0); - setprop("instrumentation/efis[1]/inputs/arpt", 0); + setEfisOptions(1, 0, 0, 0, 0, 0, 0); } } -var toggleSTD = func { - var Std = getprop("modes/altimeter/std"); - if (Std == 1) { - var oldqnh = getprop("modes/altimeter/oldqnh"); - setprop("instrumentation/altimeter/setting-inhg", oldqnh); - setprop("modes/altimeter/std", 0); - } else if (Std == 0) { - var qnh = getprop("instrumentation/altimeter/setting-inhg"); - setprop("modes/altimeter/oldqnh", qnh); - setprop("instrumentation/altimeter/setting-inhg", 29.92); - setprop("modes/altimeter/std", 1); - } -} \ No newline at end of file +var setEfisOptions = func(n, a, b, c, d, e, f) { + pts.Instrumentation.Efis.Inputs.arpt[n].setBoolValue(a); + pts.Instrumentation.Efis.Inputs.cstr[n].setBoolValue(b); + pts.Instrumentation.Efis.Inputs.dme[n].setBoolValue(c); + pts.Instrumentation.Efis.Inputs.ndb[n].setBoolValue(d); + pts.Instrumentation.Efis.Inputs.vord[n].setBoolValue(e); + pts.Instrumentation.Efis.Inputs.wpt[n].setBoolValue(f); +}; diff --git a/Nasal/Libraries/property-tree-setup.nas b/Nasal/Libraries/property-tree-setup.nas index 0f0e560b..2238acb1 100644 --- a/Nasal/Libraries/property-tree-setup.nas +++ b/Nasal/Libraries/property-tree-setup.nas @@ -45,6 +45,24 @@ var Engines = { }, }; +var Fdm = { + JSBsim: { + Fcs: { + flapDeg: props.globals.getNode("/fdm/jsbsim/fcs/flap-pos-deg"), + slatDeg: props.globals.getNode("/fdm/jsbsim/fcs/slat-pos-deg"), + }, + Fbw: { + aileron: props.globals.getNode("/fdm/jsbsim/fbw/aileron-sidestick"), + elevator: props.globals.getNode("/fdm/jsbsim/fbw/elevator-sidestick"), + }, + Propulsion: { + Engine: { + fuelUsed: [props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/fuel-used-lbs")], + }, + }, + }, +}; + var FMGC = { CasCompare: { casRejectAll: props.globals.getNode("/systems/fmgc/cas-compare/cas-reject-all"), @@ -63,6 +81,27 @@ var Instrumentation = { }, Altimeter: { indicatedFt: props.globals.getNode("/instrumentation/altimeter[0]/indicated-altitude-ft"), + oldQnh: props.globals.getNode("/instrumentation/altimeter[0]/oldqnh"), + settingInhg: props.globals.getNode("/instrumentation/altimeter[0]/setting-inhg"), + std: props.globals.getNode("/instrumentation/altimeter[0]/std"), + }, + Efis: { + Inputs: { + arpt: [props.globals.initNode("/instrumentation/efis[0]/inputs/arpt", 0, "BOOL"), props.globals.initNode("/instrumentation/efis[1]/inputs/arpt", 0, "BOOL")], + cstr: [props.globals.initNode("/instrumentation/efis[0]/inputs/CSTR", 0, "BOOL"), props.globals.initNode("/instrumentation/efis[1]/inputs/CSTR", 0, "BOOL")], + dme: [props.globals.initNode("/instrumentation/efis[0]/inputs/DME", 0, "BOOL"), props.globals.initNode("/instrumentation/efis[1]/inputs/DME", 0, "BOOL")], + ndb: [props.globals.initNode("/instrumentation/efis[0]/inputs/NDB", 0, "BOOL"), props.globals.initNode("/instrumentation/efis[1]/inputs/NDB", 0, "BOOL")], + rangeNm: [props.globals.initNode("/instrumentation/efis[0]/inputs/range-nm", 20, "INT"), props.globals.initNode("/instrumentation/efis[1]/inputs/range-nm", 20, "INT")], + tfc: [props.globals.initNode("/instrumentation/efis[0]/inputs/tfc", 0, "BOOL"), props.globals.initNode("/instrumentation/efis[1]/inputs/tfc", 0, "BOOL")], + vord: [props.globals.initNode("/instrumentation/efis[0]/inputs/VORD", 0, "BOOL"), props.globals.initNode("/instrumentation/efis[1]/inputs/VORD", 0, "BOOL")], + wpt: [props.globals.initNode("/instrumentation/efis[0]/inputs/wpt", 0, "BOOL"), props.globals.initNode("/instrumentation/efis[1]/inputs/wpt", 0, "BOOL")], + }, + Nd: { + displayMode: [props.globals.initNode("/instrumentation/efis[0]/nd/display-mode", "NAV", "STRING"), props.globals.initNode("/instrumentation/efis[1]/nd/display-mode", "NAV", "STRING")], + }, + Mfd: { + pnlModeNum: [props.globals.initNode("/instrumentation/efis[0]/mfd/pnl_mode-num", 2, "INT"), props.globals.initNode("/instrumentation/efis[1]/mfd/pnl_mode-num", 2, "INT")], + }, }, TCAS: { Inputs: { @@ -71,34 +110,6 @@ var Instrumentation = { }, }; -var JSBSIM = { - FCS: { - flapDeg: props.globals.getNode("/fdm/jsbsim/fcs/flap-pos-deg"), - slatDeg: props.globals.getNode("/fdm/jsbsim/fcs/slat-pos-deg"), - }, -}; - -var JSBSim = { - FBW: { - aileron: props.globals.getNode("/fdm/jsbsim/fbw/aileron-sidestick"), - elevator: props.globals.getNode("/fdm/jsbsim/fbw/elevator-sidestick"), - }, - Propulsion: { - Engine1: { - fuelUsed: props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs"), - }, - Engine2: { - fuelUsed: props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/fuel-used-lbs"), - }, - }, -}; - -var Modes = { - Altimeter: { - std: props.globals.getNode("/modes/altimeter/std"), - }, -}; - var Options = { eng: props.globals.getNode("/options/eng"), }; diff --git a/Nasal/Systems/ADIRS/ADR.nas b/Nasal/Systems/ADIRS/ADR.nas index 40f4265f..b4576664 100644 --- a/Nasal/Systems/ADIRS/ADR.nas +++ b/Nasal/Systems/ADIRS/ADR.nas @@ -271,8 +271,8 @@ var ADIRSnew = { update_items: [ props.UpdateManager.FromPropertyHashList(["/fdm/jsbsim/fcs/flap-pos-deg","/fdm/jsbsim/fcs/slat-pos-deg"], 0.1, func(notification) { - me._flapPos = pts.JSBSIM.FCS.flapDeg.getValue(); - me._slatPos = pts.JSBSIM.FCS.slatDeg.getValue(); + me._flapPos = pts.Fdm.JSBsim.Fcs.flapDeg.getValue(); + me._slatPos = pts.Fdm.JSBsim.Fcs.slatDeg.getValue(); if (me._flapPos >= 23 and me._slatPos >= 25) { ADIRSnew.overspeedVFE.setValue(181); diff --git a/Nasal/Systems/fuel.nas b/Nasal/Systems/fuel.nas index 0ce21f7e..0a1993d8 100644 --- a/Nasal/Systems/fuel.nas +++ b/Nasal/Systems/fuel.nas @@ -58,12 +58,12 @@ var FUEL = { }, loop: func() { - systems.FUEL.Quantity.usedLeft.setValue(pts.JSBSim.Propulsion.Engine1.fuelUsed.getValue() + me.offset1); - systems.FUEL.Quantity.usedRight.setValue(pts.JSBSim.Propulsion.Engine2.fuelUsed.getValue() + me.offset2); + systems.FUEL.Quantity.usedLeft.setValue(pts.Fdm.JSBsim.Propulsion.Engine.fuelUsed[0].getValue() + me.offset1); + systems.FUEL.Quantity.usedRight.setValue(pts.Fdm.JSBsim.Propulsion.Engine.fuelUsed[1].getValue() + me.offset2); }, setOffset: func() { - me.offset1 = me.offset1 -(pts.JSBSim.Propulsion.Engine1.fuelUsed.getValue()); - me.offset2 = me.offset2 -(pts.JSBSim.Propulsion.Engine2.fuelUsed.getValue()); + me.offset1 = me.offset1 -(pts.Fdm.JSBsim.Propulsion.Engine.fuelUsed[0].getValue()); + me.offset2 = me.offset2 -(pts.Fdm.JSBsim.Propulsion.Engine.fuelUsed[1].getValue()); } }; diff --git a/revision.txt b/revision.txt index 368f89ce..d99e90eb 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -28 \ No newline at end of file +29 \ No newline at end of file