1
0
Fork 0

Sim: Refactor ND EFIS interface, Altimeter STD, and fix some bugs

This commit is contained in:
Josh Davidson 2020-04-27 11:37:43 -04:00
parent de5582eade
commit 62931a38a5
16 changed files with 1280 additions and 1332 deletions

View file

@ -1166,6 +1166,15 @@
</options>
<instrumentation n="0">
<altimeter n="0">
<inhg type="bool">0</inhg>
<indicated-altitude-ft tyep="double">0</indicated-altitude-ft>
<indicated-altitude-ft-pfd tyep="double">0</indicated-altitude-ft-pfd>
<oldqnh type="double">29.92</oldqnh>
<serviceable type="bool">true</serviceable>
<std type="bool">0</std>
</altimeter>
<altimeter n="1">
<serviceable type="bool">true</serviceable>
</altimeter>
@ -1420,11 +1429,6 @@
</instrumentation>
<modes>
<altimeter>
<inhg>0</inhg>
<std>0</std>
<oldqnh>29.92</oldqnh>
</altimeter>
<cpt-du-xfr>0</cpt-du-xfr>
<fo-du-xfr>0</fo-du-xfr>
<pfd>

View file

@ -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);
}
});

View file

@ -2048,11 +2048,11 @@
<condition>
<and>
<equals>
<property>modes/altimeter/inhg</property>
<property>instrumentation/altimeter/inhg</property>
<value>1</value>
</equals>
<equals>
<property>modes/altimeter/std</property>
<property>instrumentation/altimeter/std</property>
<value>0</value>
</equals>
<greater-than-equals>
@ -2070,11 +2070,11 @@
<condition>
<and>
<equals>
<property>modes/altimeter/inhg</property>
<property>instrumentation/altimeter/inhg</property>
<value>0</value>
</equals>
<equals>
<property>modes/altimeter/std</property>
<property>instrumentation/altimeter/std</property>
<value>0</value>
</equals>
<greater-than-equals>
@ -2104,11 +2104,11 @@
<condition>
<and>
<equals>
<property>modes/altimeter/inhg</property>
<property>instrumentation/altimeter/inhg</property>
<value>1</value>
</equals>
<equals>
<property>modes/altimeter/std</property>
<property>instrumentation/altimeter/std</property>
<value>0</value>
</equals>
<greater-than-equals>
@ -2126,11 +2126,11 @@
<condition>
<and>
<equals>
<property>modes/altimeter/inhg</property>
<property>instrumentation/altimeter/inhg</property>
<value>0</value>
</equals>
<equals>
<property>modes/altimeter/std</property>
<property>instrumentation/altimeter/std</property>
<value>0</value>
</equals>
<greater-than-equals>
@ -2163,7 +2163,7 @@
<repeatable>true</repeatable>
<binding>
<command>property-cycle</command>
<property>modes/altimeter/inhg</property>
<property>instrumentation/altimeter/inhg</property>
<value>0</value>
<value>1</value>
</binding>
@ -2193,7 +2193,7 @@
<animation>
<type>rotate</type>
<object-name>qnh_cpt_sw</object-name>
<property>modes/altimeter/inhg</property>
<property>instrumentation/altimeter/inhg</property>
<interpolation>
<entry><ind>0</ind><dep>40</dep></entry>
<entry><ind>1</ind><dep>-3</dep></entry>
@ -2206,7 +2206,7 @@
<animation>
<type>rotate</type>
<object-name>qnh_fo_sw</object-name>
<property>modes/altimeter/inhg</property>
<property>instrumentation/altimeter/inhg</property>
<interpolation>
<entry><ind>0</ind><dep>40</dep></entry>
<entry><ind>1</ind><dep>-3</dep></entry>
@ -2434,11 +2434,11 @@
<value>1</value>
</not-equals>
<equals>
<property>modes/altimeter/inhg</property>
<property>instrumentation/altimeter/inhg</property>
<value>1</value>
</equals>
<equals>
<property>modes/altimeter/std</property>
<property>instrumentation/altimeter/std</property>
<value>0</value>
</equals>
</and>
@ -2455,11 +2455,11 @@
<value>1</value>
</not-equals>
<equals>
<property>modes/altimeter/inhg</property>
<property>instrumentation/altimeter/inhg</property>
<value>0</value>
</equals>
<equals>
<property>modes/altimeter/std</property>
<property>instrumentation/altimeter/std</property>
<value>0</value>
</equals>
</and>
@ -2476,7 +2476,7 @@
<value>1</value>
</not-equals>
<equals>
<property>modes/altimeter/std</property>
<property>instrumentation/altimeter/std</property>
<value>1</value>
</equals>
</and>

View file

@ -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) {

View file

@ -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);
}, 0, 0);

File diff suppressed because it is too large Load diff

View file

@ -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;
}
});

View file

@ -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);
}

View file

@ -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;

View file

@ -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");

View file

@ -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);
}, 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);
}
}

View file

@ -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);
}
}
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);
};

View file

@ -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"),
};

View file

@ -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);

View file

@ -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());
}
};

View file

@ -1 +1 @@
28
29