diff --git a/.gitignore b/.gitignore
index 71dc2c1b..d0dd3106 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ MyDevWIP
# ignore swap files
*.swp
*.swo
+.DS_Store
diff --git a/A320-main.xml b/A320-main.xml
index fa90bb91..29e4e1cd 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -15,6 +15,8 @@
+ 212
+
@@ -424,7 +426,7 @@
80.0
- 30.0
+ 10.0
300.0
@@ -1455,8 +1457,8 @@
nasal
@@ -1466,8 +1468,8 @@
nasal
@@ -1508,7 +1510,7 @@
nasal
@@ -1529,8 +1531,8 @@
nasal
@@ -1551,7 +1553,7 @@
nasal
@@ -1572,9 +1574,9 @@
nasal
@@ -1595,7 +1597,7 @@
nasal
@@ -1636,7 +1638,7 @@
nasal
@@ -1657,8 +1659,8 @@
nasal
diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas
index f555d7b1..ca215827 100644
--- a/AircraftConfig/acconfig.nas
+++ b/AircraftConfig/acconfig.nas
@@ -4,19 +4,19 @@
# Copyright (c) 2019 Joshua 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,84 +25,84 @@ 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/welcome-skip", 0);
-setprop("/systems/acconfig/options/no-rendering-warn", 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);
+setprop("systems/acconfig/options/weight-kgs", 0);
+setprop("systems/acconfig/options/adirs-skip", 0);
+setprop("systems/acconfig/options/welcome-skip", 0);
+setprop("systems/acconfig/options/no-rendering-warn", 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");
@@ -121,43 +121,43 @@ var du_quality = gui.Dialog.new("sim/gui/dialogs/acconfig/du-quality/dialog", "A
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/201912/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/201912/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"),".","")) < 201912) {
- setprop("/systems/acconfig/mismatch-code", "0x121");
- setprop("/systems/acconfig/mismatch-reason", "FGFS version is too old! Please update FlightGear to at least 2019.1.2.");
- if (getprop("/systems/acconfig/out-of-date") != 1) {
+ if (num(string.replace(getprop("sim/version/flightgear"),".","")) < 201912) {
+ setprop("systems/acconfig/mismatch-code", "0x121");
+ setprop("systems/acconfig/mismatch-reason", "FGFS version is too old! Please update FlightGear to at least 2019.1.2.");
+ 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();
@@ -168,74 +168,74 @@ 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();
spinning.stop();
});
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);
+ 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("/controls/adirs/skip", getprop("/systems/acconfig/options/adirs-skip"));
- 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("controls/adirs/skip", getprop("systems/acconfig/options/adirs-skip"));
+ 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/adirs-skip", getprop("/controls/adirs/skip"));
- 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/adirs-skip", getprop("controls/adirs/skip"));
+ 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");
}
################
@@ -244,47 +244,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();
}
@@ -294,12 +294,12 @@ 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/start", 0);
+ setprop("controls/APU/master", 0);
+ setprop("controls/APU/start", 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();
@@ -308,39 +308,39 @@ 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();
- setprop("/controls/APU/master", 0);
- setprop("/controls/APU/start", 0);
+ setprop("controls/APU/master", 0);
+ setprop("controls/APU/start", 0);
# 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);
- setprop("/controls/APU/start", 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);
+ setprop("controls/APU/start", 1);
var apu_rpm_chk = setlistener("/systems/apu/rpm", func {
- if (getprop("/systems/apu/rpm") >= 98) {
+ if (getprop("systems/apu/rpm") >= 98) {
removelistener(apu_rpm_chk);
beforestart_b();
}
@@ -355,21 +355,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); }
@@ -379,18 +379,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();
@@ -399,39 +399,39 @@ 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();
- setprop("/controls/APU/master", 0);
- setprop("/controls/APU/start", 0);
+ setprop("controls/APU/master", 0);
+ setprop("controls/APU/start", 0);
# 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);
- setprop("/controls/APU/start", 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);
+ setprop("controls/APU/start", 1);
var apu_rpm_chk = setlistener("/systems/apu/rpm", func {
- if (getprop("/systems/apu/rpm") >= 98) {
+ if (getprop("systems/apu/rpm") >= 98) {
removelistener(apu_rpm_chk);
taxi_b();
}
@@ -446,21 +446,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); }
@@ -470,41 +470,41 @@ 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);
+ 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/APU/start", 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/APU/start", 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();
@@ -512,30 +512,30 @@ var taxi_d = func {
# Ready to Takeoff
var takeoff = func {
- if (getprop("/systems/acconfig/mismatch-code") == "0x000") {
+ if (getprop("systems/acconfig/mismatch-code") == "0x000") {
# The same as taxi, except we set some things afterwards.
taxi();
var eng_one_chk_c = setlistener("/engines/engine[0]/state", func {
- if (getprop("/engines/engine[0]/state") == 3) {
+ if (getprop("engines/engine[0]/state") == 3) {
removelistener(eng_one_chk_c);
- setprop("/controls/switches/strobe", 1.0);
- setprop("/controls/lighting/taxi-light-switch", 1);
- setprop("/controls/switches/landing-lights-l", 1);
- setprop("/controls/switches/landing-lights-r", 1);
- setprop("/controls/flight/speedbrake-arm", 1);
- setprop("/controls/flight/flaps", 0.290);
- setprop("/controls/flight/slats", 0.666);
- setprop("/controls/flight/flap-lever", 1);
- setprop("/controls/flight/flap-pos", 2);
- setprop("/controls/flight/flap-txt", "1+F");
- setprop("/controls/atc/mode-knob", 4);
+ setprop("controls/switches/strobe", 1.0);
+ setprop("controls/lighting/taxi-light-switch", 1);
+ setprop("controls/switches/landing-lights-l", 1);
+ setprop("controls/switches/landing-lights-r", 1);
+ setprop("controls/flight/speedbrake-arm", 1);
+ setprop("controls/flight/flaps", 0.290);
+ setprop("controls/flight/slats", 0.666);
+ setprop("controls/flight/flap-lever", 1);
+ setprop("controls/flight/flap-pos", 2);
+ setprop("controls/flight/flap-txt", "1+F");
+ setprop("controls/atc/mode-knob", 4);
atc.transponderPanel.modeSwitch(5);
libraries.flaptimer.start();
- setprop("/controls/flight/elevator-trim", -0.07);
+ setprop("controls/flight/elevator-trim", -0.07);
systems.arm_autobrake(3);
- setprop("/ECAM/to-config-test", 1);
+ setprop("ECAM/to-config-test", 1);
settimer(func {
- setprop("/ECAM/to-config-test", 0);
+ setprop("ECAM/to-config-test", 0);
}, 1);
}
});
diff --git a/AircraftConfig/fbw.xml b/AircraftConfig/fbw.xml
index d940d64d..4926b47a 100644
--- a/AircraftConfig/fbw.xml
+++ b/AircraftConfig/fbw.xml
@@ -51,8 +51,8 @@
nasal
@@ -67,8 +67,8 @@
nasal
@@ -83,8 +83,8 @@
nasal
@@ -99,8 +99,8 @@
nasal
diff --git a/AircraftConfig/fuel.xml b/AircraftConfig/fuel.xml
index da20f183..79bbf7b2 100644
--- a/AircraftConfig/fuel.xml
+++ b/AircraftConfig/fuel.xml
@@ -143,7 +143,7 @@
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 44dad5ad..4ed99ee7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -38,7 +38,7 @@ var someOtherThing = func {
something = 1;
}
settimer(func {
- setprop("/something", something);
+ setprop("something", something);
}, 5);
}
```
diff --git a/Models/A320-100-CFM.xml b/Models/A320-100-CFM.xml
index 177a1bc6..476b99f6 100644
--- a/Models/A320-100-CFM.xml
+++ b/Models/A320-100-CFM.xml
@@ -16,20 +16,17 @@
Aircraft/A320-family/Models/Fuselages/A320-100/fuselage.xml
-
-
- Flightdeck
- Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml
-
- 4.81794
- 0.0
- 0.0
-
-
-
Interior
- Aircraft/A320-family/Models/Interior/a320.interior.xml
+ Aircraft/A320-family/Models/A320-interior.xml
+
+
+ 18.8499
+ -1.7005004
+
+ interior
diff --git a/Models/A320-200-CFM.xml b/Models/A320-200-CFM.xml
index 776d6987..ceeb328a 100644
--- a/Models/A320-200-CFM.xml
+++ b/Models/A320-200-CFM.xml
@@ -16,20 +16,17 @@
Aircraft/A320-family/Models/Fuselages/A320/fuselage.xml
-
-
- Flightdeck
- Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml
-
- 4.81794
- 0.0
- 0.0
-
-
-
Interior
- Aircraft/A320-family/Models/Interior/a320.interior.xml
+ Aircraft/A320-family/Models/A320-interior.xml
+
+
+ 18.8499
+ -1.7005004
+
+ interior
diff --git a/Models/A320-200-IAE.xml b/Models/A320-200-IAE.xml
index 2fdeb2c0..20efc22b 100644
--- a/Models/A320-200-IAE.xml
+++ b/Models/A320-200-IAE.xml
@@ -16,20 +16,17 @@
Aircraft/A320-family/Models/Fuselages/A320/fuselage.xml
-
-
- Flightdeck
- Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml
-
- 4.81794
- 0.0
- 0.0
-
-
-
Interior
- Aircraft/A320-family/Models/Interior/a320.interior.xml
+ Aircraft/A320-family/Models/A320-interior.xml
+
+
+ 18.8499
+ -1.7005004
+
+ interior
diff --git a/Models/A320-interior.xml b/Models/A320-interior.xml
new file mode 100644
index 00000000..aa5c89d2
--- /dev/null
+++ b/Models/A320-interior.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+ Flightdeck
+ Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml
+
+ -14.0320
+ 0.0
+ 1.7005004
+
+
+
+
+ Interior
+ Aircraft/A320-family/Models/Interior/a320.interior.xml
+
+ -18.8499
+ 1.7005004
+
+
+
diff --git a/Models/A320neo-CFM.xml b/Models/A320neo-CFM.xml
index a98f3a22..9f48a1c7 100644
--- a/Models/A320neo-CFM.xml
+++ b/Models/A320neo-CFM.xml
@@ -16,20 +16,17 @@
Aircraft/A320-family/Models/Fuselages/A320neo/fuselage.xml
-
-
- Flightdeck
- Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml
-
- 4.81794
- 0.0
- 0.0
-
-
-
Interior
- Aircraft/A320-family/Models/Interior/a320.interior.xml
+ Aircraft/A320-family/Models/A320-interior.xml
+
+
+ 18.8499
+ -1.7005004
+
+ interior
diff --git a/Models/A320neo-PW.xml b/Models/A320neo-PW.xml
index cf7dce0f..8999e7f6 100644
--- a/Models/A320neo-PW.xml
+++ b/Models/A320neo-PW.xml
@@ -16,20 +16,17 @@
Aircraft/A320-family/Models/Fuselages/A320neo/fuselage.xml
-
-
- Flightdeck
- Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml
-
- 4.81794
- 0.0
- 0.0
-
-
-
Interior
- Aircraft/A320-family/Models/Interior/a320.interior.xml
+ Aircraft/A320-family/Models/A320-interior.xml
+
+
+ 18.8499
+ -1.7005004
+
+ interior
diff --git a/Models/Effects/Moisture.xml b/Models/Effects/Moisture.xml
index 6e1d3067..e519f243 100755
--- a/Models/Effects/Moisture.xml
+++ b/Models/Effects/Moisture.xml
@@ -36,7 +36,7 @@ Original code author Maggse.
0
0
- 10
+ 0
1
@@ -51,8 +51,8 @@ Original code author Maggse.
- 100
- 10
+ 50
+ 0
diff --git a/Models/Effects/engine-spray-left.xml b/Models/Effects/engine-spray-left.xml
new file mode 100644
index 00000000..5495533d
--- /dev/null
+++ b/Models/Effects/engine-spray-left.xml
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+ engine-spray-l
+ tiresmoke.png
+ false
+ false
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+ engines/engine[0]/n2-actual
+ 50
+
+
+ position/altitude-ft
+ 10
+
+
+ engines/engine[0]/state
+ 3
+
+
+
+
+ world
+
+
+ point
+
+
+
+ 45
+ 85
+ -60
+ 60
+
+ engines/engine[0]/thrust_lbs
+ 5
+
+
+ 15
+ -15
+ 15
+ -15
+ 15
+ -15
+
+
+
+
+
+ engines/engine[0]/n2-actual
+ 20
+ 70
+
+
+
+ billboard
+
+
+
+
+
+ 0.8
+
+
+ 0.8
+
+
+ 0.8
+
+
+ 0.5
+
+
+
+ 1.5
+
+
+
+
+
+ 0.7
+
+
+ 0.7
+
+
+ 0.7
+
+
+ 0.005
+
+
+
+ 10
+
+
+
+ 2
+
+ 0.025
+ 0.175
+
+
+
+ water
+ true
+ true
+
+
+
+
+
diff --git a/Models/Effects/engine-spray-right.xml b/Models/Effects/engine-spray-right.xml
new file mode 100644
index 00000000..df2120d0
--- /dev/null
+++ b/Models/Effects/engine-spray-right.xml
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+ tyre-smoke-r
+ tiresmoke.png
+ false
+ false
+
+
+ 0
+ 0
+ 0
+
+
+
+
+ gear/gear[2]/Rbrake-smoke
+ 1
+
+
+
+ world
+
+
+ point
+
+
+
+ 45
+ 85
+ -60
+ 60
+
+ 50
+ 5
+
+
+ 15
+ -15
+ 15
+ -15
+ 15
+ -15
+
+
+
+
+
+ gear/gear[2]/Rbrake-thermal-energy
+ 20
+ 70
+
+
+
+ billboard
+
+
+
+
+
+ 0.8
+
+
+ 0.8
+
+
+ 0.8
+
+
+ 0.5
+
+
+
+ 1.5
+
+
+
+
+
+ 0.7
+
+
+ 0.7
+
+
+ 0.7
+
+
+ 0.005
+
+
+
+ 10
+
+
+
+ 2
+
+ 0.025
+ 0.175
+
+
+
+ air
+ false
+ true
+
+
+
+
+
diff --git a/Models/Engines/XMLs/a320.engine.cfm.left.xml b/Models/Engines/XMLs/a320.engine.cfm.left.xml
index 0e2ada2d..11c79b02 100644
--- a/Models/Engines/XMLs/a320.engine.cfm.left.xml
+++ b/Models/Engines/XMLs/a320.engine.cfm.left.xml
@@ -90,6 +90,17 @@
+
+
+ Aircraft/A320-family/Models/Effects/engine-spray-left.xml
+ engine-spray-l
+
+ 4.875
+ 0
+ 0
+
+
+
Engine fire
Aircraft/A320-family/Models/Effects/enginefire.xml
diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml
index c98a544c..cb85e62d 100644
--- a/Models/FlightDeck/a320.flightdeck.xml
+++ b/Models/FlightDeck/a320.flightdeck.xml
@@ -497,8 +497,8 @@
vs-text-test
- /FMGC/FCU-working
- /controls/switches/annun-test
+ FMGC/FCU-working
+ controls/switches/annun-test
@@ -520,9 +520,9 @@
nasal
@@ -546,9 +546,9 @@
nasal
@@ -586,7 +586,7 @@
nasal
@@ -880,12 +880,12 @@
nasal
@@ -907,12 +907,12 @@
nasal
@@ -934,12 +934,12 @@
nasal
@@ -980,7 +980,7 @@
nasal
-
+
@@ -1511,13 +1511,13 @@
property-assign
- /ECAM/to-config-test
+ ECAM/to-config-test
1
property-assign
- /ECAM/to-config-test
+ ECAM/to-config-test
0
@@ -1934,7 +1934,7 @@
nasal
@@ -1956,7 +1956,7 @@
nasal
@@ -1990,7 +1990,7 @@
nasal
@@ -2012,7 +2012,7 @@
nasal
@@ -2120,7 +2120,7 @@
xy-plane
number-value
%2.2f
- /instrumentation/altimeter/setting-inhg
+ instrumentation/altimeter/setting-inhg
false
led.txf
true
@@ -2146,7 +2146,7 @@
xy-plane
number-value
%2.2f
- /instrumentation/altimeter/setting-inhg
+ instrumentation/altimeter/setting-inhg
false
led.txf
true
@@ -2172,7 +2172,7 @@
xy-plane
number-value
%2.0f
- /instrumentation/altimeter/setting-hpa
+ instrumentation/altimeter/setting-hpa
false
led.txf
true
@@ -2198,7 +2198,7 @@
xy-plane
number-value
%2.0f
- /instrumentation/altimeter/setting-hpa
+ instrumentation/altimeter/setting-hpa
false
led.txf
true
@@ -2384,7 +2384,7 @@
nasal
@@ -2486,7 +2486,7 @@
nasal
@@ -2524,12 +2524,12 @@
nasal
@@ -2566,12 +2566,12 @@
nasal
@@ -2608,12 +2608,12 @@
nasal
@@ -2650,12 +2650,12 @@
nasal
@@ -2692,12 +2692,12 @@
nasal
@@ -2734,12 +2734,12 @@
nasal
@@ -2776,12 +2776,12 @@
nasal
@@ -2818,12 +2818,12 @@
nasal
@@ -2860,12 +2860,12 @@
nasal
@@ -2902,12 +2902,12 @@
nasal
@@ -3900,7 +3900,7 @@
nasal
-
+
@@ -3927,7 +3927,7 @@
nasal
-
+
@@ -3939,7 +3939,7 @@
nasal
-
+
@@ -4018,7 +4018,7 @@
nasal
-
+
@@ -4030,7 +4030,7 @@
nasal
-
+
@@ -4099,7 +4099,7 @@
nasal
-
+
@@ -4152,7 +4152,7 @@
nasal
-
+
@@ -4167,7 +4167,7 @@
nasal
@@ -4199,7 +4199,7 @@
nasal
@@ -4231,7 +4231,7 @@
nasal
@@ -4275,7 +4275,7 @@
nasal
-
+
@@ -4287,7 +4287,7 @@
nasal
-
+
@@ -4356,7 +4356,7 @@
nasal
-
+
@@ -4383,7 +4383,7 @@
nasal
-
+
@@ -4395,7 +4395,7 @@
nasal
-
+
@@ -4464,7 +4464,7 @@
nasal
-
+
@@ -5307,12 +5307,12 @@
nasal
@@ -5345,8 +5345,8 @@
nasal
@@ -5418,7 +5418,7 @@
true
property-adjust
- /controls/flight/elevator-trim
+ controls/flight/elevator-trim
0.01
@@ -5428,7 +5428,7 @@
true
property-adjust
- /controls/flight/elevator-trim
+ controls/flight/elevator-trim
-0.01
@@ -5543,17 +5543,17 @@
nasal
@@ -5565,18 +5565,18 @@
nasal
@@ -5815,10 +5815,10 @@
nasal
@@ -5828,10 +5828,10 @@
nasal
@@ -5841,7 +5841,7 @@
nasal
@@ -6167,7 +6167,7 @@
ecam_air_data
ecam_air_data.mark
30
- /controls/navigation/switching/air-data
+ controls/navigation/switching/air-data
-0.428673
-0.022557
@@ -6197,7 +6197,7 @@
nasal
-
+
@@ -6216,7 +6216,7 @@
nasal
-
+
@@ -6717,7 +6717,7 @@
HeadsetCpt
- /controls/audio/headset-toggle
+ controls/audio/headset-toggle
diff --git a/Models/Fuselages/A320-100/vstab.xml b/Models/Fuselages/A320-100/vstab.xml
index 09c1fbf4..024dca8a 100644
--- a/Models/Fuselages/A320-100/vstab.xml
+++ b/Models/Fuselages/A320-100/vstab.xml
@@ -37,7 +37,7 @@
Rudder
- /sim/model/lights/logo-lights
+ sim/model/lights/logo-lights
1
diff --git a/Models/Fuselages/A320/vstab.xml b/Models/Fuselages/A320/vstab.xml
index 09c1fbf4..024dca8a 100644
--- a/Models/Fuselages/A320/vstab.xml
+++ b/Models/Fuselages/A320/vstab.xml
@@ -37,7 +37,7 @@
Rudder
- /sim/model/lights/logo-lights
+ sim/model/lights/logo-lights
1
diff --git a/Models/Fuselages/A320neo/vstab.xml b/Models/Fuselages/A320neo/vstab.xml
index 09c1fbf4..024dca8a 100644
--- a/Models/Fuselages/A320neo/vstab.xml
+++ b/Models/Fuselages/A320neo/vstab.xml
@@ -37,7 +37,7 @@
Rudder
- /sim/model/lights/logo-lights
+ sim/model/lights/logo-lights
1
diff --git a/Models/Instruments/Audio/Audio1.xml b/Models/Instruments/Audio/Audio1.xml
index 83c1643c..5b92a399 100644
--- a/Models/Instruments/Audio/Audio1.xml
+++ b/Models/Instruments/Audio/Audio1.xml
@@ -14,7 +14,7 @@
property-toggle
- /controls/audio/headset-toggle
+ controls/audio/headset-toggle
diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas
index 6f86cce8..21c626ab 100644
--- a/Models/Instruments/IESI/IESI.nas
+++ b/Models/Instruments/IESI/IESI.nas
@@ -14,24 +14,24 @@ var mach_act = 0;
# props.nas nodes
var iesi_init = props.globals.initNode("/instrumentation/iesi/iesi-init", 0, "BOOL");
var iesi_time = props.globals.initNode("/instrumentation/iesi/iesi-init-time", 0.0, "DOUBLE");
-var iesi_rate = props.globals.getNode("/systems/acconfig/options/iesi-rate");
-var et = props.globals.getNode("/sim/time/elapsed-sec");
-var aconfig = props.globals.getNode("/systems/acconfig/autoconfig-running");
+var iesi_rate = props.globals.getNode("systems/acconfig/options/iesi-rate");
+var et = props.globals.getNode("sim/time/elapsed-sec");
+var aconfig = props.globals.getNode("systems/acconfig/autoconfig-running");
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");
+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 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");
+var qnh_hpa = props.globals.getNode("instrumentation/altimeter/setting-hpa");
+var qnh_inhg = props.globals.getNode("instrumentation/altimeter/setting-inhg");
var canvas_IESI_base = {
init: func(canvas_group, file) {
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
index bc316ee1..a4cfed8f 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
@@ -18,7 +18,7 @@ var lowerECAM_wheel = nil;
var lowerECAM_test = nil;
var lowerECAM_display = nil;
var page = "fctl";
-var oat = getprop("/environment/temperature-degc");
+var oat = getprop("environment/temperature-degc");
var blue_psi = 0;
var green_psi = 0;
var yellow_psi = 0;
@@ -42,217 +42,217 @@ var essTrvolts = 0;
LBS2KGS = 0.4535924;
# Fetch Nodes
-var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1);
-var elapsed_sec = props.globals.getNode("/sim/time/elapsed-sec", 1);
-var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1);
-var autoconfig_running = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
-var ac1_src = props.globals.getNode("/systems/electrical/ac1-src", 1);
-var ac2_src = props.globals.getNode("/systems/electrical/ac2-src", 1);
-var lighting_du4 = props.globals.getNode("/controls/lighting/DU/du4", 1);
-var ecam_page = props.globals.getNode("/ECAM/Lower/page", 1);
-var hour = props.globals.getNode("/sim/time/utc/hour", 1);
-var minute = props.globals.getNode("/sim/time/utc/minute", 1);
-var apu_flap = props.globals.getNode("/systems/apu/flap", 1);
-var apu_rpm = props.globals.getNode("/systems/apu/rpm", 1);
-var apu_egt = props.globals.getNode("/systems/apu/egt", 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 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("systems/apu/flap", 1);
+var apu_rpm = props.globals.getNode("systems/apu/rpm", 1);
+var apu_egt = props.globals.getNode("systems/apu/egt", 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 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_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 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 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 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");
@@ -1676,25 +1676,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();
@@ -1712,38 +1712,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();
@@ -1755,7 +1755,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 {
@@ -1768,7 +1768,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 {
@@ -1781,25 +1781,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 {
@@ -1807,7 +1807,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 {
@@ -1815,13 +1815,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();
@@ -2302,7 +2302,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);
@@ -2311,7 +2311,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);
@@ -3454,13 +3454,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 {
diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas
index daa64326..617a86b9 100644
--- a/Models/Instruments/MCDU/MCDU.nas
+++ b/Models/Instruments/MCDU/MCDU.nas
@@ -11,92 +11,92 @@ var symbol = "helvetica_medium.txf";
var normal = 70;
var small = 56;
var page = "";
-setprop("/MCDUC/colors/wht/r", 1);
-setprop("/MCDUC/colors/wht/g", 1);
-setprop("/MCDUC/colors/wht/b", 1);
-setprop("/MCDUC/colors/grn/r", 0.0509);
-setprop("/MCDUC/colors/grn/g", 0.7529);
-setprop("/MCDUC/colors/grn/b", 0.2941);
-setprop("/MCDUC/colors/blu/r", 0.0901);
-setprop("/MCDUC/colors/blu/g", 0.6039);
-setprop("/MCDUC/colors/blu/b", 0.7176);
-setprop("/MCDUC/colors/amb/r", 0.7333);
-setprop("/MCDUC/colors/amb/g", 0.3803);
-setprop("/MCDUC/colors/amb/b", 0.0000);
-setprop("/MCDUC/colors/yel/r", 0.9333);
-setprop("/MCDUC/colors/yel/g", 0.9333);
-setprop("/MCDUC/colors/yel/b", 0.0000);
+setprop("MCDUC/colors/wht/r", 1);
+setprop("MCDUC/colors/wht/g", 1);
+setprop("MCDUC/colors/wht/b", 1);
+setprop("MCDUC/colors/grn/r", 0.0509);
+setprop("MCDUC/colors/grn/g", 0.7529);
+setprop("MCDUC/colors/grn/b", 0.2941);
+setprop("MCDUC/colors/blu/r", 0.0901);
+setprop("MCDUC/colors/blu/g", 0.6039);
+setprop("MCDUC/colors/blu/b", 0.7176);
+setprop("MCDUC/colors/amb/r", 0.7333);
+setprop("MCDUC/colors/amb/g", 0.3803);
+setprop("MCDUC/colors/amb/b", 0.0000);
+setprop("MCDUC/colors/yel/r", 0.9333);
+setprop("MCDUC/colors/yel/g", 0.9333);
+setprop("MCDUC/colors/yel/b", 0.0000);
# Fetch nodes:
-var ac1 = props.globals.getNode("/systems/electrical/bus/ac-1", 1);
-var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1);
-var mcdu1_lgt = props.globals.getNode("/controls/lighting/DU/mcdu1", 1);
-var mcdu2_lgt = props.globals.getNode("/controls/lighting/DU/mcdu2", 1);
-var acType = props.globals.getNode("/MCDUC/type", 1);
-var engType = props.globals.getNode("/MCDUC/eng", 1);
-var database1 = props.globals.getNode("/FMGC/internal/navdatabase", 1);
-var database2 = props.globals.getNode("/FMGC/internal/navdatabase2", 1);
-var databaseCode = props.globals.getNode("/FMGC/internal/navdatabasecode", 1);
-var vor1 = props.globals.getNode("/FMGC/internal/vor1-mcdu", 1);
-var vor2 = props.globals.getNode("/FMGC/internal/vor2-mcdu", 1);
-var ils1 = props.globals.getNode("/FMGC/internal/ils1-mcdu", 1);
-var adf1 = props.globals.getNode("/FMGC/internal/adf1-mcdu", 1);
-var adf2 = props.globals.getNode("/FMGC/internal/adf2-mcdu", 1);
-var vor1FreqSet = props.globals.getNode("/FMGC/internal/vor1freq-set", 1);
-var vor1CRSSet = props.globals.getNode("/FMGC/internal/vor1crs-set", 1);
-var vor2FreqSet = props.globals.getNode("/FMGC/internal/vor2freq-set", 1);
-var vor2CRSSet = props.globals.getNode("/FMGC/internal/vor2crs-set", 1);
-var ils1FreqSet = props.globals.getNode("/FMGC/internal/ils1freq-set", 1);
-var ils1CRSSet = props.globals.getNode("/FMGC/internal/ils1crs-set", 1);
-var adf1FreqSet = props.globals.getNode("/FMGC/internal/adf1freq-set", 1);
-var adf2FreqSet = props.globals.getNode("/FMGC/internal/adf2freq-set", 1);
-var ils1CRS = props.globals.getNode("/instrumentation/nav[0]/radials/selected-deg", 1);
-var vor1CRS = props.globals.getNode("/instrumentation/nav[2]/radials/selected-deg", 1);
-var vor2CRS = props.globals.getNode("/instrumentation/nav[3]/radials/selected-deg", 1);
-var flightNum = props.globals.getNode("/MCDUC/flight-num", 1);
-var flightNumSet = props.globals.getNode("/MCDUC/flight-num-set", 1);
-var depArpt = props.globals.getNode("/FMGC/internal/dep-arpt", 1);
-var arrArpt = props.globals.getNode("/FMGC/internal/arr-arpt", 1);
-var toFromSet = props.globals.getNode("/FMGC/internal/tofrom-set", 1);
-var costIndex = props.globals.getNode("/FMGC/internal/cost-index", 1);
-var costIndexSet = props.globals.getNode("/FMGC/internal/cost-index-set", 1);
-var cruiseFL = props.globals.getNode("/FMGC/internal/cruise-fl", 1);
-var cruiseSet = props.globals.getNode("/FMGC/internal/cruise-lvl-set", 1);
-var tropo = props.globals.getNode("/FMGC/internal/tropo", 1);
-var tropoSet = props.globals.getNode("/FMGC/internal/tropo-set", 1);
-var ADIRSMCDUBTN = props.globals.getNode("/controls/adirs/mcducbtn", 1);
-var zfwcg = props.globals.getNode("/FMGC/internal/zfwcg", 1);
-var zfwcgSet = props.globals.getNode("/FMGC/internal/zfwcg-set", 1);
-var zfw = props.globals.getNode("/FMGC/internal/zfw", 1);
-var zfwSet = props.globals.getNode("/FMGC/internal/zfw-set", 1);
-var block = props.globals.getNode("/FMGC/internal/block", 1);
-var blockSet = props.globals.getNode("/FMGC/internal/block-set", 1);
-var state1 = props.globals.getNode("/engines/engine[0]/state", 1);
-var state2 = props.globals.getNode("/engines/engine[1]/state", 1);
-var engrdy = props.globals.getNode("/engines/ready", 1);
-var v1 = props.globals.getNode("/FMGC/internal/v1", 1);
-var v1Set = props.globals.getNode("/FMGC/internal/v1-set", 1);
-var vr = props.globals.getNode("/FMGC/internal/vr", 1);
-var vrSet = props.globals.getNode("/FMGC/internal/vr-set", 1);
-var v2 = props.globals.getNode("/FMGC/internal/v2", 1);
-var v2Set = props.globals.getNode("/FMGC/internal/v2-set", 1);
-var clbReducFt = props.globals.getNode("/systems/thrust/clbreduc-ft", 1);
-var reducFt = props.globals.getNode("/FMGC/internal/reduc-agl-ft", 1); # It's not AGL anymore
-var thrAccSet = props.globals.getNode("/MCDUC/thracc-set", 1);
-var flapTO = props.globals.getNode("/FMGC/internal/to-flap", 1);
-var THSTO = props.globals.getNode("/FMGC/internal/to-ths", 1);
-var flapTHSSet = props.globals.getNode("/FMGC/internal/flap-ths-set", 1);
-var flex = props.globals.getNode("/FMGC/internal/flex", 1);
-var flexSet = props.globals.getNode("/FMGC/internal/flex-set", 1);
-var engOutAcc = props.globals.getNode("/FMGC/internal/eng-out-reduc", 1);
-var engOutAccSet = props.globals.getNode("/MCDUC/reducacc-set", 1);
-var transAlt = props.globals.getNode("/FMGC/internal/trans-alt", 1);
-var managedSpeed = props.globals.getNode("/it-autoflight/input/spd-managed", 1);
+var ac1 = props.globals.getNode("systems/electrical/bus/ac-1", 1);
+var ac2 = props.globals.getNode("systems/electrical/bus/ac-2", 1);
+var mcdu1_lgt = props.globals.getNode("controls/lighting/DU/mcdu1", 1);
+var mcdu2_lgt = props.globals.getNode("controls/lighting/DU/mcdu2", 1);
+var acType = props.globals.getNode("MCDUC/type", 1);
+var engType = props.globals.getNode("MCDUC/eng", 1);
+var database1 = props.globals.getNode("FMGC/internal/navdatabase", 1);
+var database2 = props.globals.getNode("FMGC/internal/navdatabase2", 1);
+var databaseCode = props.globals.getNode("FMGC/internal/navdatabasecode", 1);
+var vor1 = props.globals.getNode("FMGC/internal/vor1-mcdu", 1);
+var vor2 = props.globals.getNode("FMGC/internal/vor2-mcdu", 1);
+var ils1 = props.globals.getNode("FMGC/internal/ils1-mcdu", 1);
+var adf1 = props.globals.getNode("FMGC/internal/adf1-mcdu", 1);
+var adf2 = props.globals.getNode("FMGC/internal/adf2-mcdu", 1);
+var vor1FreqSet = props.globals.getNode("FMGC/internal/vor1freq-set", 1);
+var vor1CRSSet = props.globals.getNode("FMGC/internal/vor1crs-set", 1);
+var vor2FreqSet = props.globals.getNode("FMGC/internal/vor2freq-set", 1);
+var vor2CRSSet = props.globals.getNode("FMGC/internal/vor2crs-set", 1);
+var ils1FreqSet = props.globals.getNode("FMGC/internal/ils1freq-set", 1);
+var ils1CRSSet = props.globals.getNode("FMGC/internal/ils1crs-set", 1);
+var adf1FreqSet = props.globals.getNode("FMGC/internal/adf1freq-set", 1);
+var adf2FreqSet = props.globals.getNode("FMGC/internal/adf2freq-set", 1);
+var ils1CRS = props.globals.getNode("instrumentation/nav[0]/radials/selected-deg", 1);
+var vor1CRS = props.globals.getNode("instrumentation/nav[2]/radials/selected-deg", 1);
+var vor2CRS = props.globals.getNode("instrumentation/nav[3]/radials/selected-deg", 1);
+var flightNum = props.globals.getNode("MCDUC/flight-num", 1);
+var flightNumSet = props.globals.getNode("MCDUC/flight-num-set", 1);
+var depArpt = props.globals.getNode("FMGC/internal/dep-arpt", 1);
+var arrArpt = props.globals.getNode("FMGC/internal/arr-arpt", 1);
+var toFromSet = props.globals.getNode("FMGC/internal/tofrom-set", 1);
+var costIndex = props.globals.getNode("FMGC/internal/cost-index", 1);
+var costIndexSet = props.globals.getNode("FMGC/internal/cost-index-set", 1);
+var cruiseFL = props.globals.getNode("FMGC/internal/cruise-fl", 1);
+var cruiseSet = props.globals.getNode("FMGC/internal/cruise-lvl-set", 1);
+var tropo = props.globals.getNode("FMGC/internal/tropo", 1);
+var tropoSet = props.globals.getNode("FMGC/internal/tropo-set", 1);
+var ADIRSMCDUBTN = props.globals.getNode("controls/adirs/mcducbtn", 1);
+var zfwcg = props.globals.getNode("FMGC/internal/zfwcg", 1);
+var zfwcgSet = props.globals.getNode("FMGC/internal/zfwcg-set", 1);
+var zfw = props.globals.getNode("FMGC/internal/zfw", 1);
+var zfwSet = props.globals.getNode("FMGC/internal/zfw-set", 1);
+var block = props.globals.getNode("FMGC/internal/block", 1);
+var blockSet = props.globals.getNode("FMGC/internal/block-set", 1);
+var state1 = props.globals.getNode("engines/engine[0]/state", 1);
+var state2 = props.globals.getNode("engines/engine[1]/state", 1);
+var engrdy = props.globals.getNode("engines/ready", 1);
+var v1 = props.globals.getNode("FMGC/internal/v1", 1);
+var v1Set = props.globals.getNode("FMGC/internal/v1-set", 1);
+var vr = props.globals.getNode("FMGC/internal/vr", 1);
+var vrSet = props.globals.getNode("FMGC/internal/vr-set", 1);
+var v2 = props.globals.getNode("FMGC/internal/v2", 1);
+var v2Set = props.globals.getNode("FMGC/internal/v2-set", 1);
+var clbReducFt = props.globals.getNode("systems/thrust/clbreduc-ft", 1);
+var reducFt = props.globals.getNode("FMGC/internal/reduc-agl-ft", 1); # It's not AGL anymore
+var thrAccSet = props.globals.getNode("MCDUC/thracc-set", 1);
+var flapTO = props.globals.getNode("FMGC/internal/to-flap", 1);
+var THSTO = props.globals.getNode("FMGC/internal/to-ths", 1);
+var flapTHSSet = props.globals.getNode("FMGC/internal/flap-ths-set", 1);
+var flex = props.globals.getNode("FMGC/internal/flex", 1);
+var flexSet = props.globals.getNode("FMGC/internal/flex-set", 1);
+var engOutAcc = props.globals.getNode("FMGC/internal/eng-out-reduc", 1);
+var engOutAccSet = props.globals.getNode("MCDUC/reducacc-set", 1);
+var transAlt = props.globals.getNode("FMGC/internal/trans-alt", 1);
+var managedSpeed = props.globals.getNode("it-autoflight/input/spd-managed", 1);
# Fetch nodes into vectors
-var pageProp = [props.globals.getNode("/MCDU[0]/page", 1), props.globals.getNode("/MCDU[1]/page", 1)];
-var active = [props.globals.getNode("/MCDU[0]/active", 1), props.globals.getNode("/MCDU[1]/active", 1)];
-var scratchpad = [props.globals.getNode("/MCDU[0]/scratchpad", 1), props.globals.getNode("/MCDU[1]/scratchpad", 1)];
+var pageProp = [props.globals.getNode("MCDU[0]/page", 1), props.globals.getNode("MCDU[1]/page", 1)];
+var active = [props.globals.getNode("MCDU[0]/active", 1), props.globals.getNode("MCDU[1]/active", 1)];
+var scratchpad = [props.globals.getNode("MCDU[0]/scratchpad", 1), props.globals.getNode("MCDU[1]/scratchpad", 1)];
# Create Nodes:
var pageSwitch = [props.globals.initNode("/MCDU[0]/internal/switch", 0, "BOOL"), props.globals.initNode("/MCDU[1]/internal/switch", 0, "BOOL")];
@@ -1417,162 +1417,162 @@ var canvas_MCDU_base = {
# ack = ignore, wht = white, grn = green, blu = blue, amb = amber, yel = yellow
colorLeft: func(a, b, c, d, e, f) {
if (a != "ack") {
- me["Simple_L1"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
+ me["Simple_L1"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
}
if (b != "ack") {
- me["Simple_L2"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
+ me["Simple_L2"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
}
if (c != "ack") {
- me["Simple_L3"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
+ me["Simple_L3"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
}
if (d != "ack") {
- me["Simple_L4"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
+ me["Simple_L4"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
}
if (e != "ack") {
- me["Simple_L5"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
+ me["Simple_L5"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
}
if (f != "ack") {
- me["Simple_L6"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
+ me["Simple_L6"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
}
},
colorLeftS: func(a, b, c, d, e, f) {
if (a != "ack") {
- me["Simple_L1S"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
+ me["Simple_L1S"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
}
if (b != "ack") {
- me["Simple_L2S"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
+ me["Simple_L2S"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
}
if (c != "ack") {
- me["Simple_L3S"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
+ me["Simple_L3S"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
}
if (d != "ack") {
- me["Simple_L4S"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
+ me["Simple_L4S"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
}
if (e != "ack") {
- me["Simple_L5S"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
+ me["Simple_L5S"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
}
if (f != "ack") {
- me["Simple_L6S"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
+ me["Simple_L6S"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
}
},
colorLeftArrow: func(a, b, c, d, e, f) {
if (a != "ack") {
- me["Simple_L1_Arrow"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
+ me["Simple_L1_Arrow"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
}
if (b != "ack") {
- me["Simple_L2_Arrow"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
+ me["Simple_L2_Arrow"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
}
if (c != "ack") {
- me["Simple_L3_Arrow"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
+ me["Simple_L3_Arrow"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
}
if (d != "ack") {
- me["Simple_L4_Arrow"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
+ me["Simple_L4_Arrow"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
}
if (e != "ack") {
- me["Simple_L5_Arrow"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
+ me["Simple_L5_Arrow"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
}
if (f != "ack") {
- me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
+ me["Simple_L6_Arrow"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
}
},
colorRight: func(a, b, c, d, e, f) {
if (a != "ack") {
- me["Simple_R1"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
+ me["Simple_R1"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
}
if (b != "ack") {
- me["Simple_R2"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
+ me["Simple_R2"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
}
if (c != "ack") {
- me["Simple_R3"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
+ me["Simple_R3"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
}
if (d != "ack") {
- me["Simple_R4"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
+ me["Simple_R4"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
}
if (e != "ack") {
- me["Simple_R5"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
+ me["Simple_R5"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
}
if (f != "ack") {
- me["Simple_R6"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
+ me["Simple_R6"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
}
},
colorRightS: func(a, b, c, d, e, f) {
if (a != "ack") {
- me["Simple_R1S"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
+ me["Simple_R1S"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
}
if (b != "ack") {
- me["Simple_R2S"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
+ me["Simple_R2S"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
}
if (c != "ack") {
- me["Simple_R3S"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
+ me["Simple_R3S"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
}
if (d != "ack") {
- me["Simple_R4S"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
+ me["Simple_R4S"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
}
if (e != "ack") {
- me["Simple_R5S"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
+ me["Simple_R5S"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
}
if (f != "ack") {
- me["Simple_R6S"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
+ me["Simple_R6S"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
}
},
colorRightArrow: func(a, b, c, d, e, f) {
if (a != "ack") {
- me["Simple_R1_Arrow"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
+ me["Simple_R1_Arrow"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
}
if (b != "ack") {
- me["Simple_R2_Arrow"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
+ me["Simple_R2_Arrow"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
}
if (c != "ack") {
- me["Simple_R3_Arrow"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
+ me["Simple_R3_Arrow"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
}
if (d != "ack") {
- me["Simple_R4_Arrow"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
+ me["Simple_R4_Arrow"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
}
if (e != "ack") {
- me["Simple_R5_Arrow"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
+ me["Simple_R5_Arrow"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
}
if (f != "ack") {
- me["Simple_R6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
+ me["Simple_R6_Arrow"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
}
},
colorCenter: func(a, b, c, d, e, f) {
if (a != "ack") {
- me["Simple_C1"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
+ me["Simple_C1"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
}
if (b != "ack") {
- me["Simple_C2"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
+ me["Simple_C2"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
}
if (c != "ack") {
- me["Simple_C3"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
+ me["Simple_C3"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
}
if (d != "ack") {
- me["Simple_C4"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
+ me["Simple_C4"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
}
if (e != "ack") {
- me["Simple_C5"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
+ me["Simple_C5"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
}
if (f != "ack") {
- me["Simple_C6"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
+ me["Simple_C6"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
}
},
colorCenterS: func(a, b, c, d, e, f) {
if (a != "ack") {
- me["Simple_C1S"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
+ me["Simple_C1S"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
}
if (b != "ack") {
- me["Simple_C2S"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
+ me["Simple_C2S"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
}
if (c != "ack") {
- me["Simple_C3S"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
+ me["Simple_C3S"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
}
if (d != "ack") {
- me["Simple_C4S"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
+ me["Simple_C4S"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
}
if (e != "ack") {
- me["Simple_C5S"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
+ me["Simple_C5S"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
}
if (f != "ack") {
- me["Simple_C6S"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
+ me["Simple_C6S"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
}
},
# 0 = ignore
diff --git a/Models/Instruments/ND/canvas/A3XX_ND.nas b/Models/Instruments/ND/canvas/A3XX_ND.nas
index ab682866..0a38070c 100644
--- a/Models/Instruments/ND/canvas/A3XX_ND.nas
+++ b/Models/Instruments/ND/canvas/A3XX_ND.nas
@@ -5,7 +5,7 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
var get_local_path = func(file){
- var aircraft_dir = split("/", getprop("/sim/aircraft-dir"))[-1];
+ var aircraft_dir = split("/", getprop("sim/aircraft-dir"))[-1];
return "Aircraft/" ~ aircraft_dir ~ "/Models/Instruments/ND/canvas/"~ file;
};
diff --git a/Models/Instruments/ND/canvas/ND.nas b/Models/Instruments/ND/canvas/ND.nas
index ff78c1aa..6454dad8 100644
--- a/Models/Instruments/ND/canvas/ND.nas
+++ b/Models/Instruments/ND/canvas/ND.nas
@@ -14,23 +14,23 @@ var ND_2_test = nil;
var elapsedtime = 0;
# Fetch nodes:
-var du1_test = props.globals.getNode("/instrumentation/du/du1-test");
-var du1_test_time = props.globals.getNode("/instrumentation/du/du1-test-time");
-var du1_test_amount = props.globals.getNode("/instrumentation/du/du1-test-amount");
-var du2_test = props.globals.getNode("/instrumentation/du/du2-test");
-var du2_test_time = props.globals.getNode("/instrumentation/du/du2-test-time");
-var du2_test_amount = props.globals.getNode("/instrumentation/du/du2-test-amount");
+var du1_test = props.globals.getNode("instrumentation/du/du1-test");
+var du1_test_time = props.globals.getNode("instrumentation/du/du1-test-time");
+var du1_test_amount = props.globals.getNode("instrumentation/du/du1-test-amount");
+var du2_test = props.globals.getNode("instrumentation/du/du2-test");
+var du2_test_time = props.globals.getNode("instrumentation/du/du2-test-time");
+var du2_test_amount = props.globals.getNode("instrumentation/du/du2-test-amount");
var du2_offtime = props.globals.initNode("/instrumentation/du/du2-off-time", 0.0, "DOUBLE");
-var du5_test = props.globals.getNode("/instrumentation/du/du5-test");
-var du5_test_time = props.globals.getNode("/instrumentation/du/du5-test-time");
+var du5_test = props.globals.getNode("instrumentation/du/du5-test");
+var du5_test_time = props.globals.getNode("instrumentation/du/du5-test-time");
var du5_offtime = props.globals.initNode("/instrumentation/du/du5-off-time", 0.0, "DOUBLE");
-var du5_test_amount = props.globals.getNode("/instrumentation/du/du5-test-amount");
-var du6_test = props.globals.getNode("/instrumentation/du/du6-test");
-var du6_test_time = props.globals.getNode("/instrumentation/du/du6-test-time");
-var du6_test_amount = props.globals.getNode("/instrumentation/du/du6-test-amount");
-var cpt_du_xfr = props.globals.getNode("/modes/cpt-du-xfr");
-var fo_du_xfr = props.globals.getNode("/modes/fo-du-xfr");
-var wow0 = props.globals.getNode("/gear/gear[0]/wow");
+var du5_test_amount = props.globals.getNode("instrumentation/du/du5-test-amount");
+var du6_test = props.globals.getNode("instrumentation/du/du6-test");
+var du6_test_time = props.globals.getNode("instrumentation/du/du6-test-time");
+var du6_test_amount = props.globals.getNode("instrumentation/du/du6-test-amount");
+var cpt_du_xfr = props.globals.getNode("modes/cpt-du-xfr");
+var fo_du_xfr = props.globals.getNode("modes/fo-du-xfr");
+var wow0 = props.globals.getNode("gear/gear[0]/wow");
var nd_display = {};
@@ -87,18 +87,18 @@ var canvas_nd_base = {
return [];
},
updateDu2: func() {
- var elapsedtime = getprop("/sim/time/elapsed-sec");
- if (getprop("/systems/electrical/bus/ac-ess-shed") >= 110) {
+ var elapsedtime = getprop("sim/time/elapsed-sec");
+ if (getprop("systems/electrical/bus/ac-ess-shed") >= 110) {
if (du2_offtime.getValue() + 3 < elapsedtime) {
if (wow0.getValue() == 1) {
- if (getprop("/systems/acconfig/autoconfig-running") != 1 and du2_test.getValue() != 1) {
+ if (getprop("systems/acconfig/autoconfig-running") != 1 and du2_test.getValue() != 1) {
du2_test.setValue(1);
du2_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
- du2_test_time.setValue(getprop("/sim/time/elapsed-sec"));
- } else if (getprop("/systems/acconfig/autoconfig-running") == 1 and du2_test.getValue() != 1) {
+ du2_test_time.setValue(getprop("sim/time/elapsed-sec"));
+ } else if (getprop("systems/acconfig/autoconfig-running") == 1 and du2_test.getValue() != 1) {
du2_test.setValue(1);
du2_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
- du2_test_time.setValue(getprop("/sim/time/elapsed-sec") - 30);
+ du2_test_time.setValue(getprop("sim/time/elapsed-sec") - 30);
}
} else {
du2_test.setValue(1);
@@ -112,18 +112,18 @@ var canvas_nd_base = {
}
},
updateDu5: func() {
- var elapsedtime = getprop("/sim/time/elapsed-sec");
- if (getprop("/systems/electrical/bus/ac-2") >= 110) {
+ var elapsedtime = getprop("sim/time/elapsed-sec");
+ if (getprop("systems/electrical/bus/ac-2") >= 110) {
if (du5_offtime.getValue() + 3 < elapsedtime) {
if (wow0.getValue() == 1) {
- if (getprop("/systems/acconfig/autoconfig-running") != 1 and du5_test.getValue() != 1) {
+ if (getprop("systems/acconfig/autoconfig-running") != 1 and du5_test.getValue() != 1) {
du5_test.setValue(1);
du5_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
- du5_test_time.setValue(getprop("/sim/time/elapsed-sec"));
- } else if (getprop("/systems/acconfig/autoconfig-running") == 1 and du5_test.getValue() != 1) {
+ du5_test_time.setValue(getprop("sim/time/elapsed-sec"));
+ } else if (getprop("systems/acconfig/autoconfig-running") == 1 and du5_test.getValue() != 1) {
du5_test.setValue(1);
du5_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
- du5_test_time.setValue(getprop("/sim/time/elapsed-sec") - 30);
+ du5_test_time.setValue(getprop("sim/time/elapsed-sec") - 30);
}
} else {
du5_test.setValue(1);
@@ -138,9 +138,9 @@ var canvas_nd_base = {
},
update: func() {
- var elapsedtime = getprop("/sim/time/elapsed-sec");
+ var elapsedtime = getprop("sim/time/elapsed-sec");
- if (getprop("/systems/electrical/bus/ac-ess-shed") >= 110 and getprop("/controls/lighting/DU/du2") > 0) {
+ if (getprop("systems/electrical/bus/ac-ess-shed") >= 110 and getprop("controls/lighting/DU/du2") > 0) {
if (du2_test_time.getValue() + du2_test_amount.getValue() >= elapsedtime and cpt_du_xfr.getValue() != 1) {
ND_1.page.hide();
ND_1_test.page.show();
@@ -158,7 +158,7 @@ var canvas_nd_base = {
ND_1_test.page.hide();
ND_1.page.hide();
}
- if (getprop("/systems/electrical/bus/ac-2") >= 110 and getprop("/controls/lighting/DU/du5") > 0) {
+ if (getprop("systems/electrical/bus/ac-2") >= 110 and getprop("controls/lighting/DU/du5") > 0) {
if (du5_test_time.getValue() + du5_test_amount.getValue() >= elapsedtime and fo_du_xfr.getValue() != 1) {
ND_2.page.hide();
ND_2_test.page.show();
@@ -246,12 +246,12 @@ var canvas_ND_1_test = {
return ["Test_white","Test_text"];
},
update: func() {
- elapsedtime = getprop("/sim/time/elapsed-sec") or 0;
- if ((du2_test_time.getValue() + 1 >= elapsedtime) and getprop("/modes/cpt-du-xfr") != 1) {
+ elapsedtime = getprop("sim/time/elapsed-sec") or 0;
+ if ((du2_test_time.getValue() + 1 >= elapsedtime) and getprop("modes/cpt-du-xfr") != 1) {
me["Test_white"].show();
me["Test_text"].hide();
- } else if ((du1_test_time.getValue() + 1 >= elapsedtime) and getprop("/modes/cpt-du-xfr") != 0) {
- print(getprop("/modes/cpt-du-xfr"));
+ } else if ((du1_test_time.getValue() + 1 >= elapsedtime) and getprop("modes/cpt-du-xfr") != 0) {
+ print(getprop("modes/cpt-du-xfr"));
me["Test_white"].show();
me["Test_text"].hide();
} else {
@@ -288,11 +288,11 @@ var canvas_ND_2_test = {
return ["Test_white","Test_text"];
},
update: func() {
- elapsedtime = getprop("/sim/time/elapsed-sec") or 0;
- if ((du5_test_time.getValue() + 1 >= elapsedtime) and getprop("/modes/cpt-du-xfr") != 1) {
+ elapsedtime = getprop("sim/time/elapsed-sec") or 0;
+ if ((du5_test_time.getValue() + 1 >= elapsedtime) and getprop("modes/cpt-du-xfr") != 1) {
me["Test_white"].show();
me["Test_text"].hide();
- } else if ((du6_test_time.getValue() + 1 >= elapsedtime) and getprop("/modes/cpt-du-xfr") != 0) {
+ } else if ((du6_test_time.getValue() + 1 >= elapsedtime) and getprop("modes/cpt-du-xfr") != 0) {
me["Test_white"].show();
me["Test_text"].hide();
} else {
@@ -333,13 +333,13 @@ setlistener("sim/signals/fdm-initialized", func {
ND_2_test = canvas_ND_2_test.new(group_nd2_test, "Aircraft/A320-family/Models/Instruments/Common/res/du-test.svg");
nd_update.start();
- if (getprop("/systems/acconfig/options/nd-rate") > 1) {
+ if (getprop("systems/acconfig/options/nd-rate") > 1) {
rateApply();
}
});
var rateApply = func {
- nd_update.restart(0.05 * getprop("/systems/acconfig/options/nd-rate"));
+ nd_update.restart(0.05 * getprop("systems/acconfig/options/nd-rate"));
}
var nd_update = maketimer(0.05, func {
@@ -352,7 +352,7 @@ for (i = 0; i < 2; i = i + 1 ) {
var idx = par.getIndex();
var canvas_mode = "/instrumentation/efis["~idx~"]/nd/canvas-display-mode";
var nd_centered = "/instrumentation/efis["~idx~"]/inputs/nd-centered";
- var mode = getprop("/instrumentation/efis["~idx~"]/nd/display-mode");
+ var mode = getprop("instrumentation/efis["~idx~"]/nd/display-mode");
var cvs_mode = "NAV";
var centered = 1;
if (mode == "ILS") {
@@ -377,7 +377,7 @@ for (i = 0; i < 2; i = i + 1 ) {
}
setlistener("/instrumentation/efis[0]/nd/terrain-on-nd", func{
- var terr_on_hd = getprop("/instrumentation/efis[0]/nd/terrain-on-nd");
+ var terr_on_hd = getprop("instrumentation/efis[0]/nd/terrain-on-nd");
var alpha = 1;
if (terr_on_hd) {
alpha = 0.5;
diff --git a/Models/Instruments/ND/canvas/framework/navdisplay.nas b/Models/Instruments/ND/canvas/framework/navdisplay.nas
index 38b2b911..9006790d 100644
--- a/Models/Instruments/ND/canvas/framework/navdisplay.nas
+++ b/Models/Instruments/ND/canvas/framework/navdisplay.nas
@@ -304,12 +304,12 @@ canvas.NavDisplay.update_sub = func(){
pos.lat = wp.wp_lat;
pos.lon = wp.wp_lon;
} else {
- pos.lat = getprop("/autopilot/route-manager/route/wp["~pln_wpt_idx~"]/latitude-deg");
- pos.lon = getprop("/autopilot/route-manager/route/wp["~pln_wpt_idx~"]/longitude-deg");
+ pos.lat = getprop("autopilot/route-manager/route/wp["~pln_wpt_idx~"]/latitude-deg");
+ pos.lon = getprop("autopilot/route-manager/route/wp["~pln_wpt_idx~"]/longitude-deg");
}
} else {
- pos.lat = getprop("/autopilot/route-manager/route/wp["~pln_wpt_idx~"]/latitude-deg");
- pos.lon = getprop("/autopilot/route-manager/route/wp["~pln_wpt_idx~"]/longitude-deg");
+ pos.lat = getprop("autopilot/route-manager/route/wp["~pln_wpt_idx~"]/latitude-deg");
+ pos.lon = getprop("autopilot/route-manager/route/wp["~pln_wpt_idx~"]/longitude-deg");
}
} else {
pos.lat = userLat;
@@ -407,8 +407,8 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
}
# Hide heading bug 10 secs after change
- var vhdg_bug = getprop("/it-autoflight/input/hdg") or 0;
- var hdg_bug_active = getprop("/it-autoflight/custom/show-hdg");
+ var vhdg_bug = getprop("it-autoflight/input/hdg") or 0;
+ var hdg_bug_active = getprop("it-autoflight/custom/show-hdg");
if (hdg_bug_active == nil)
hdg_bug_active = 1;
@@ -445,13 +445,13 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
var vorheading = userHdgTru;
var adfheading = userHdgMag;
}
- if (getprop("/instrumentation/nav[2]/heading-deg") != nil) {
- var nav0hdg = getprop("/instrumentation/nav[2]/heading-deg") - getprop("/orientation/heading-deg");
+ if (getprop("instrumentation/nav[2]/heading-deg") != nil) {
+ var nav0hdg = getprop("instrumentation/nav[2]/heading-deg") - getprop("orientation/heading-deg");
} else {
var nav0hdg = 0;
}
- if (getprop("/instrumentation/nav[3]/heading-deg") != nil) {
- var nav1hdg = getprop("/instrumentation/nav[3]/heading-deg") - getprop("/orientation/heading-deg");
+ if (getprop("instrumentation/nav[3]/heading-deg") != nil) {
+ var nav1hdg = getprop("instrumentation/nav[3]/heading-deg") - getprop("orientation/heading-deg");
} else {
var nav1hdg = 0;
}
@@ -595,5 +595,5 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
me.symbols["status.sta"].setVisible( me.get_switch("toggle_stations") and me.in_mode("toggle_display_mode", ["MAP"]));
# Okay, _how_ do we hook this up with FGPlot?
printlog(_MP_dbg_lvl, "Total ND update took "~((systime()-_time)*100)~"ms");
- setprop("/instrumentation/navdisplay["~ canvas.NavDisplay.id ~"]/update-ms", systime() - _time);
+ setprop("instrumentation/navdisplay["~ canvas.NavDisplay.id ~"]/update-ms", systime() - _time);
};
diff --git a/Models/Instruments/ND/canvas/helpers.nas b/Models/Instruments/ND/canvas/helpers.nas
index 44eb38d2..f7d69ed1 100644
--- a/Models/Instruments/ND/canvas/helpers.nas
+++ b/Models/Instruments/ND/canvas/helpers.nas
@@ -23,7 +23,7 @@ var SymbolPainter = {
},
getAircraftDir: func(){
if(me.aircraft_dir == nil)
- me.aircraft_dir = split("/", getprop("/sim/aircraft-dir"))[-1];
+ me.aircraft_dir = split("/", getprop("sim/aircraft-dir"))[-1];
return me.aircraft_dir;
},
svgPath: func(file){
diff --git a/Models/Instruments/ND/canvas/loaders.nas b/Models/Instruments/ND/canvas/loaders.nas
index 72b56df7..a6d831b6 100644
--- a/Models/Instruments/ND/canvas/loaders.nas
+++ b/Models/Instruments/ND/canvas/loaders.nas
@@ -13,7 +13,7 @@ setlistener("/nasal/canvas/loaded", func() {
####### LOAD FILES #######
#print("loading files");
(func {
- var aircraft_root = getprop("/sim/aircraft-dir");
+ var aircraft_root = getprop("sim/aircraft-dir");
var load = func(file, name) {
#print("Loading ..." ~ file);
diff --git a/Models/Instruments/ND/canvas/map/APS.symbol b/Models/Instruments/ND/canvas/map/APS.symbol
index e54f4639..c5548d96 100644
--- a/Models/Instruments/ND/canvas/map/APS.symbol
+++ b/Models/Instruments/ND/canvas/map/APS.symbol
@@ -12,7 +12,7 @@ var element_id = "airplane";
# Will have to be adapted if intended for use with other aircraft
# (but one could simply copy the layer for that).
var draw = func {
- var rot = getprop("/orientation/heading-deg");
+ var rot = getprop("orientation/heading-deg");
rot -= me.layer.map.getHdg();
me.element.setRotation(rot*D2R);
};
diff --git a/Models/Instruments/ND/canvas/map/WPT-airbus.symbol b/Models/Instruments/ND/canvas/map/WPT-airbus.symbol
index 29f6fe26..2b502de2 100644
--- a/Models/Instruments/ND/canvas/map/WPT-airbus.symbol
+++ b/Models/Instruments/ND/canvas/map/WPT-airbus.symbol
@@ -127,7 +127,7 @@ var draw = func{
}
if(me.model.is_departure or me.model.is_destination){
var prop = (me.model.is_departure ? 'departure' : 'destination');
- var rwy = getprop("/autopilot/route-manager/"~prop~"/runway");
+ var rwy = getprop("autopilot/route-manager/"~prop~"/runway");
if(rwy != nil and size(rwy) > 0){
me.wp_sym.hide();
} else {
diff --git a/Models/Instruments/ND/canvas/map/WXR_live.lcontroller b/Models/Instruments/ND/canvas/map/WXR_live.lcontroller
index f75c8322..6850a9ee 100644
--- a/Models/Instruments/ND/canvas/map/WXR_live.lcontroller
+++ b/Models/Instruments/ND/canvas/map/WXR_live.lcontroller
@@ -25,9 +25,9 @@ var new = func(layer) {
};
layer.searcher._equals = func(l,r) l.equals(r);
m.addVisibilityListener();
- var aircraft_dir = split('/', getprop("/sim/aircraft-dir"))[-1];
- var saved_conf = getprop("/sim/fg-home") ~ "/Export/wxr_api.xml";
- var df_conf = getprop("/sim/fg-root") ~ "/Aircraft/" ~ aircraft_dir ~
+ var aircraft_dir = split('/', getprop("sim/aircraft-dir"))[-1];
+ var saved_conf = getprop("sim/fg-home") ~ "/Export/wxr_api.xml";
+ var df_conf = getprop("sim/fg-root") ~ "/Aircraft/" ~ aircraft_dir ~
"/Models/Instruments/ND/canvas/wxr_api.xml";
if(io.stat(saved_conf) != nil)
io.read_properties(saved_conf, wxr_tree);
diff --git a/Models/Instruments/ND/canvas/map/WXR_live.symbol b/Models/Instruments/ND/canvas/map/WXR_live.symbol
index 71c794f3..53971407 100644
--- a/Models/Instruments/ND/canvas/map/WXR_live.symbol
+++ b/Models/Instruments/ND/canvas/map/WXR_live.symbol
@@ -51,11 +51,11 @@ var fetchWXRMap = func(size){
.setSize(sz, sz)
.setTranslation(transl, transl);
me.wxlayer.show();
- me.last_request = getprop("/sim/time/elapsed-sec");
+ me.last_request = getprop("sim/time/elapsed-sec");
})
.always(func(){
- setprop("/instrumentation/wxr/center/latitude-deg", lat);
- setprop("/instrumentation/wxr/center/longitude-deg", lon);
+ setprop("instrumentation/wxr/center/latitude-deg", lat);
+ setprop("instrumentation/wxr/center/longitude-deg", lon);
me.fetching = 0;
print("[WXR] Live Layer Request: "~url); # Debugging
});
@@ -101,7 +101,7 @@ var draw = func {
me.wxlayer.show();
}
- if(getprop("/sim/time/elapsed-sec") - me.last_request > me.update_interval) {
+ if(getprop("sim/time/elapsed-sec") - me.last_request > me.update_interval) {
#print('Fetching WXR map...');
me.key = me.model.key; # API Key from Wunderground API Subscription
me.res = me.model.res; # Resolution of image to fetch (default 2048)
diff --git a/Models/Instruments/ND/canvas/style.nas b/Models/Instruments/ND/canvas/style.nas
index 7c452162..80d45d5b 100644
--- a/Models/Instruments/ND/canvas/style.nas
+++ b/Models/Instruments/ND/canvas/style.nas
@@ -687,7 +687,7 @@ canvas.NDStyles["Airbus"] = {
init: func(nd,symbol),
predicate: func(nd) nd.aircraft_source.get_spd() > 100,
is_true: func(nd) {
- nd.symbols.tas.setText(sprintf("%3.0f",getprop("/velocities/TAS") ));
+ nd.symbols.tas.setText(sprintf("%3.0f",getprop("velocities/TAS") ));
nd.symbols.tas.show();
},
is_false: func(nd) nd.symbols.tas.hide(),
@@ -740,11 +740,11 @@ canvas.NDStyles["Airbus"] = {
id: "wpActiveId",
impl: {
init: func(nd,symbol),
- predicate: func(nd) getprop("/autopilot/route-manager/wp/id") != nil and
+ predicate: func(nd) getprop("autopilot/route-manager/wp/id") != nil and
getprop("autopilot/route-manager/active") and
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
is_true: func(nd) {
- nd.symbols.wpActiveId.setText(getprop("/autopilot/route-manager/wp/id"));
+ nd.symbols.wpActiveId.setText(getprop("autopilot/route-manager/wp/id"));
nd.symbols.wpActiveId.show();
},
is_false: func(nd) nd.symbols.wpActiveId.hide(),
@@ -754,12 +754,12 @@ canvas.NDStyles["Airbus"] = {
id: "wpActiveCrs",
impl: {
init: func(nd,symbol),
- predicate: func(nd) getprop("/autopilot/route-manager/wp/id") != nil and
+ predicate: func(nd) getprop("autopilot/route-manager/wp/id") != nil and
getprop("autopilot/route-manager/active") and
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
is_true: func(nd) {
#var cur_wp = getprop("autopilot/route-manager/current-wp");
- var deg = int(getprop("/autopilot/route-manager/wp/bearing-deg"));
+ var deg = int(getprop("autopilot/route-manager/wp/bearing-deg"));
nd.symbols.wpActiveCrs.setText((deg or "")~"°");
nd.symbols.wpActiveCrs.show();
},
@@ -770,11 +770,11 @@ canvas.NDStyles["Airbus"] = {
id: "wpActiveDist",
impl: {
init: func(nd,symbol),
- predicate: func(nd) getprop("/autopilot/route-manager/wp/dist") != nil and
+ predicate: func(nd) getprop("autopilot/route-manager/wp/dist") != nil and
getprop("autopilot/route-manager/active") and
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
is_true: func(nd) {
- var dst = getprop("/autopilot/route-manager/wp/dist");
+ var dst = getprop("autopilot/route-manager/wp/dist");
nd.symbols.wpActiveDist.setText(sprintf("%3.01f",dst));
nd.symbols.wpActiveDist.show();
},
@@ -785,10 +785,10 @@ canvas.NDStyles["Airbus"] = {
id: "wpActiveDistLbl",
impl: {
init: func(nd,symbol),
- predicate: func(nd) getprop("/autopilot/route-manager/wp/dist") != nil and getprop("autopilot/route-manager/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
+ predicate: func(nd) getprop("autopilot/route-manager/wp/dist") != nil and getprop("autopilot/route-manager/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
is_true: func(nd) {
nd.symbols.wpActiveDistLbl.show();
- if(getprop("/autopilot/route-manager/wp/dist") > 1000)
+ if(getprop("autopilot/route-manager/wp/dist") > 1000)
nd.symbols.wpActiveDistLbl.setText(" NM");
},
is_false: func(nd) nd.symbols.wpActiveDistLbl.hide(),
@@ -800,7 +800,7 @@ canvas.NDStyles["Airbus"] = {
init: func(nd,symbol),
predicate: func(nd) getprop("autopilot/route-manager/wp/eta") != nil and getprop("autopilot/route-manager/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
is_true: func(nd) {
- var etaSec = getprop("/sim/time/utc/day-seconds")+
+ var etaSec = getprop("sim/time/utc/day-seconds")+
getprop("autopilot/route-manager/wp/eta-seconds");
var h = math.floor(etaSec/3600);
etaSec = etaSec-3600*h;
@@ -1190,9 +1190,9 @@ canvas.NDStyles["Airbus"] = {
var type = (is_ils ? "ils" : "vor");
var path = nd.get_nav_path(type, 0);
if (is_ils) {
- nd.symbols.vorCrsPtr2.setRotation((getprop("/instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_mag())*D2R);
+ nd.symbols.vorCrsPtr2.setRotation((getprop("instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_mag())*D2R);
} else {
- nd.symbols.vorCrsPtr2.setRotation((getprop("/instrumentation/nav[2]/radials/selected-deg")-nd.aircraft_source.get_hdg_mag())*D2R);
+ nd.symbols.vorCrsPtr2.setRotation((getprop("instrumentation/nav[2]/radials/selected-deg")-nd.aircraft_source.get_hdg_mag())*D2R);
}
var line = nd.symbols.vorCrsPtr2.getElementById("vorCrsPtr2_line");
if(!is_ils){
@@ -1213,7 +1213,7 @@ canvas.NDStyles["Airbus"] = {
predicate: func(nd) nd.in_mode("toggle_display_mode", ["APP"]),
is_true: func(nd) {
if(getprop("instrumentation/nav/gs-needle-deflection-norm") != nil)
- nd.symbols.gsDiamond.setTranslation(getprop("/instrumentation/nav[0]/gs-needle-deflection-norm")*150,0);
+ nd.symbols.gsDiamond.setTranslation(getprop("instrumentation/nav[0]/gs-needle-deflection-norm")*150,0);
},
is_false: func(nd) nd.symbols.gsGroup.hide(),
},
@@ -1225,7 +1225,7 @@ canvas.NDStyles["Airbus"] = {
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR"]) and !nd.get_switch("toggle_centered") and getprop("instrumentation/nav/in-range")),
is_true: func(nd) {
nd.symbols.locPtr.show();
- var deflection = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm");
+ var deflection = getprop("instrumentation/nav[0]/heading-needle-deflection-norm");
nd.symbols.locPtr.setTranslation(deflection*150,0);
},
is_false: func(nd) nd.symbols.locPtr.hide(),
@@ -1274,8 +1274,8 @@ canvas.NDStyles["Airbus"] = {
impl: {
init: func(nd,symbol),
predicate: func(nd) {
- var nav_id = getprop("/instrumentation/nav/nav-id");
- var ils_mode = getprop("/flight-management/freq/ils-mode");
+ var nav_id = getprop("instrumentation/nav/nav-id");
+ var ils_mode = getprop("flight-management/freq/ils-mode");
var has_ils = (nav_id != nil and nav_id != "");
(nd.get_switch("toggle_display_mode") == "MAP" and
!nd.get_switch("toggle_centered") and has_ils and ils_mode);
@@ -1294,8 +1294,8 @@ canvas.NDStyles["Airbus"] = {
impl: {
init: func(nd,symbol),
predicate: func(nd) {
- var nav_id = getprop("/instrumentation/nav/nav-id");
- var ils_mode = getprop("/flight-management/freq/ils-mode");
+ var nav_id = getprop("instrumentation/nav/nav-id");
+ var ils_mode = getprop("flight-management/freq/ils-mode");
var has_ils = (nav_id != nil and nav_id != "");
(nd.get_switch("toggle_display_mode") == "MAP" and
nd.get_switch("toggle_centered") and has_ils and ils_mode);
diff --git a/Models/Instruments/OHpanel.new/OHpanel.xml b/Models/Instruments/OHpanel.new/OHpanel.xml
index 585c8729..af64ae10 100644
--- a/Models/Instruments/OHpanel.new/OHpanel.xml
+++ b/Models/Instruments/OHpanel.new/OHpanel.xml
@@ -92,7 +92,7 @@
adirs-coords
- /systems/electrical/outputs/efis
+ systems/electrical/outputs/efis
9
@@ -2002,7 +2002,7 @@
xy-plane
text-value
%s
- /instrumentation/oh-panel/pos-string
+ instrumentation/oh-panel/pos-string
Helvetica.txf
true
false
@@ -2028,7 +2028,7 @@
xy-plane
number-value
%2.1f
- /systems/electrical/suppliers/battery
+ systems/electrical/suppliers/battery
led.txf
true
false
@@ -2054,7 +2054,7 @@
xy-plane
number-value
%2.1f
- /systems/electrical/suppliers/battery
+ systems/electrical/suppliers/battery
led.txf
true
false
diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml
index 59a21701..066caf2e 100644
--- a/Models/Instruments/OHpanel/OHpanel.xml
+++ b/Models/Instruments/OHpanel/OHpanel.xml
@@ -215,7 +215,7 @@
- /controls/ventilation/blowFail
+ controls/ventilation/blowFail
1
@@ -233,7 +233,7 @@
- /systems/fire/cargo/fwd/warning-active
+ systems/fire/cargo/fwd/warning-active
1
@@ -250,7 +250,7 @@
- /systems/fire/cargo/aft/warning-active
+ systems/fire/cargo/aft/warning-active
1
@@ -267,11 +267,11 @@
- /systems/fire/cargo/disch
+ systems/fire/cargo/disch
1
- /systems/fire/cargo/disch-test
+ systems/fire/cargo/disch-test
1
@@ -288,11 +288,11 @@
- /systems/fire/cargo/disch
+ systems/fire/cargo/disch
1
- /systems/fire/cargo/disch-test
+ systems/fire/cargo/disch-test
1
@@ -323,7 +323,7 @@
nasal
-
+
@@ -384,7 +384,7 @@
nasal
-
+
@@ -432,7 +432,7 @@
nasal
-
+
@@ -454,7 +454,7 @@
nasal
-
+
@@ -476,7 +476,7 @@
nasal
-
+
@@ -531,7 +531,7 @@
nasal
-
+
@@ -550,7 +550,7 @@
nasal
-
+
@@ -627,7 +627,7 @@
nasal
-
+
@@ -646,7 +646,7 @@
nasal
-
+
@@ -723,7 +723,7 @@
nasal
-
+
@@ -742,7 +742,7 @@
nasal
-
+
@@ -840,7 +840,7 @@
nasal
-
+
@@ -902,7 +902,7 @@
nasal
-
+
@@ -964,7 +964,7 @@
nasal
-
+
@@ -1198,7 +1198,7 @@
nasal
-
+
@@ -1210,7 +1210,7 @@
- /systems/failures/elac1-fault
+ systems/failures/elac1-fault
1
@@ -1261,7 +1261,7 @@
nasal
-
+
@@ -1328,7 +1328,7 @@
nasal
-
+
@@ -1395,7 +1395,7 @@
nasal
-
+
@@ -1462,7 +1462,7 @@
nasal
-
+
@@ -1529,7 +1529,7 @@
nasal
-
+
@@ -1596,7 +1596,7 @@
nasal
-
+
@@ -1664,7 +1664,7 @@
nasal
-
+
@@ -1731,7 +1731,7 @@
nasal
-
+
@@ -1797,7 +1797,7 @@
nasal
-
+
@@ -1840,7 +1840,7 @@
nasal
-
+
@@ -1883,7 +1883,7 @@
nasal
-
+
@@ -1928,7 +1928,7 @@
nasal
-
+
@@ -1988,7 +1988,7 @@
1
- /systems/electrical/bus/dc-hot-2
+ systems/electrical/bus/dc-hot-2
25
@@ -2004,7 +2004,7 @@
nasal
-
+
@@ -2048,7 +2048,7 @@
nasal
-
+
@@ -2090,7 +2090,7 @@
nasal
-
+
@@ -2157,7 +2157,7 @@
nasal
-
+
@@ -2224,7 +2224,7 @@
nasal
-
+
@@ -2291,7 +2291,7 @@
nasal
-
+
@@ -2359,7 +2359,7 @@
nasal
-
+
@@ -2418,7 +2418,7 @@
nasal
-
+
@@ -2483,7 +2483,7 @@
nasal
-
+
@@ -2548,7 +2548,7 @@
nasal
-
+
@@ -2612,7 +2612,7 @@
nasal
-
+
@@ -2677,7 +2677,7 @@
nasal
-
+
@@ -2742,7 +2742,7 @@
nasal
-
+
@@ -2807,7 +2807,7 @@
nasal
-
+
@@ -2873,7 +2873,7 @@
nasal
-
+
@@ -2934,7 +2934,7 @@
nasal
-
+
@@ -3001,7 +3001,7 @@
nasal
-
+
@@ -3131,7 +3131,7 @@
nasal
-
+
@@ -3197,7 +3197,7 @@
nasal
-
+
@@ -3258,7 +3258,7 @@
nasal
-
+
@@ -3329,7 +3329,7 @@
nasal
-
+
@@ -3364,7 +3364,7 @@
- /controls/electrical/ground-cart
+ controls/electrical/ground-cart
1
@@ -3373,7 +3373,7 @@
nasal
-
+
@@ -3384,7 +3384,7 @@
- /controls/electrical/ground-cart
+ controls/electrical/ground-cart
1
@@ -3409,7 +3409,7 @@
- /systems/electrical/relay/ext-epc/contact-pos
+ systems/electrical/relay/ext-epc/contact-pos
1
@@ -3453,7 +3453,7 @@
nasal
-
+
@@ -3560,7 +3560,7 @@
property-assign
- /controls/electrical/switches/emer-gen-test
+ controls/electrical/switches/emer-gen-test
1
@@ -3571,7 +3571,7 @@
nasal
-
+
@@ -3582,7 +3582,7 @@
property-assign
- /controls/electrical/switches/emer-gen-test
+ controls/electrical/switches/emer-gen-test
0
@@ -3597,7 +3597,7 @@
nasal
-
+
@@ -3619,7 +3619,7 @@
nasal
-
+
@@ -3691,7 +3691,7 @@
- /systems/electrical/light/rat-emer-gen-fault
+ systems/electrical/light/rat-emer-gen-fault
controls/switches/annun-test
1
@@ -3716,7 +3716,7 @@
1
- /systems/electrical/bus/dc-hot-1
+ systems/electrical/bus/dc-hot-1
25
@@ -3733,7 +3733,7 @@
nasal
-
+
@@ -3777,7 +3777,7 @@
nasal
-
+
@@ -3815,7 +3815,7 @@
nasal
-
+
@@ -3831,7 +3831,7 @@
nasal
-
+
@@ -4024,7 +4024,7 @@
nasal
-
+
@@ -4040,7 +4040,7 @@
nasal
-
+
@@ -4094,7 +4094,7 @@
nasal
-
+
@@ -4161,7 +4161,7 @@
nasal
-
+
@@ -4234,7 +4234,7 @@
nasal
-
+
@@ -4301,7 +4301,7 @@
nasal
-
+
@@ -4367,7 +4367,7 @@
nasal
-
+
@@ -4440,7 +4440,7 @@
nasal
-
+
@@ -4523,7 +4523,7 @@
nasal
-
+
@@ -4714,7 +4714,7 @@
nasal
-
+
@@ -4791,7 +4791,7 @@
nasal
-
+
@@ -4873,7 +4873,7 @@
nasal
-
+
@@ -4889,7 +4889,7 @@
nasal
-
+
@@ -4929,7 +4929,7 @@
nasal
-
+
@@ -4967,7 +4967,7 @@
nasal
-
+
@@ -5008,7 +5008,7 @@
nasal
-
+
@@ -5023,7 +5023,7 @@
nasal
-
+
@@ -5064,7 +5064,7 @@
nasal
-
+
@@ -5078,7 +5078,7 @@
nasal
-
+
@@ -5120,7 +5120,7 @@
nasal
-
+
@@ -5135,7 +5135,7 @@
nasal
-
+
@@ -5156,7 +5156,7 @@
nasal
-
+
@@ -5171,7 +5171,7 @@
nasal
-
+
@@ -5234,7 +5234,7 @@
nasal
-
+
@@ -5249,7 +5249,7 @@
nasal
-
+
@@ -5300,7 +5300,7 @@
nasal
-
+
@@ -5361,7 +5361,7 @@
nasal
-
+
@@ -5422,7 +5422,7 @@
nasal
-
+
@@ -5487,7 +5487,7 @@
nasal
-
+
@@ -5530,7 +5530,7 @@
nasal
-
+
@@ -5581,7 +5581,7 @@
nasal
-
+
@@ -5642,14 +5642,14 @@
nasal
nasal
-
+
@@ -5727,7 +5727,7 @@
nasal
-
+
@@ -5763,7 +5763,7 @@
nasal
-
+
@@ -5832,7 +5832,7 @@
nasal
-
+
@@ -5868,7 +5868,7 @@
nasal
-
+
@@ -5970,7 +5970,7 @@
nasal
-
+
@@ -5985,7 +5985,7 @@
nasal
-
+
@@ -6028,7 +6028,7 @@
nasal
-
+
@@ -6072,7 +6072,7 @@
nasal
-
+
@@ -6088,7 +6088,7 @@
nasal
-
+
@@ -6132,7 +6132,7 @@
nasal
-
+
@@ -6148,7 +6148,7 @@
nasal
-
+
@@ -6190,7 +6190,7 @@
nasal
-
+
@@ -6205,7 +6205,7 @@
nasal
-
+
@@ -6387,13 +6387,13 @@
nasal
@@ -6410,13 +6410,13 @@
nasal
@@ -6527,7 +6527,7 @@
1
- /controls/fire/test-btn-1
+ controls/fire/test-btn-1
1
@@ -6560,7 +6560,7 @@
1
- /controls/fire/test-btn-1
+ controls/fire/test-btn-1
1
@@ -6582,11 +6582,11 @@
- /systems/fire/engine1/disch1
+ systems/fire/engine1/disch1
1
- /controls/fire/test-btn-1
+ controls/fire/test-btn-1
1
@@ -6603,11 +6603,11 @@
- /systems/fire/engine1/disch2
+ systems/fire/engine1/disch2
1
- /controls/fire/test-btn-1
+ controls/fire/test-btn-1
1
@@ -6740,13 +6740,13 @@
nasal
@@ -6763,13 +6763,13 @@
nasal
@@ -6808,8 +6808,8 @@
APUFireBtn
- /systems/fire/apu/warning-active
- /controls/switches/annun-test
+ systems/fire/apu/warning-active
+ controls/switches/annun-test
@@ -6903,13 +6903,13 @@
nasal
@@ -6926,13 +6926,13 @@
nasal
@@ -7043,7 +7043,7 @@
1
- /controls/fire/test-btn-2
+ controls/fire/test-btn-2
1
@@ -7076,7 +7076,7 @@
1
- /controls/fire/test-btn-2
+ controls/fire/test-btn-2
1
@@ -7210,7 +7210,7 @@
nasal
-
+
@@ -7233,7 +7233,7 @@
nasal
-
+
@@ -7331,7 +7331,7 @@
nasal
-
+
@@ -7372,7 +7372,7 @@
nasal
-
+
@@ -7424,7 +7424,7 @@
nasal
-
+
@@ -7456,7 +7456,7 @@
nasal
-
+
diff --git a/Models/Instruments/OHpanel/OHpanelEPR.xml b/Models/Instruments/OHpanel/OHpanelEPR.xml
index acdd3e2e..904e839f 100644
--- a/Models/Instruments/OHpanel/OHpanelEPR.xml
+++ b/Models/Instruments/OHpanel/OHpanelEPR.xml
@@ -63,7 +63,7 @@
nasal
-
+
@@ -89,7 +89,7 @@
nasal
-
+
@@ -164,7 +164,7 @@
nasal
-
+
@@ -190,7 +190,7 @@
nasal
-
+
diff --git a/Models/Instruments/OHpanel/SteepAppr.xml b/Models/Instruments/OHpanel/SteepAppr.xml
index 1b640b39..7152e9ce 100644
--- a/Models/Instruments/OHpanel/SteepAppr.xml
+++ b/Models/Instruments/OHpanel/SteepAppr.xml
@@ -53,7 +53,7 @@
nasal
-
+
diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas
index e42d14e4..6801aa2c 100644
--- a/Models/Instruments/PFD/PFD.nas
+++ b/Models/Instruments/PFD/PFD.nas
@@ -17,106 +17,113 @@ 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 altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1);
-var altitude_pfd = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft-pfd", 1);
-var alt_diff = props.globals.getNode("/instrumentation/pfd/alt-diff", 1);
-var ap_alt = props.globals.getNode("/it-autoflight/internal/alt", 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 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("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 altitude = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft", 1);
+var altitude_pfd = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft-pfd", 1);
+var alt_diff = props.globals.getNode("instrumentation/pfd/alt-diff", 1);
+var ap_alt = props.globals.getNode("it-autoflight/internal/alt", 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_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_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 arrival_airport = props.globals.getNode("FMGC/internal/arr-arpt", 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);
# Create Nodes:
var vs_needle = props.globals.initNode("/instrumentation/pfd/vs-needle", 0.0, "DOUBLE");
@@ -194,7 +201,7 @@ var canvas_PFD_base = {
"AI_bank_lim","AI_bank_lim_X","AI_pitch_lim","AI_pitch_lim_X","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","AI_stick","AI_stick_pos","AI_heading","AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_scale","ALT_target",
"ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_digit_UP","ALT_digit_DN","ALT_error","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting",
"QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer","HDG_target","HDG_scale","HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame",
- "TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend"];
+ "TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend", "ILS_HDG_R", "ILS_HDG_L", "ILS_right", "ILS_left", "outerMarker", "middleMarker", "innerMarker"];
},
updateDu1: func() {
var elapsedtime_act = elapsedtime.getValue();
@@ -703,8 +710,7 @@ var canvas_PFD_base = {
}
# ILS
- me["LOC_pointer"].setTranslation(loc.getValue() * 197, 0);
-
+ me["LOC_pointer"].setTranslation(loc.getValue() * 197, 0);
me["GS_pointer"].setTranslation(0, gs.getValue() * -197);
# Heading
@@ -768,9 +774,56 @@ var canvas_PFD_base = {
}
me["TRK_pointer"].setTranslation((track_diff.getValue() / 10) * 98.5416, 0);
+ split_ils = split("/", ils_data1.getValue());
- me["CRS_pointer"].hide();
+ if (ap_ils_mode.getValue() == 1 and ils1_crs_set.getValue() == 1 and size(split_ils) == 2) {
+ magnetic_hdg = ils_crs.getValue();
+ magnetic_hdg_dif = geo.normdeg180(magnetic_hdg - heading.getValue());
+ if (magnetic_hdg_dif >= -23.62 and magnetic_hdg_dif <= 23.62) {
+ me["CRS_pointer"].setTranslation((magnetic_hdg_dif / 10) * 98.5416, 0);
+ me["ILS_HDG_R"].hide();
+ me["ILS_HDG_L"].hide();
+ me["CRS_pointer"].show();
+ } else if (magnetic_hdg_dif < -23.62 and magnetic_hdg_dif >= -180) {
+ me["ILS_left"].setText(sprintf("%3.0f", int(magnetic_hdg)));
+ me["ILS_HDG_L"].show();
+ me["ILS_HDG_R"].hide();
+ me["CRS_pointer"].hide();
+ } else if (magnetic_hdg_dif > 23.62 and magnetic_hdg_dif <= 180) {
+ me["ILS_right"].setText(sprintf("%3.0f", int(magnetic_hdg)));
+ me["ILS_HDG_R"].show();
+ me["ILS_HDG_L"].hide();
+ me["CRS_pointer"].hide();
+ } else {
+ me["ILS_HDG_R"].hide();
+ me["ILS_HDG_L"].hide();
+ me["CRS_pointer"].hide();
+ }
+ #Approach selected and tuned, overwrite RAD NAV
+# } else if (0) {
+# var runways = airportinfo(airportinfo(arrival_airport.getValue()).id).runways;
+# var runway_keys = sort(keys(runways), string.icmp);
+# foreach(var rwy; runway_keys) {
+# var r = runways[rwy];
+# if (r.ils_frequency_mhz == split_ils[1]) {
+# magnetic_hdg = r.heading - getprop("environment/magnetic-variation-deg");
+# magnetic_hdg_dif = geo.normdeg180(magnetic_hdg - heading.getValue());
+#
+# SET THE FMGC values here!!!!!
+# course = r.heading;
+# ils_frequency = r.ils_frequency_mhz;
+#
+# break;
+# }
+# }
+
+ } else {
+ me["ILS_HDG_R"].hide();
+ me["ILS_HDG_L"].hide();
+ me["CRS_pointer"].hide();
+ }
+
# AI HDG
me.AI_horizon_hdg_trans.setTranslation(me.middleOffset, horizon_pitch.getValue() * 11.825);
me.AI_horizon_hdg_rot.setRotation(-roll_cur * D2R, me["AI_center"].getCenter());
@@ -836,12 +889,28 @@ var canvas_PFD_1 = {
if (ap_ils_mode.getValue() == 1) {
me["LOC_scale"].show();
me["GS_scale"].show();
- me["ils_code"].setText(split("/", ils_data1.getValue())[0]);
- me["ils_freq"].setText(split("/", ils_data1.getValue())[1]);
- me["ils_code"].show();
- me["ils_freq"].show();
+ split_ils = split("/", ils_data1.getValue());
+
+ if (size(split_ils) < 2) {
+ me["ils_freq"].setText(split_ils[0]);
+ me["ils_freq"].show();
+ me["ils_code"].hide();
+ me["dme_dist"].hide();
+ me["dme_dist_legend"].hide();
+ } else {
+ me["ils_code"].setText(split_ils[0]);
+ me["ils_freq"].setText(split_ils[1]);
+ me["ils_code"].show();
+ me["ils_freq"].show();
+ }
+
if (dme_in_range.getValue() == 1) {
- me["dme_dist"].setText(sprintf("%2.0f", int(dme_data.getValue())));
+ dme_dist_data = dme_data.getValue();
+ if (dme_dist_data < 20.0) {
+ me["dme_dist"].setText(sprintf("%1.1f", dme_dist_data));
+ } else {
+ me["dme_dist"].setText(sprintf("%2.0f", dme_dist_data));
+ }
me["dme_dist"].show();
me["dme_dist_legend"].show();
}
@@ -852,6 +921,27 @@ var canvas_PFD_1 = {
me["ils_freq"].hide();
me["dme_dist"].hide();
me["dme_dist_legend"].hide();
+ me["outerMarker"].hide();
+ me["middleMarker"].hide();
+ me["innerMarker"].hide();
+ }
+
+ if (outer_marker.getValue() == 1) {
+ me["outerMarker"].show();
+ me["middleMarker"].hide();
+ me["innerMarker"].hide();
+ } else if (middle_marker.getValue() == 1) {
+ me["middleMarker"].show();
+ me["outerMarker"].hide();
+ me["innerMarker"].hide();
+ } else if (inner_marker.getValue() == 1) {
+ me["innerMarker"].show();
+ me["outerMarker"].hide();
+ me["middleMarker"].hide();
+ } else {
+ me["outerMarker"].hide();
+ me["middleMarker"].hide();
+ me["innerMarker"].hide();
}
if (ap_ils_mode.getValue() == 1 and loc_in_range.getValue() == 1 and hasloc.getValue() == 1 and nav0_signalq.getValue() > 0.99) {
@@ -864,13 +954,13 @@ var canvas_PFD_1 = {
} else {
me["GS_pointer"].hide();
}
-
+
if (ap_ils_mode.getValue() == 0 and (appr_enabled.getValue() == 1 or loc_enabled.getValue() == 1)) {
- me["ilsError"].show();
+ me["ilsError"].show();
} else {
me["ilsError"].hide();
}
-
+
me.updateCommon();
},
updateFast: func() {
@@ -1144,13 +1234,28 @@ var canvas_PFD_2 = {
if (ap_ils_mode2.getValue() == 1) {
me["LOC_scale"].show();
me["GS_scale"].show();
- # Independent MCDU ILS not implemented yet, use MCDU1 in the meantime
- me["ils_code"].setText(split("/", ils_data1.getValue())[0]);
- me["ils_freq"].setText(split("/", ils_data1.getValue())[1]);
- me["ils_code"].show();
- me["ils_freq"].show();
+ split_ils = split("/", ils_data1.getValue());
+
+ if (size(split_ils) < 2) {
+ me["ils_freq"].setText(split_ils[0]);
+ me["ils_freq"].show();
+ me["ils_code"].hide();
+ me["dme_dist"].hide();
+ me["dme_dist_legend"].hide();
+ } else {
+ me["ils_code"].setText(split_ils[0]);
+ me["ils_freq"].setText(split_ils[1]);
+ me["ils_code"].show();
+ me["ils_freq"].show();
+ }
+
if (dme_in_range.getValue() == 1) {
- me["dme_dist"].setText(sprintf("%2.0f", int(dme_data.getValue())));
+ dme_dist_data = dme_data.getValue();
+ if (dme_dist_data < 20.0) {
+ me["dme_dist"].setText(sprintf("%1.1f", dme_dist_data));
+ } else {
+ me["dme_dist"].setText(sprintf("%2.0f", dme_dist_data));
+ }
me["dme_dist"].show();
me["dme_dist_legend"].show();
}
@@ -1161,6 +1266,33 @@ var canvas_PFD_2 = {
me["ils_freq"].hide();
me["dme_dist"].hide();
me["dme_dist_legend"].hide();
+ me["outerMarker"].hide();
+ me["middleMarker"].hide();
+ me["innerMarker"].hide();
+ }
+
+ if (ap_ils_mode2.getValue() == 1 and (appr_enabled.getValue() == 1 or loc_enabled.getValue() == 1 or vert_state.getValue() == 2)) {
+ if (outer_marker.getValue() == 1) {
+ me["outerMarker"].show();
+ me["middleMarker"].hide();
+ me["innerMarker"].hide();
+ } else if (middle_marker.getValue() == 1) {
+ me["middleMarker"].show();
+ me["outerMarker"].hide();
+ me["innerMarker"].hide();
+ } else if (inner_marker.getValue() == 1) {
+ me["innerMarker"].show();
+ me["outerMarker"].hide();
+ me["middleMarker"].hide();
+ } else {
+ me["outerMarker"].hide();
+ me["middleMarker"].hide();
+ me["innerMarker"].hide();
+ }
+ } else {
+ me["outerMarker"].hide();
+ me["middleMarker"].hide();
+ me["innerMarker"].hide();
}
if (ap_ils_mode2.getValue() == 1 and loc_in_range.getValue() == 1 and hasloc.getValue() == 1 and nav0_signalq.getValue() > 0.99) {
diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg
index 38bb35d6..5f78eb00 100644
--- a/Models/Instruments/PFD/res/pfd.svg
+++ b/Models/Instruments/PFD/res/pfd.svg
@@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
+ inkscape:version="1.0beta2 (2b71d25, 2019-12-03)"
sodipodi:docname="pfd.svg">
@@ -37,15 +37,15 @@
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
- inkscape:window-width="716"
- inkscape:window-height="403"
+ inkscape:window-width="1280"
+ inkscape:window-height="755"
id="namedview371"
showgrid="true"
- inkscape:zoom="1.025"
- inkscape:cx="678.88837"
- inkscape:cy="332.98605"
- inkscape:window-x="-8"
- inkscape:window-y="0"
+ inkscape:zoom="0.44418625"
+ inkscape:cx="586.98959"
+ inkscape:cy="803.99797"
+ inkscape:window-x="1"
+ inkscape:window-y="23"
inkscape:window-maximized="0"
inkscape:current-layer="svg2"
showguides="true"
@@ -54,7 +54,8 @@
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
- fit-margin-bottom="0">
+ fit-margin-bottom="0"
+ inkscape:document-rotation="0">
1
2
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.7717px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.657577">2
6
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.756px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.657577">6
2
1
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.756px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.657577">1
TOGA
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.657577">TOGA
ALT
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">ALT
CLB
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.657577">CLB
1013
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.3994px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.75">1013
40402020000080806060404020200000808060
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">60
AP 1+2
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577">AP 1+2
A/THR
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577">A/THR
DUAL
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577">DUAL
FLARE
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">FLARE
DH
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577">DH
LVR CLB
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.657577">LVR CLB
@@ -4694,7 +4695,7 @@
id="tspan4664"
x="69.848434"
y="835.1153"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.83483124px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.8348px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">000
MACH
ILS
+ x="658.3515"
+ y="792.62469"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#bb6100;fill-opacity:1;stroke-width:0.75">ILS
ILS
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.99px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#b055be;fill-opacity:1;stroke-width:0.75">ILS
000.00
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.99px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#b055be;fill-opacity:1;stroke-width:0.75">000.00
0.0
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.99px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#b055be;fill-opacity:1;stroke-width:0.75">0.0
NM
+
+
+ 000
+
+
+
+ 000
+
+ MM
+ OM
+ IM
diff --git a/Models/Instruments/Pedestal_up/Pedestal_up.xml b/Models/Instruments/Pedestal_up/Pedestal_up.xml
index 4c2133d5..d8c2335b 100644
--- a/Models/Instruments/Pedestal_up/Pedestal_up.xml
+++ b/Models/Instruments/Pedestal_up/Pedestal_up.xml
@@ -135,8 +135,8 @@
engine_fire_1
- /systems/fire/engine1/warning-active
- /controls/switches/annun-test
+ systems/fire/engine1/warning-active
+ controls/switches/annun-test
@@ -164,8 +164,8 @@
engine_fire_2
- /systems/fire/engine2/warning-active
- /controls/switches/annun-test
+ systems/fire/engine2/warning-active
+ controls/switches/annun-test
@@ -397,7 +397,7 @@
nasal
-
+
@@ -437,7 +437,7 @@
nasal
-
+
@@ -454,7 +454,7 @@
nasal
-
+
diff --git a/Models/Instruments/Radio/Radio1.xml b/Models/Instruments/Radio/Radio1.xml
index 2bc4fc73..e5bb20e6 100644
--- a/Models/Instruments/Radio/Radio1.xml
+++ b/Models/Instruments/Radio/Radio1.xml
@@ -1090,7 +1090,7 @@
nasal
-
+
diff --git a/Models/Instruments/Radio/Radio2.xml b/Models/Instruments/Radio/Radio2.xml
index 7e6c126f..98ff7e69 100644
--- a/Models/Instruments/Radio/Radio2.xml
+++ b/Models/Instruments/Radio/Radio2.xml
@@ -1090,7 +1090,7 @@
nasal
-
+
diff --git a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas
index 9ba2a785..11a3ef59 100644
--- a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas
+++ b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas
@@ -34,70 +34,70 @@ var du3_test_amount = props.globals.initNode("/instrumentation/du/du3-test-amoun
var du3_offtime = props.globals.initNode("/instrumentation/du/du3-off-time", 0.0, "DOUBLE");
# Fetch nodes:
-var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1);
-var et = props.globals.getNode("/sim/time/elapsed-sec", 1);
-var acconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
-var acess = props.globals.getNode("/systems/electrical/bus/ac-ess", 1);
-var eng_option = props.globals.getNode("/options/eng", 1);
-var du3_lgt = props.globals.getNode("/controls/lighting/DU/du3", 1);
-var rev_1 = props.globals.getNode("/engines/engine[0]/reverser-pos-norm", 1);
-var rev_2 = props.globals.getNode("/engines/engine[1]/reverser-pos-norm", 1);
-var eng1_n1mode = props.globals.getNode("/systems/fadec/eng1/n1", 1);
-var eng1_eprmode = props.globals.getNode("/systems/fadec/eng1/epr", 1);
-var eng2_n1mode = props.globals.getNode("/systems/fadec/eng2/n1", 1);
-var eng2_eprmode = props.globals.getNode("/systems/fadec/eng2/epr", 1);
-var eng1_n2mode = props.globals.getNode("/systems/fadec/eng1/n2", 1);
-var eng2_n2mode = props.globals.getNode("/systems/fadec/eng2/n2", 1);
-var flap_text = props.globals.getNode("/controls/flight/flap-txt", 1);
-var flap_pos = props.globals.getNode("/controls/flight/flap-pos", 1);
-var fuel = props.globals.getNode("/consumables/fuel/total-fuel-lbs", 1);
-var modeautobrake = props.globals.getNode("/controls/autobrake/mode", 1);
-var speedbrakearm = props.globals.getNode("/controls/flight/speedbrake-arm", 1);
-var ECAMtoconfig = props.globals.getNode("/ECAM/to-config", 1);
-var gear = props.globals.getNode("/gear/gear[1]/position-norm", 1);
-var smoke = props.globals.getNode("/controls/lighting/no-smoking-sign", 1);
-var seatbelt = props.globals.getNode("/controls/lighting/seatbelt-sign", 1);
-var flaps3_ovr = props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 1);
-var wow0 = props.globals.getNode("/gear/gear[0]/wow");
-var eng1_n1 = props.globals.getNode("/engines/engine[0]/n1-actual", 1);
-var eng2_n1 = props.globals.getNode("/engines/engine[1]/n1-actual", 1);
-var eng1_n2 = props.globals.getNode("/engines/engine[0]/n2-actual", 1);
-var eng2_n2 = props.globals.getNode("/engines/engine[1]/n2-actual", 1);
-var eng1_epr = props.globals.getNode("/engines/engine[0]/epr-actual", 1);
-var eng2_epr = props.globals.getNode("/engines/engine[1]/epr-actual", 1);
-var eng1_egt = props.globals.getNode("/engines/engine[0]/egt-actual", 1);
-var eng2_egt = props.globals.getNode("/engines/engine[1]/egt-actual", 1);
-var eng1_egtmode = props.globals.getNode("/systems/fadec/eng1/egt", 1);
-var eng2_egtmode = props.globals.getNode("/systems/fadec/eng2/egt", 1);
-var eng1_ffmode = props.globals.getNode("/systems/fadec/eng1/ff", 1);
-var eng2_ffmode = props.globals.getNode("/systems/fadec/eng2/ff", 1);
-var fadecpower_1 = props.globals.getNode("/systems/fadec/powered1", 1);
-var fadecpower_2 = props.globals.getNode("/systems/fadec/powered2", 1);
-var fadecpowerup = props.globals.getNode("/systems/fadec/powerup", 1);
-var thr_limit = props.globals.getNode("/controls/engines/thrust-limit", 1);
-var n1_limit = props.globals.getNode("/controls/engines/n1-limit", 1);
-var epr_limit = props.globals.getNode("/controls/engines/epr-limit", 1);
-var n1mode1 = props.globals.getNode("/systems/fadec/n1mode1", 1);
-var n1mode2 = props.globals.getNode("/systems/fadec/n1mode2", 1);
-var ECAM_line1 = props.globals.getNode("/ECAM/msg/line1", 1);
-var ECAM_line2 = props.globals.getNode("/ECAM/msg/line2", 1);
-var ECAM_line3 = props.globals.getNode("/ECAM/msg/line3", 1);
-var ECAM_line4 = props.globals.getNode("/ECAM/msg/line4", 1);
-var ECAM_line5 = props.globals.getNode("/ECAM/msg/line5", 1);
-var ECAM_line6 = props.globals.getNode("/ECAM/msg/line6", 1);
-var ECAM_line7 = props.globals.getNode("/ECAM/msg/line7", 1);
-var ECAM_line8 = props.globals.getNode("/ECAM/msg/line8", 1);
-var ECAM_line1c = props.globals.getNode("/ECAM/msg/linec1", 1);
-var ECAM_line2c = props.globals.getNode("/ECAM/msg/linec2", 1);
-var ECAM_line3c = props.globals.getNode("/ECAM/msg/linec3", 1);
-var ECAM_line4c = props.globals.getNode("/ECAM/msg/linec4", 1);
-var ECAM_line5c = props.globals.getNode("/ECAM/msg/linec5", 1);
-var ECAM_line6c = props.globals.getNode("/ECAM/msg/linec6", 1);
-var ECAM_line7c = props.globals.getNode("/ECAM/msg/linec7", 1);
-var ECAM_line8c = props.globals.getNode("/ECAM/msg/linec8", 1);
-var ECAMleft = props.globals.getNode("/ECAM/left-msg", 1);
-var ECAMright = props.globals.getNode("/ECAM/right-msg", 1);
-var rate = props.globals.getNode("/systems/acconfig/options/uecam-rate", 1);
+var acconfig_weight_kgs = props.globals.getNode("systems/acconfig/options/weight-kgs", 1);
+var et = props.globals.getNode("sim/time/elapsed-sec", 1);
+var acconfig = props.globals.getNode("systems/acconfig/autoconfig-running", 1);
+var acess = props.globals.getNode("systems/electrical/bus/ac-ess", 1);
+var eng_option = props.globals.getNode("options/eng", 1);
+var du3_lgt = props.globals.getNode("controls/lighting/DU/du3", 1);
+var rev_1 = props.globals.getNode("engines/engine[0]/reverser-pos-norm", 1);
+var rev_2 = props.globals.getNode("engines/engine[1]/reverser-pos-norm", 1);
+var eng1_n1mode = props.globals.getNode("systems/fadec/eng1/n1", 1);
+var eng1_eprmode = props.globals.getNode("systems/fadec/eng1/epr", 1);
+var eng2_n1mode = props.globals.getNode("systems/fadec/eng2/n1", 1);
+var eng2_eprmode = props.globals.getNode("systems/fadec/eng2/epr", 1);
+var eng1_n2mode = props.globals.getNode("systems/fadec/eng1/n2", 1);
+var eng2_n2mode = props.globals.getNode("systems/fadec/eng2/n2", 1);
+var flap_text = props.globals.getNode("controls/flight/flap-txt", 1);
+var flap_pos = props.globals.getNode("controls/flight/flap-pos", 1);
+var fuel = props.globals.getNode("consumables/fuel/total-fuel-lbs", 1);
+var modeautobrake = props.globals.getNode("controls/autobrake/mode", 1);
+var speedbrakearm = props.globals.getNode("controls/flight/speedbrake-arm", 1);
+var ECAMtoconfig = props.globals.getNode("ECAM/to-config", 1);
+var gear = props.globals.getNode("gear/gear[1]/position-norm", 1);
+var smoke = props.globals.getNode("controls/lighting/no-smoking-sign", 1);
+var seatbelt = props.globals.getNode("controls/lighting/seatbelt-sign", 1);
+var flaps3_ovr = props.globals.getNode("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 1);
+var wow0 = props.globals.getNode("gear/gear[0]/wow");
+var eng1_n1 = props.globals.getNode("engines/engine[0]/n1-actual", 1);
+var eng2_n1 = props.globals.getNode("engines/engine[1]/n1-actual", 1);
+var eng1_n2 = props.globals.getNode("engines/engine[0]/n2-actual", 1);
+var eng2_n2 = props.globals.getNode("engines/engine[1]/n2-actual", 1);
+var eng1_epr = props.globals.getNode("engines/engine[0]/epr-actual", 1);
+var eng2_epr = props.globals.getNode("engines/engine[1]/epr-actual", 1);
+var eng1_egt = props.globals.getNode("engines/engine[0]/egt-actual", 1);
+var eng2_egt = props.globals.getNode("engines/engine[1]/egt-actual", 1);
+var eng1_egtmode = props.globals.getNode("systems/fadec/eng1/egt", 1);
+var eng2_egtmode = props.globals.getNode("systems/fadec/eng2/egt", 1);
+var eng1_ffmode = props.globals.getNode("systems/fadec/eng1/ff", 1);
+var eng2_ffmode = props.globals.getNode("systems/fadec/eng2/ff", 1);
+var fadecpower_1 = props.globals.getNode("systems/fadec/powered1", 1);
+var fadecpower_2 = props.globals.getNode("systems/fadec/powered2", 1);
+var fadecpowerup = props.globals.getNode("systems/fadec/powerup", 1);
+var thr_limit = props.globals.getNode("controls/engines/thrust-limit", 1);
+var n1_limit = props.globals.getNode("controls/engines/n1-limit", 1);
+var epr_limit = props.globals.getNode("controls/engines/epr-limit", 1);
+var n1mode1 = props.globals.getNode("systems/fadec/n1mode1", 1);
+var n1mode2 = props.globals.getNode("systems/fadec/n1mode2", 1);
+var ECAM_line1 = props.globals.getNode("ECAM/msg/line1", 1);
+var ECAM_line2 = props.globals.getNode("ECAM/msg/line2", 1);
+var ECAM_line3 = props.globals.getNode("ECAM/msg/line3", 1);
+var ECAM_line4 = props.globals.getNode("ECAM/msg/line4", 1);
+var ECAM_line5 = props.globals.getNode("ECAM/msg/line5", 1);
+var ECAM_line6 = props.globals.getNode("ECAM/msg/line6", 1);
+var ECAM_line7 = props.globals.getNode("ECAM/msg/line7", 1);
+var ECAM_line8 = props.globals.getNode("ECAM/msg/line8", 1);
+var ECAM_line1c = props.globals.getNode("ECAM/msg/linec1", 1);
+var ECAM_line2c = props.globals.getNode("ECAM/msg/linec2", 1);
+var ECAM_line3c = props.globals.getNode("ECAM/msg/linec3", 1);
+var ECAM_line4c = props.globals.getNode("ECAM/msg/linec4", 1);
+var ECAM_line5c = props.globals.getNode("ECAM/msg/linec5", 1);
+var ECAM_line6c = props.globals.getNode("ECAM/msg/linec6", 1);
+var ECAM_line7c = props.globals.getNode("ECAM/msg/linec7", 1);
+var ECAM_line8c = props.globals.getNode("ECAM/msg/linec8", 1);
+var ECAMleft = props.globals.getNode("ECAM/left-msg", 1);
+var ECAMright = props.globals.getNode("ECAM/right-msg", 1);
+var rate = props.globals.getNode("systems/acconfig/options/uecam-rate", 1);
var canvas_upperECAM_base = {
init: func(canvas_group, file) {
@@ -473,124 +473,124 @@ var canvas_upperECAM_base = {
# Right ECAM Messages
if (rightmsg == "MSG") {
- me["ECAMR1"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line1")));
- me["ECAMR2"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line2")));
- me["ECAMR3"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line3")));
- me["ECAMR4"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line4")));
- me["ECAMR5"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line5")));
- me["ECAMR6"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line6")));
- me["ECAMR7"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line7")));
- me["ECAMR8"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line8")));
+ me["ECAMR1"].setText(sprintf("%s", getprop("ECAM/rightmsg/line1")));
+ me["ECAMR2"].setText(sprintf("%s", getprop("ECAM/rightmsg/line2")));
+ me["ECAMR3"].setText(sprintf("%s", getprop("ECAM/rightmsg/line3")));
+ me["ECAMR4"].setText(sprintf("%s", getprop("ECAM/rightmsg/line4")));
+ me["ECAMR5"].setText(sprintf("%s", getprop("ECAM/rightmsg/line5")));
+ me["ECAMR6"].setText(sprintf("%s", getprop("ECAM/rightmsg/line6")));
+ me["ECAMR7"].setText(sprintf("%s", getprop("ECAM/rightmsg/line7")));
+ me["ECAMR8"].setText(sprintf("%s", getprop("ECAM/rightmsg/line8")));
- if (getprop("/ECAM/rightmsg/linec1") == "w") {
+ if (getprop("ECAM/rightmsg/linec1") == "w") {
me["ECAMR1"].setColor(0.8078,0.8039,0.8078);
- } else if (getprop("/ECAM/rightmsg/linec1") == "c") {
+ } else if (getprop("ECAM/rightmsg/linec1") == "c") {
me["ECAMR1"].setColor(0.0901,0.6039,0.7176);
- } else if (getprop("/ECAM/rightmsg/linec1") == "g") {
+ } else if (getprop("ECAM/rightmsg/linec1") == "g") {
me["ECAMR1"].setColor(0.0509,0.7529,0.2941);
- } else if (getprop("/ECAM/rightmsg/linec1") == "a") {
+ } else if (getprop("ECAM/rightmsg/linec1") == "a") {
me["ECAMR1"].setColor(0.7333,0.3803,0);
- } else if (getprop("/ECAM/rightmsg/linec1") == "r") {
+ } else if (getprop("ECAM/rightmsg/linec1") == "r") {
me["ECAMR1"].setColor(1,0,0);
- } else if (getprop("/ECAM/rightmsg/linec1") == "m") {
+ } else if (getprop("ECAM/rightmsg/linec1") == "m") {
me["ECAMR1"].setColor(0.6901,0.3333,0.7450);
}
- if (getprop("/ECAM/rightmsg/linec2") == "w") {
+ if (getprop("ECAM/rightmsg/linec2") == "w") {
me["ECAMR2"].setColor(0.8078,0.8039,0.8078);
- } else if (getprop("/ECAM/rightmsg/linec2") == "c") {
+ } else if (getprop("ECAM/rightmsg/linec2") == "c") {
me["ECAMR2"].setColor(0.0901,0.6039,0.7176);
- } else if (getprop("/ECAM/rightmsg/linec2") == "g") {
+ } else if (getprop("ECAM/rightmsg/linec2") == "g") {
me["ECAMR2"].setColor(0.0509,0.7529,0.2941);
- } else if (getprop("/ECAM/rightmsg/linec2") == "a") {
+ } else if (getprop("ECAM/rightmsg/linec2") == "a") {
me["ECAMR2"].setColor(0.7333,0.3803,0);
- } else if (getprop("/ECAM/rightmsg/linec2") == "r") {
+ } else if (getprop("ECAM/rightmsg/linec2") == "r") {
me["ECAMR2"].setColor(1,0,0);
- } else if (getprop("/ECAM/rightmsg/linec2") == "m") {
+ } else if (getprop("ECAM/rightmsg/linec2") == "m") {
me["ECAMR2"].setColor(0.6901,0.3333,0.7450);
}
- if (getprop("/ECAM/rightmsg/linec3") == "w") {
+ if (getprop("ECAM/rightmsg/linec3") == "w") {
me["ECAMR3"].setColor(0.8078,0.8039,0.8078);
- } else if (getprop("/ECAM/rightmsg/linec3") == "c") {
+ } else if (getprop("ECAM/rightmsg/linec3") == "c") {
me["ECAMR3"].setColor(0.0901,0.6039,0.7176);
- } else if (getprop("/ECAM/rightmsg/linec3") == "g") {
+ } else if (getprop("ECAM/rightmsg/linec3") == "g") {
me["ECAMR3"].setColor(0.0509,0.7529,0.2941);
- } else if (getprop("/ECAM/rightmsg/linec3") == "a") {
+ } else if (getprop("ECAM/rightmsg/linec3") == "a") {
me["ECAMR3"].setColor(0.7333,0.3803,0);
- } else if (getprop("/ECAM/rightmsg/linec3") == "r") {
+ } else if (getprop("ECAM/rightmsg/linec3") == "r") {
me["ECAMR3"].setColor(1,0,0);
- } else if (getprop("/ECAM/rightmsg/linec3") == "m") {
+ } else if (getprop("ECAM/rightmsg/linec3") == "m") {
me["ECAMR3"].setColor(0.6901,0.3333,0.7450);
}
- if (getprop("/ECAM/rightmsg/linec4") == "w") {
+ if (getprop("ECAM/rightmsg/linec4") == "w") {
me["ECAMR4"].setColor(0.8078,0.8039,0.8078);
- } else if (getprop("/ECAM/rightmsg/linec4") == "c") {
+ } else if (getprop("ECAM/rightmsg/linec4") == "c") {
me["ECAMR4"].setColor(0.0901,0.6039,0.7176);
- } else if (getprop("/ECAM/rightmsg/linec4") == "g") {
+ } else if (getprop("ECAM/rightmsg/linec4") == "g") {
me["ECAMR4"].setColor(0.0509,0.7529,0.2941);
- } else if (getprop("/ECAM/rightmsg/linec4") == "a") {
+ } else if (getprop("ECAM/rightmsg/linec4") == "a") {
me["ECAMR4"].setColor(0.7333,0.3803,0);
- } else if (getprop("/ECAM/rightmsg/linec4") == "r") {
+ } else if (getprop("ECAM/rightmsg/linec4") == "r") {
me["ECAMR4"].setColor(1,0,0);
- } else if (getprop("/ECAM/rightmsg/linec4") == "m") {
+ } else if (getprop("ECAM/rightmsg/linec4") == "m") {
me["ECAMR4"].setColor(0.6901,0.3333,0.7450);
}
- if (getprop("/ECAM/rightmsg/linec5") == "w") {
+ if (getprop("ECAM/rightmsg/linec5") == "w") {
me["ECAMR5"].setColor(0.8078,0.8039,0.8078);
- } else if (getprop("/ECAM/rightmsg/linec5") == "c") {
+ } else if (getprop("ECAM/rightmsg/linec5") == "c") {
me["ECAMR5"].setColor(0.0901,0.6039,0.7176);
- } else if (getprop("/ECAM/rightmsg/linec5") == "g") {
+ } else if (getprop("ECAM/rightmsg/linec5") == "g") {
me["ECAMR5"].setColor(0.0509,0.7529,0.2941);
- } else if (getprop("/ECAM/rightmsg/linec5") == "a") {
+ } else if (getprop("ECAM/rightmsg/linec5") == "a") {
me["ECAMR5"].setColor(0.7333,0.3803,0);
- } else if (getprop("/ECAM/rightmsg/linec5") == "r") {
+ } else if (getprop("ECAM/rightmsg/linec5") == "r") {
me["ECAMR5"].setColor(1,0,0);
- } else if (getprop("/ECAM/rightmsg/linec5") == "m") {
+ } else if (getprop("ECAM/rightmsg/linec5") == "m") {
me["ECAMR5"].setColor(0.6901,0.3333,0.7450);
}
- if (getprop("/ECAM/rightmsg/linec6") == "w") {
+ if (getprop("ECAM/rightmsg/linec6") == "w") {
me["ECAMR6"].setColor(0.8078,0.8039,0.8078);
- } else if (getprop("/ECAM/rightmsg/linec6") == "c") {
+ } else if (getprop("ECAM/rightmsg/linec6") == "c") {
me["ECAMR6"].setColor(0.0901,0.6039,0.7176);
- } else if (getprop("/ECAM/rightmsg/linec6") == "g") {
+ } else if (getprop("ECAM/rightmsg/linec6") == "g") {
me["ECAMR6"].setColor(0.0509,0.7529,0.2941);
- } else if (getprop("/ECAM/rightmsg/linec6") == "a") {
+ } else if (getprop("ECAM/rightmsg/linec6") == "a") {
me["ECAMR6"].setColor(0.7333,0.3803,0);
- } else if (getprop("/ECAM/rightmsg/linec6") == "r") {
+ } else if (getprop("ECAM/rightmsg/linec6") == "r") {
me["ECAMR6"].setColor(1,0,0);
- } else if (getprop("/ECAM/rightmsg/linec6") == "m") {
+ } else if (getprop("ECAM/rightmsg/linec6") == "m") {
me["ECAMR6"].setColor(0.6901,0.3333,0.7450);
}
- if (getprop("/ECAM/rightmsg/linec7") == "w") {
+ if (getprop("ECAM/rightmsg/linec7") == "w") {
me["ECAMR7"].setColor(0.8078,0.8039,0.8078);
- } else if (getprop("/ECAM/rightmsg/linec7") == "c") {
+ } else if (getprop("ECAM/rightmsg/linec7") == "c") {
me["ECAMR7"].setColor(0.0901,0.6039,0.7176);
- } else if (getprop("/ECAM/rightmsg/linec7") == "g") {
+ } else if (getprop("ECAM/rightmsg/linec7") == "g") {
me["ECAMR7"].setColor(0.0509,0.7529,0.2941);
- } else if (getprop("/ECAM/rightmsg/linec7") == "a") {
+ } else if (getprop("ECAM/rightmsg/linec7") == "a") {
me["ECAMR7"].setColor(0.7333,0.3803,0);
- } else if (getprop("/ECAM/rightmsg/linec7") == "r") {
+ } else if (getprop("ECAM/rightmsg/linec7") == "r") {
me["ECAMR7"].setColor(1,0,0);
- } else if (getprop("/ECAM/rightmsg/linec7") == "m") {
+ } else if (getprop("ECAM/rightmsg/linec7") == "m") {
me["ECAMR7"].setColor(0.6901,0.3333,0.7450);
}
- if (getprop("/ECAM/rightmsg/linec8") == "w") {
+ if (getprop("ECAM/rightmsg/linec8") == "w") {
me["ECAMR8"].setColor(0.8078,0.8039,0.8078);
- } else if (getprop("/ECAM/rightmsg/linec8") == "c") {
+ } else if (getprop("ECAM/rightmsg/linec8") == "c") {
me["ECAMR8"].setColor(0.0901,0.6039,0.7176);
- } else if (getprop("/ECAM/rightmsg/linec8") == "g") {
+ } else if (getprop("ECAM/rightmsg/linec8") == "g") {
me["ECAMR8"].setColor(0.0509,0.7529,0.2941);
- } else if (getprop("/ECAM/rightmsg/linec8") == "a") {
+ } else if (getprop("ECAM/rightmsg/linec8") == "a") {
me["ECAMR8"].setColor(0.7333,0.3803,0);
- } else if (getprop("/ECAM/rightmsg/linec8") == "r") {
+ } else if (getprop("ECAM/rightmsg/linec8") == "r") {
me["ECAMR8"].setColor(1,0,0);
- } else if (getprop("/ECAM/rightmsg/linec8") == "m") {
+ } else if (getprop("ECAM/rightmsg/linec8") == "m") {
me["ECAMR8"].setColor(0.6901,0.3333,0.7450);
}
diff --git a/Models/Lights/greennav.xml b/Models/Lights/greennav.xml
index 14c72c9b..f8ac9a5e 100644
--- a/Models/Lights/greennav.xml
+++ b/Models/Lights/greennav.xml
@@ -14,7 +14,7 @@
Light
- /sim/model/lights/nav-lights
+ sim/model/lights/nav-lights
1
diff --git a/Models/Lights/landing-nose.xml b/Models/Lights/landing-nose.xml
index df400f05..b9fcb9ed 100644
--- a/Models/Lights/landing-nose.xml
+++ b/Models/Lights/landing-nose.xml
@@ -36,7 +36,7 @@
- /sim/model/lights/nose-lights
+ sim/model/lights/nose-lights
0.5
diff --git a/Models/Lights/rednav.xml b/Models/Lights/rednav.xml
index 57dd6d11..5c822dcc 100644
--- a/Models/Lights/rednav.xml
+++ b/Models/Lights/rednav.xml
@@ -14,7 +14,7 @@
Light
- /sim/model/lights/nav-lights
+ sim/model/lights/nav-lights
1
diff --git a/Models/Lights/tailnav.xml b/Models/Lights/tailnav.xml
index 979268d6..9b3bccfe 100644
--- a/Models/Lights/tailnav.xml
+++ b/Models/Lights/tailnav.xml
@@ -14,7 +14,7 @@
Light
- /sim/model/lights/nav-lights
+ sim/model/lights/nav-lights
1
diff --git a/Models/RAT/RAT.xml b/Models/RAT/RAT.xml
index eeb2422c..4b8df894 100644
--- a/Models/RAT/RAT.xml
+++ b/Models/RAT/RAT.xml
@@ -32,7 +32,7 @@
fan
holder
- /systems/hydraulic/sources/rat/position
+ systems/hydraulic/sources/rat/position
diff --git a/Nasal/Autopush/autopush.nas b/Nasal/Autopush/autopush.nas
index 02b7f13f..bef82294 100644
--- a/Nasal/Autopush/autopush.nas
+++ b/Nasal/Autopush/autopush.nas
@@ -26,7 +26,7 @@ var _unitconv = M2FT / 3.6;
var _debug = nil;
var _loop = func() {
- if (!getprop("/sim/model/autopush/available")) {
+ if (!getprop("sim/model/autopush/available")) {
_stop();
return;
}
@@ -35,11 +35,11 @@ var _loop = func() {
var y = 0.0;
var z = 0.0;
# Rollspeed is only adequate if the wheel is touching the ground.
- if (getprop("/gear/gear[0]/wow")) {
- var V = getprop("/gear/gear[0]/rollspeed-ms") * 3.6;
- var deltaV = getprop("/sim/model/autopush/target-speed-km_h") - V;
+ if (getprop("gear/gear[0]/wow")) {
+ var V = getprop("gear/gear[0]/rollspeed-ms") * 3.6;
+ var deltaV = getprop("sim/model/autopush/target-speed-km_h") - V;
var minus_dV = _V - V;
- var time = getprop("/sim/time/elapsed-sec");
+ var time = getprop("sim/time/elapsed-sec");
var prop = math.min(math.max(_K_p * deltaV, -_F_p), _F_p);
var dt = time - _time;
var deriv = 0.0;
@@ -59,28 +59,28 @@ var _loop = func() {
_V = V;
_time = time;
if (!_yasim) {
- force = accel * getprop("/fdm/jsbsim/inertia/weight-lbs") * _unitconv;
+ force = accel * getprop("fdm/jsbsim/inertia/weight-lbs") * _unitconv;
} else {
- force = accel * getprop("/fdm/yasim/gross-weight-lbs") * _unitconv;
+ force = accel * getprop("fdm/yasim/gross-weight-lbs") * _unitconv;
}
- var pitch = getprop("/sim/model/autopush/pitch-deg") * D2R;
+ var pitch = getprop("sim/model/autopush/pitch-deg") * D2R;
z = math.sin(pitch);
var pz = math.cos(pitch);
- var yaw = getprop("/sim/model/autopush/yaw") * _K_yaw;
+ var yaw = getprop("sim/model/autopush/yaw") * _K_yaw;
x = math.cos(yaw) * pz;
y = math.sin(yaw) * pz;
- setprop("/sim/model/autopush/force-x", x);
- setprop("/sim/model/autopush/force-y", y);
+ setprop("sim/model/autopush/force-x", x);
+ setprop("sim/model/autopush/force-y", y);
# JSBSim force's z is down.
- setprop("/sim/model/autopush/force-z", -z);
+ setprop("sim/model/autopush/force-z", -z);
}
- setprop("/sim/model/autopush/force-lbf", force);
+ setprop("sim/model/autopush/force-lbf", force);
if (_yasim) {
# The force is divided by YASim thrust="100000.0" setting.
- setprop("/sim/model/autopush/force-x-yasim", x * force * 0.00001);
+ setprop("sim/model/autopush/force-x-yasim", x * force * 0.00001);
# YASim force's y is to the left.
- setprop("/sim/model/autopush/force-y-yasim", -y * force * 0.00001);
- setprop("/sim/model/autopush/force-z-yasim", z * force * 0.00001);
+ setprop("sim/model/autopush/force-y-yasim", -y * force * 0.00001);
+ setprop("sim/model/autopush/force-z-yasim", z * force * 0.00001);
}
}
@@ -89,26 +89,26 @@ var _timer = maketimer(0.0167, func{_loop()});
var _start = func() {
# Else overwritten by dialog.
settimer(func() {
- setprop("/sim/model/autopush/target-speed-km_h", 0.0)
+ setprop("sim/model/autopush/target-speed-km_h", 0.0)
}, 0.1);
- _K_p = getprop("/sim/model/autopush/K_p");
- _F_p = getprop("/sim/model/autopush/F_p");
- _K_i = getprop("/sim/model/autopush/K_i");
- _F_i = getprop("/sim/model/autopush/F_i");
- _K_d = getprop("/sim/model/autopush/K_d");
- _F_d = getprop("/sim/model/autopush/F_d");
- _F = getprop("/sim/model/autopush/F");
- _T_f = getprop("/sim/model/autopush/T_f");
- _K_yaw = getprop("/sim/model/autopush/yaw-mult") * D2R;
- _yasim = (getprop("/sim/flight-model") == "yasim");
- _debug = getprop("/sim/model/autopush/debug") or 0;
+ _K_p = getprop("sim/model/autopush/K_p");
+ _F_p = getprop("sim/model/autopush/F_p");
+ _K_i = getprop("sim/model/autopush/K_i");
+ _F_i = getprop("sim/model/autopush/F_i");
+ _K_d = getprop("sim/model/autopush/K_d");
+ _F_d = getprop("sim/model/autopush/F_d");
+ _F = getprop("sim/model/autopush/F");
+ _T_f = getprop("sim/model/autopush/T_f");
+ _K_yaw = getprop("sim/model/autopush/yaw-mult") * D2R;
+ _yasim = (getprop("sim/flight-model") == "yasim");
+ _debug = getprop("sim/model/autopush/debug") or 0;
_int = 0.0;
_V = 0.0;
- _time = getprop("/sim/time/elapsed-sec");
- setprop("/sim/model/autopush/connected", 1);
+ _time = getprop("sim/time/elapsed-sec");
+ setprop("sim/model/autopush/connected", 1);
if (!_timer.isRunning) {
- if (getprop("/sim/model/autopush/chocks")) {
- setprop("/sim/model/autopush/chocks", 0);
+ if (getprop("sim/model/autopush/chocks")) {
+ setprop("sim/model/autopush/chocks", 0);
screen.log.write("(pushback): Pushback connected, chocks removed. Please release brakes.");
} else {
screen.log.write("(pushback): Pushback connected, please release brakes.");
@@ -122,18 +122,18 @@ var _stop = func() {
screen.log.write("(pushback): Pushback and bypass pin removed.");
}
_timer.stop();
- setprop("/sim/model/autopush/force-lbf", 0.0);
+ setprop("sim/model/autopush/force-lbf", 0.0);
if (_yasim) {
- setprop("/sim/model/autopush/force-x-yasim", 0.0);
- setprop("/sim/model/autopush/force-y-yasim", 0.0);
+ setprop("sim/model/autopush/force-x-yasim", 0.0);
+ setprop("sim/model/autopush/force-y-yasim", 0.0);
}
- setprop("/sim/model/autopush/connected", 0);
- setprop("/sim/model/autopush/enabled", 0);
+ setprop("sim/model/autopush/connected", 0);
+ setprop("sim/model/autopush/enabled", 0);
}
setlistener("/sim/model/autopush/enabled", func(p) {
var enabled = p.getValue();
- if ((enabled) and getprop("/sim/model/autopush/available")) {
+ if ((enabled) and getprop("sim/model/autopush/available")) {
_start();
} else {
_stop();
diff --git a/Nasal/Autopush/autopush_driver.nas b/Nasal/Autopush/autopush_driver.nas
index a8c1cbb1..dc277ff9 100644
--- a/Nasal/Autopush/autopush_driver.nas
+++ b/Nasal/Autopush/autopush_driver.nas
@@ -46,7 +46,7 @@ var _advance_wp = func(flip_sign = 0) {
}
var _loop = func() {
- if (!getprop("/sim/model/autopush/connected")) {
+ if (!getprop("sim/model/autopush/connected")) {
stop();
return;
}
@@ -54,9 +54,9 @@ var _loop = func() {
D *= NM2M;
var (psi_leg, D_leg) = courseAndDistance(_route[_to_wp - 1], _route[_to_wp]);
var deltapsi = geo.normdeg180(A - psi_leg);
- var psi = getprop("/orientation/heading-deg") + _push * 180.0;
+ var psi = getprop("orientation/heading-deg") + _push * 180.0;
var deltaA = math.min(math.max(_K_psi * geo.normdeg180(A - psi), -_F_psi), _F_psi);
- var time = getprop("/sim/time/elapsed-sec");
+ var time = getprop("sim/time/elapsed-sec");
var dt = time - _time;
var minus_psidot = (dt > 0.002) * math.min(math.max(_K_psidot * (_psi - psi) / dt, -_F_psidot), _F_psidot);
_psi = psi;
@@ -83,8 +83,8 @@ var _loop = func() {
if (_debug > 1) {
print("autopush_driver to_wp " ~ _to_wp ~ ", A " ~ geo.normdeg(A) ~ ", deltaA " ~ deltaA ~ ", minus_psidot " ~ minus_psidot);
}
- setprop("/sim/model/autopush/target-speed-km_h", _sign * V);
- setprop("/sim/model/autopush/steer-cmd-norm", steering);
+ setprop("sim/model/autopush/target-speed-km_h", _sign * V);
+ setprop("sim/model/autopush/steer-cmd-norm", steering);
}
var _timer = maketimer(0.051, func{_loop()});
@@ -100,7 +100,7 @@ var start = func() {
gui.popupTip("Already moving");
return;
}
- if (!getprop("/sim/model/autopush/connected")) {
+ if (!getprop("sim/model/autopush/connected")) {
gui.popupTip("Pushback not connected");
return;
}
@@ -112,23 +112,23 @@ var start = func() {
} else {
autopush_route.done();
}
- _K_V = getprop("/sim/model/autopush/driver/K_V");
- _F_V = getprop("/sim/model/autopush/driver/F_V");
- _R_turn_min = getprop("/sim/model/autopush/min-turn-radius-m");
- _D_stop = getprop("/sim/model/autopush/stopping-distance-m");
- _K_psi = getprop("/sim/model/autopush/driver/K_psi");
- _F_psi = getprop("/sim/model/autopush/driver/F_psi");
- _K_psidot = getprop("/sim/model/autopush/driver/K_psidot");
- _F_psidot = getprop("/sim/model/autopush/driver/F_psidot");
- _debug = getprop("/sim/model/autopush/debug") or 0;
+ _K_V = getprop("sim/model/autopush/driver/K_V");
+ _F_V = getprop("sim/model/autopush/driver/F_V");
+ _R_turn_min = getprop("sim/model/autopush/min-turn-radius-m");
+ _D_stop = getprop("sim/model/autopush/stopping-distance-m");
+ _K_psi = getprop("sim/model/autopush/driver/K_psi");
+ _F_psi = getprop("sim/model/autopush/driver/F_psi");
+ _K_psidot = getprop("sim/model/autopush/driver/K_psidot");
+ _F_psidot = getprop("sim/model/autopush/driver/F_psidot");
+ _debug = getprop("sim/model/autopush/debug") or 0;
if (!_to_wp) {
var (psi_park, D_park) = courseAndDistance(_route[0], _route[1]);
- _push = (abs(geo.normdeg180(getprop("/orientation/heading-deg") - psi_park)) > 90.0);
+ _push = (abs(geo.normdeg180(getprop("orientation/heading-deg") - psi_park)) > 90.0);
_sign = 1.0 - 2.0 * _push;
_advance_wp();
_psi = 0.0;
}
- _time = getprop("/sim/time/elapsed-sec");
+ _time = getprop("sim/time/elapsed-sec");
_timer.start();
var endsign = _sign;
for (ii = _to_wp; ii < size(_route_reverse); ii += 1) {
@@ -146,7 +146,7 @@ var start = func() {
var pause = func() {
_timer.stop();
- setprop("/sim/model/autopush/target-speed-km_h", 0.0);
+ setprop("sim/model/autopush/target-speed-km_h", 0.0);
}
var stop = func() {
diff --git a/Nasal/Autopush/autopush_route.nas b/Nasal/Autopush/autopush_route.nas
index b67c6072..20ca5894 100644
--- a/Nasal/Autopush/autopush_route.nas
+++ b/Nasal/Autopush/autopush_route.nas
@@ -29,7 +29,7 @@ var _R_turn_min = 0;
var _invalid = 0;
# Make top-down view point north in old FG.
-var __fg_version = num(string.replace(getprop("/sim/version/flightgear"),".",""));
+var __fg_version = num(string.replace(getprop("sim/version/flightgear"),".",""));
if (__fg_version < 201920) {
_top_view_heading_offset_deg = 94.5;
}
@@ -144,14 +144,14 @@ var top_view = func() {
return;
}
_top_view_index = view.indexof("Chase View Without Yaw");
- _reset_view_index = getprop("/sim/current-view/view-number");
- setprop("/sim/current-view/view-number", _top_view_index);
- _view_pitch_offset_deg = getprop("/sim/current-view/pitch-offset-deg");
- _view_heading_offset_deg = getprop("/sim/current-view/heading-offset-deg");
- _view_z_offset = getprop("/sim/current-view/z-offset-m");
- setprop("/sim/current-view/z-offset-m", -500.0);
- setprop("/sim/current-view/heading-offset-deg", _top_view_heading_offset_deg);
- setprop("/sim/current-view/pitch-offset-deg", 90.0);
+ _reset_view_index = getprop("sim/current-view/view-number");
+ setprop("sim/current-view/view-number", _top_view_index);
+ _view_pitch_offset_deg = getprop("sim/current-view/pitch-offset-deg");
+ _view_heading_offset_deg = getprop("sim/current-view/heading-offset-deg");
+ _view_z_offset = getprop("sim/current-view/z-offset-m");
+ setprop("sim/current-view/z-offset-m", -500.0);
+ setprop("sim/current-view/heading-offset-deg", _top_view_heading_offset_deg);
+ setprop("sim/current-view/pitch-offset-deg", 90.0);
_view_listener = setlistener("/sim/current-view/name", func {
_finalize_top_view();
}, 0, 0);
@@ -164,11 +164,11 @@ var _finalize_top_view = func() {
removelistener(_view_listener);
_view_listener = nil;
# Go back to the view to restore settings, in case user has switched away.
- setprop("/sim/current-view/view-number", _top_view_index);
- setprop("/sim/current-view/z-offset-m", _view_z_offset);
- setprop("/sim/current-view/heading-offset-deg", _view_heading_offset_deg);
- setprop("/sim/current-view/pitch-offset-deg", _view_pitch_offset_deg);
- setprop("/sim/current-view/view-number", _reset_view_index);
+ setprop("sim/current-view/view-number", _top_view_index);
+ setprop("sim/current-view/z-offset-m", _view_z_offset);
+ setprop("sim/current-view/heading-offset-deg", _view_heading_offset_deg);
+ setprop("sim/current-view/pitch-offset-deg", _view_pitch_offset_deg);
+ setprop("sim/current-view/view-number", _reset_view_index);
if (!_show) {
_clear_user_point_models();
_clear_waypoint_models();
@@ -330,7 +330,7 @@ var _check_turn_radius = func() {
}
}
- setprop("/sim/model/autopush/route/invalid", _invalid);
+ setprop("sim/model/autopush/route/invalid", _invalid);
}
setlistener("/sim/model/autopush/route/show", func(p) {
@@ -351,7 +351,7 @@ setlistener("/sim/model/autopush/route/show", func(p) {
var enter = func() {
clear();
top_view();
- _R_turn_min = getprop("/sim/model/autopush/min-turn-radius-m");
+ _R_turn_min = getprop("sim/model/autopush/min-turn-radius-m");
var wp = geo.aircraft_position();
var H = geo.elevation(wp.lat(), wp.lon());
if (H != nil) {
@@ -362,17 +362,17 @@ var enter = func() {
_add(geo.click_position());
});
# This property can be overridden manually, if needed.
- var wingspan = getprop("/sim/model/autopush/route/wingspan-m");
+ var wingspan = getprop("sim/model/autopush/route/wingspan-m");
if ((wingspan == nil) or (wingspan == 0.0)) {
# JSBSim
- wingspan = getprop("/fdm/jsbsim/metrics/bw-ft");
+ wingspan = getprop("fdm/jsbsim/metrics/bw-ft");
if (wingspan != nil) {
wingspan *= FT2M;
} else {
# YAsim
- wingspan = getprop("/fdm/yasim/model/wings/wing/wing-span");
+ wingspan = getprop("fdm/yasim/model/wings/wing/wing-span");
}
- setprop("/sim/model/autopush/route/wingspan-m", wingspan);
+ setprop("sim/model/autopush/route/wingspan-m", wingspan);
}
}
diff --git a/Nasal/Displays/DMC.nas b/Nasal/Displays/DMC.nas
index ae4ccd0f..ad61a1c5 100644
--- a/Nasal/Displays/DMC.nas
+++ b/Nasal/Displays/DMC.nas
@@ -9,13 +9,13 @@ var DMC = {
activeADIRS: -9,
- airspeeds: [props.globals.getNode("/systems/navigation/adr/output/cas-1", 1), props.globals.getNode("/systems/navigation/adr/output/cas-2", 1), props.globals.getNode("/systems/navigation/adr/output/cas-3", 1)],
- altitudes: [props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-1-capt", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-2-capt", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-3-capt", 1)],
- machs: [props.globals.getNode("/systems/navigation/adr/output/mach-1", 1), props.globals.getNode("/systems/navigation/adr/output/mach-2", 1), props.globals.getNode("/systems/navigation/adr/output/mach-3", 1)],
- altitudesPfd: [props.globals.getNode("/instrumentation/altimeter[0]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[1]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[2]/indicated-altitude-ft-pfd", 1)],
- sats: [props.globals.getNode("/systems/navigation/adr/output/sat-1", 1), props.globals.getNode("/systems/navigation/adr/output/sat-2", 1), props.globals.getNode("/systems/navigation/adr/output/sat-3", 1)],
- tats: [props.globals.getNode("/systems/navigation/adr/output/tat-1", 1), props.globals.getNode("/systems/navigation/adr/output/tat-2", 1), props.globals.getNode("/systems/navigation/adr/output/tat-3", 1)],
- trends: [props.globals.getNode("/instrumentation/pfd/speed-lookahead-1", 1), props.globals.getNode("/instrumentation/pfd/speed-lookahead-2", 1), props.globals.getNode("/instrumentation/pfd/speed-lookahead-3", 1)],
+ airspeeds: [props.globals.getNode("systems/navigation/adr/output/cas-1", 1), props.globals.getNode("systems/navigation/adr/output/cas-2", 1), props.globals.getNode("systems/navigation/adr/output/cas-3", 1)],
+ altitudes: [props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-1-capt", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-2-capt", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-3-capt", 1)],
+ machs: [props.globals.getNode("systems/navigation/adr/output/mach-1", 1), props.globals.getNode("systems/navigation/adr/output/mach-2", 1), props.globals.getNode("systems/navigation/adr/output/mach-3", 1)],
+ altitudesPfd: [props.globals.getNode("instrumentation/altimeter[0]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[1]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[2]/indicated-altitude-ft-pfd", 1)],
+ sats: [props.globals.getNode("systems/navigation/adr/output/sat-1", 1), props.globals.getNode("systems/navigation/adr/output/sat-2", 1), props.globals.getNode("systems/navigation/adr/output/sat-3", 1)],
+ tats: [props.globals.getNode("systems/navigation/adr/output/tat-1", 1), props.globals.getNode("systems/navigation/adr/output/tat-2", 1), props.globals.getNode("systems/navigation/adr/output/tat-3", 1)],
+ trends: [props.globals.getNode("instrumentation/pfd/speed-lookahead-1", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-2", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-3", 1)],
outputs: [nil, nil, nil, nil, nil, nil, nil], # airspeed, altitude, mach, pfd altitude, sat, tat, speed trend
new: func(num) {
@@ -74,8 +74,8 @@ var DMController = {
me.DMCs = [DMC.new(0), DMC.new(1), DMC.new(2)];
# update DMC2 to correct properties for first officer PFD
- me.DMCs[1].altitudes = [props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-1-fo", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-2-fo", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-3-fo", 1)];
- me.DMCs[1].altitudesPfd = [props.globals.getNode("/instrumentation/altimeter[3]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[4]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[5]/indicated-altitude-ft-pfd", 1)];
+ me.DMCs[1].altitudes = [props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-1-fo", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-2-fo", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-3-fo", 1)];
+ me.DMCs[1].altitudesPfd = [props.globals.getNode("instrumentation/altimeter[3]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[4]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[5]/indicated-altitude-ft-pfd", 1)];
me._init = 1;
}
diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas
index 740ab37e..87affa9a 100644
--- a/Nasal/ECAM/ECAM-controller.nas
+++ b/Nasal/ECAM/ECAM-controller.nas
@@ -1,18 +1,18 @@
# A3XX Electronic Centralised Aircraft Monitoring System
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
-var lines = [props.globals.getNode("/ECAM/msg/line1", 1), props.globals.getNode("/ECAM/msg/line2", 1), props.globals.getNode("/ECAM/msg/line3", 1), props.globals.getNode("/ECAM/msg/line4", 1), props.globals.getNode("/ECAM/msg/line5", 1), props.globals.getNode("/ECAM/msg/line6", 1), props.globals.getNode("/ECAM/msg/line7", 1), props.globals.getNode("/ECAM/msg/line8", 1)];
-var linesCol = [props.globals.getNode("/ECAM/msg/linec1", 1), props.globals.getNode("/ECAM/msg/linec2", 1), props.globals.getNode("/ECAM/msg/linec3", 1), props.globals.getNode("/ECAM/msg/linec4", 1), props.globals.getNode("/ECAM/msg/linec5", 1), props.globals.getNode("/ECAM/msg/linec6", 1), props.globals.getNode("/ECAM/msg/linec7", 1), props.globals.getNode("/ECAM/msg/linec8", 1)];
-var rightLines = [props.globals.getNode("/ECAM/rightmsg/line1", 1), props.globals.getNode("/ECAM/rightmsg/line2", 1), props.globals.getNode("/ECAM/rightmsg/line3", 1), props.globals.getNode("/ECAM/rightmsg/line4", 1), props.globals.getNode("/ECAM/rightmsg/line5", 1), props.globals.getNode("/ECAM/rightmsg/line6", 1), props.globals.getNode("/ECAM/rightmsg/line7", 1), props.globals.getNode("/ECAM/rightmsg/line8", 1)];
-var rightLinesCol = [props.globals.getNode("/ECAM/rightmsg/linec1", 1), props.globals.getNode("/ECAM/rightmsg/linec2", 1), props.globals.getNode("/ECAM/rightmsg/linec3", 1), props.globals.getNode("/ECAM/rightmsg/linec4", 1), props.globals.getNode("/ECAM/rightmsg/linec5", 1), props.globals.getNode("/ECAM/rightmsg/linec6", 1), props.globals.getNode("/ECAM/rightmsg/linec7", 1), props.globals.getNode("/ECAM/rightmsg/linec8", 1)];
-var statusLines = [props.globals.getNode("/ECAM/status/line1", 1), props.globals.getNode("/ECAM/status/line2", 1), props.globals.getNode("/ECAM/status/line3", 1), props.globals.getNode("/ECAM/status/line4", 1), props.globals.getNode("/ECAM/status/line5", 1), props.globals.getNode("/ECAM/status/line6", 1), props.globals.getNode("/ECAM/status/line7", 1), props.globals.getNode("/ECAM/status/line8", 1)];
-var statusLinesCol = [props.globals.getNode("/ECAM/status/linec1", 1), props.globals.getNode("/ECAM/status/linec2", 1), props.globals.getNode("/ECAM/status/linec3", 1), props.globals.getNode("/ECAM/status/linec4", 1), props.globals.getNode("/ECAM/status/linec5", 1), props.globals.getNode("/ECAM/status/linec6", 1), props.globals.getNode("/ECAM/status/linec7", 1), props.globals.getNode("/ECAM/status/linec8", 1)];
+var lines = [props.globals.getNode("ECAM/msg/line1", 1), props.globals.getNode("ECAM/msg/line2", 1), props.globals.getNode("ECAM/msg/line3", 1), props.globals.getNode("ECAM/msg/line4", 1), props.globals.getNode("ECAM/msg/line5", 1), props.globals.getNode("ECAM/msg/line6", 1), props.globals.getNode("ECAM/msg/line7", 1), props.globals.getNode("ECAM/msg/line8", 1)];
+var linesCol = [props.globals.getNode("ECAM/msg/linec1", 1), props.globals.getNode("ECAM/msg/linec2", 1), props.globals.getNode("ECAM/msg/linec3", 1), props.globals.getNode("ECAM/msg/linec4", 1), props.globals.getNode("ECAM/msg/linec5", 1), props.globals.getNode("ECAM/msg/linec6", 1), props.globals.getNode("ECAM/msg/linec7", 1), props.globals.getNode("ECAM/msg/linec8", 1)];
+var rightLines = [props.globals.getNode("ECAM/rightmsg/line1", 1), props.globals.getNode("ECAM/rightmsg/line2", 1), props.globals.getNode("ECAM/rightmsg/line3", 1), props.globals.getNode("ECAM/rightmsg/line4", 1), props.globals.getNode("ECAM/rightmsg/line5", 1), props.globals.getNode("ECAM/rightmsg/line6", 1), props.globals.getNode("ECAM/rightmsg/line7", 1), props.globals.getNode("ECAM/rightmsg/line8", 1)];
+var rightLinesCol = [props.globals.getNode("ECAM/rightmsg/linec1", 1), props.globals.getNode("ECAM/rightmsg/linec2", 1), props.globals.getNode("ECAM/rightmsg/linec3", 1), props.globals.getNode("ECAM/rightmsg/linec4", 1), props.globals.getNode("ECAM/rightmsg/linec5", 1), props.globals.getNode("ECAM/rightmsg/linec6", 1), props.globals.getNode("ECAM/rightmsg/linec7", 1), props.globals.getNode("ECAM/rightmsg/linec8", 1)];
+var statusLines = [props.globals.getNode("ECAM/status/line1", 1), props.globals.getNode("ECAM/status/line2", 1), props.globals.getNode("ECAM/status/line3", 1), props.globals.getNode("ECAM/status/line4", 1), props.globals.getNode("ECAM/status/line5", 1), props.globals.getNode("ECAM/status/line6", 1), props.globals.getNode("ECAM/status/line7", 1), props.globals.getNode("ECAM/status/line8", 1)];
+var statusLinesCol = [props.globals.getNode("ECAM/status/linec1", 1), props.globals.getNode("ECAM/status/linec2", 1), props.globals.getNode("ECAM/status/linec3", 1), props.globals.getNode("ECAM/status/linec4", 1), props.globals.getNode("ECAM/status/linec5", 1), props.globals.getNode("ECAM/status/linec6", 1), props.globals.getNode("ECAM/status/linec7", 1), props.globals.getNode("ECAM/status/linec8", 1)];
var leftOverflow = props.globals.initNode("/ECAM/warnings/overflow-left", 0, "BOOL");
var rightOverflow = props.globals.initNode("/ECAM/warnings/overflow-right", 0, "BOOL");
var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
-var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1);
+var dc_ess = props.globals.getNode("systems/electrical/bus/dc-ess", 1);
var lights = [props.globals.initNode("/ECAM/warnings/master-warning-light", 0, "BOOL"), props.globals.initNode("/ECAM/warnings/master-caution-light", 0, "BOOL")];
var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL")];
@@ -173,7 +173,7 @@ var ECAM_controller = {
me.reset();
},
loop: func() {
- if ((systems.ELEC.Bus.acEss.getValue() >= 110 or systems.ELEC.Bus.ac2.getValue() >= 110) and !getprop("/systems/acconfig/acconfig-running")) {
+ if ((systems.ELEC.Bus.acEss.getValue() >= 110 or systems.ELEC.Bus.ac2.getValue() >= 110) and !getprop("systems/acconfig/acconfig-running")) {
# update FWC phases
phaseLoop();
@@ -206,7 +206,7 @@ var ECAM_controller = {
# write to ECAM
var counter = 0;
- if (!getprop("/systems/acconfig/autoconfig-running")) {
+ if (!getprop("systems/acconfig/autoconfig-running")) {
foreach (var w; warnings.vector) {
if (w.active == 1) {
if (counter < 9) {
diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas
index 794ada61..77487292 100644
--- a/Nasal/ECAM/ECAM-logic.nas
+++ b/Nasal/ECAM/ECAM-logic.nas
@@ -5,24 +5,24 @@
# props.nas:
var dualFailNode = props.globals.initNode("/ECAM/dual-failure-enabled", 0, "BOOL");
-var phaseNode = props.globals.getNode("/ECAM/warning-phase", 1);
-var apWarn = props.globals.getNode("/it-autoflight/output/ap-warning", 1);
-var athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1);
-var emerGen = props.globals.getNode("/controls/electrical/switches/emer-gen", 1);
+var phaseNode = props.globals.getNode("ECAM/warning-phase", 1);
+var apWarn = props.globals.getNode("it-autoflight/output/ap-warning", 1);
+var athrWarn = props.globals.getNode("it-autoflight/output/athr-warning", 1);
+var emerGen = props.globals.getNode("controls/electrical/switches/emer-gen", 1);
-var fac1Node = props.globals.getNode("/controls/fctl/switches/fac1", 1);
-var state1Node = props.globals.getNode("/engines/engine[0]/state", 1);
-var state2Node = props.globals.getNode("/engines/engine[1]/state", 1);
-var wowNode = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
-var apu_rpm = props.globals.getNode("/systems/apu/rpm", 1);
-var wing_pb = props.globals.getNode("/controls/switches/wing", 1);
-var apumaster = props.globals.getNode("/controls/APU/master", 1);
-var apu_bleedSw = props.globals.getNode("/controls/pneumatic/switches/bleedapu", 1);
-var gear = props.globals.getNode("/gear/gear-pos-norm", 1);
-var cutoff1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1);
-var cutoff2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1);
+var fac1Node = props.globals.getNode("controls/fctl/switches/fac1", 1);
+var state1Node = props.globals.getNode("engines/engine[0]/state", 1);
+var state2Node = props.globals.getNode("engines/engine[1]/state", 1);
+var wowNode = props.globals.getNode("fdm/jsbsim/position/wow", 1);
+var apu_rpm = props.globals.getNode("systems/apu/rpm", 1);
+var wing_pb = props.globals.getNode("controls/switches/wing", 1);
+var apumaster = props.globals.getNode("controls/APU/master", 1);
+var apu_bleedSw = props.globals.getNode("controls/pneumatic/switches/bleedapu", 1);
+var gear = props.globals.getNode("gear/gear-pos-norm", 1);
+var cutoff1 = props.globals.getNode("controls/engines/engine[0]/cutoff-switch", 1);
+var cutoff2 = props.globals.getNode("controls/engines/engine[1]/cutoff-switch", 1);
var stallVoice = props.globals.initNode("/sim/sound/warnings/stall-voice", 0, "BOOL");
-var engOpt = props.globals.getNode("/options/eng", 1);
+var engOpt = props.globals.getNode("options/eng", 1);
# local variables
var phaseVar = nil;
@@ -38,7 +38,7 @@ var messages_priority_3 = func {
# Stall
# todo - altn law and emer cancel flipflops page 2440
- if (phaseVar >= 5 and phaseVar <= 7 and (getprop("/fdm/jsbsim/fcs/slat-pos-deg") <= 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 15 or getprop("/systems/navigation/adr/output/aoa-2") > 15 or getprop("/systems/navigation/adr/output/aoa-3") > 15)) or (getprop("/fdm/jsbsim/fcs/slat-pos-deg") > 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 23 or getprop("/systems/navigation/adr/output/aoa-2") > 23 or getprop("/systems/navigation/adr/output/aoa-3") > 23))) {
+ if (phaseVar >= 5 and phaseVar <= 7 and (getprop("fdm/jsbsim/fcs/slat-pos-deg") <= 15 and (getprop("systems/navigation/adr/output/aoa-1") > 15 or getprop("systems/navigation/adr/output/aoa-2") > 15 or getprop("systems/navigation/adr/output/aoa-3") > 15)) or (getprop("fdm/jsbsim/fcs/slat-pos-deg") > 15 and (getprop("systems/navigation/adr/output/aoa-1") > 23 or getprop("systems/navigation/adr/output/aoa-2") > 23 or getprop("systems/navigation/adr/output/aoa-3") > 23))) {
stall.active = 1;
} else {
ECAM_controller.warningReset(stall);
@@ -50,21 +50,21 @@ var messages_priority_3 = func {
stallVoice.setValue(0);
}
- if ((phaseVar == 1 or (phaseVar >= 5 and phaseVar <= 7)) and getprop("/systems/navigation/adr/output/overspeed")) {
+ if ((phaseVar == 1 or (phaseVar >= 5 and phaseVar <= 7)) and getprop("systems/navigation/adr/output/overspeed")) {
overspeed.active = 1;
- if (getprop("/systems/navigation/adr/computation/overspeed-vmo") or getprop("/systems/navigation/adr/computation/overspeed-mmo")) {
+ if (getprop("systems/navigation/adr/computation/overspeed-vmo") or getprop("systems/navigation/adr/computation/overspeed-mmo")) {
overspeedVMO.active = 1;
} else {
ECAM_controller.warningReset(overspeedVMO);
}
- if (getprop("/systems/navigation/adr/computation/overspeed-vle")) {
+ if (getprop("systems/navigation/adr/computation/overspeed-vle")) {
overspeedGear.active = 1;
} else {
ECAM_controller.warningReset(overspeedGear);
}
- if (getprop("/systems/navigation/adr/computation/overspeed-vfe")) {
+ if (getprop("systems/navigation/adr/computation/overspeed-vfe")) {
overspeedFlap.active = 1;
overspeedFlap.msg = "-VFE................" ~ (systems.ADIRSnew.overspeedVFE.getValue() - 4);
} else {
@@ -80,7 +80,7 @@ var messages_priority_3 = func {
}
# FCTL FLAPS NOT ZERO
- if ((flap_not_zero.clearFlag == 0) and phaseVar == 6 and getprop("/controls/flight/flap-lever") != 0 and getprop("/instrumentation/altimeter/indicated-altitude-ft") > 22000) {
+ if ((flap_not_zero.clearFlag == 0) and phaseVar == 6 and getprop("controls/flight/flap-lever") != 0 and getprop("instrumentation/altimeter/indicated-altitude-ft") > 22000) {
flap_not_zero.active = 1;
} else {
ECAM_controller.warningReset(flap_not_zero);
@@ -97,13 +97,13 @@ var messages_priority_3 = func {
}
if (dualFail.active == 1) {
- if (getprop("/controls/engines/engine-start-switch") != 2 and dualFailModeSel.clearFlag == 0) {
+ if (getprop("controls/engines/engine-start-switch") != 2 and dualFailModeSel.clearFlag == 0) {
dualFailModeSel.active = 1;
} else {
ECAM_controller.warningReset(dualFailModeSel);
}
- if (getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01 and dualFailLevers.clearFlag == 0) {
+ if (getprop("fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("fdm/jsbsim/fcs/throttle-lever[1]") > 0.01 and dualFailLevers.clearFlag == 0) {
dualFailLevers.active = 1;
} else {
ECAM_controller.warningReset(dualFailLevers);
@@ -270,19 +270,19 @@ var messages_priority_3 = func {
}
# ENG FIRE
- if ((eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and phaseVar >= 5 and phaseVar <= 7) or (eng1FireGnevacBat.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and (phaseVar < 5 or phaseVar > 7))) {
+ if ((eng1FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine1/warning-active") == 1 and phaseVar >= 5 and phaseVar <= 7) or (eng1FireGnevacBat.clearFlag == 0 and getprop("systems/fire/engine1/warning-active") == 1 and (phaseVar < 5 or phaseVar > 7))) {
eng1Fire.active = 1;
} else {
ECAM_controller.warningReset(eng1Fire);
}
- if ((eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/warning-active") == 1 and phaseVar >= 5 and phaseVar <= 7) or (eng2FireGnevacBat.clearFlag == 0 and getprop("/systems/fire/engine2/warning-active") == 1 and (phaseVar < 5 or phaseVar > 7))) {
+ if ((eng2FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine2/warning-active") == 1 and phaseVar >= 5 and phaseVar <= 7) or (eng2FireGnevacBat.clearFlag == 0 and getprop("systems/fire/engine2/warning-active") == 1 and (phaseVar < 5 or phaseVar > 7))) {
eng2Fire.active = 1;
} else {
ECAM_controller.warningReset(eng2Fire);
}
- if (apuFireMaster.clearFlag == 0 and getprop("/systems/fire/apu/warning-active")) {
+ if (apuFireMaster.clearFlag == 0 and getprop("systems/fire/apu/warning-active")) {
apuFire.active = 1;
} else {
ECAM_controller.warningReset(apuFire);
@@ -290,35 +290,35 @@ var messages_priority_3 = func {
if (eng1Fire.active == 1) {
if (phaseVar >= 5 and phaseVar <= 7) {
- if (eng1FireFllever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01) {
+ if (eng1FireFllever.clearFlag == 0 and getprop("fdm/jsbsim/fcs/throttle-lever[0]") > 0.01) {
eng1FireFllever.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFllever);
}
- if (eng1FireFlmaster.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
+ if (eng1FireFlmaster.clearFlag == 0 and getprop("controls/engines/engine[0]/cutoff-switch") == 0) {
eng1FireFlmaster.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlmaster);
}
- if (eng1FireFlPB.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 0) {
+ if (eng1FireFlPB.clearFlag == 0 and getprop("controls/engines/engine[0]/fire-btn") == 0) {
eng1FireFlPB.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlPB);
}
- if (getprop("/systems/fire/engine1/agent1-timer") != 0 and getprop("/systems/fire/engine1/agent1-timer") != 99) {
- eng1FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("/systems/fire/engine1/agent1-timer") ~ " S...DISCH";
+ if (getprop("systems/fire/engine1/agent1-timer") != 0 and getprop("systems/fire/engine1/agent1-timer") != 99) {
+ eng1FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("systems/fire/engine1/agent1-timer") ~ " S...DISCH";
}
- if (eng1FireFlAgent1.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 1 and !getprop("/systems/fire/engine1/disch1") and getprop("/systems/fire/engine1/agent1-timer") != 0 and getprop("/systems/fire/engine1/agent1-timer") != 99) {
+ if (eng1FireFlAgent1.clearFlag == 0 and getprop("controls/engines/engine[0]/fire-btn") == 1 and !getprop("systems/fire/engine1/disch1") and getprop("systems/fire/engine1/agent1-timer") != 0 and getprop("systems/fire/engine1/agent1-timer") != 99) {
eng1FireFlAgent1Timer.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlAgent1Timer);
}
- if (eng1FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine1/disch1") and (getprop("/systems/fire/engine1/agent1-timer") == 0 or getprop("/systems/fire/engine1/agent1-timer") == 99)) {
+ if (eng1FireFlAgent1.clearFlag == 0 and !getprop("systems/fire/engine1/disch1") and (getprop("systems/fire/engine1/agent1-timer") == 0 or getprop("systems/fire/engine1/agent1-timer") == 99)) {
eng1FireFlAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlAgent1);
@@ -330,17 +330,17 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng1FireFlATC);
}
- if (getprop("/systems/fire/engine1/agent2-timer") != 0 and getprop("/systems/fire/engine1/agent2-timer") != 99) {
- eng1FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine1/agent2-timer") ~ " S:";
+ if (getprop("systems/fire/engine1/agent2-timer") != 0 and getprop("systems/fire/engine1/agent2-timer") != 99) {
+ eng1FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("systems/fire/engine1/agent2-timer") ~ " S:";
}
- if (eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/disch1") and !getprop("/systems/fire/engine1/disch2") and getprop("/systems/fire/engine1/agent2-timer") > 0) {
+ if (eng1FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine1/disch1") and !getprop("systems/fire/engine1/disch2") and getprop("systems/fire/engine1/agent2-timer") > 0) {
eng1FireFl30Sec.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFl30Sec);
}
- if (eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/disch1") and !getprop("/systems/fire/engine1/disch2")) {
+ if (eng1FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine1/disch1") and !getprop("systems/fire/engine1/disch2")) {
eng1FireFlAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlAgent2);
@@ -356,13 +356,13 @@ var messages_priority_3 = func {
}
if (phaseVar < 5 or phaseVar > 7) {
- if (eng1FireGnlever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
+ if (eng1FireGnlever.clearFlag == 0 and getprop("fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
eng1FireGnlever.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnlever);
}
- if (eng1FireGnparkbrk.clearFlag == 0 and getprop("/controls/gear/brake-parking") == 0) {
+ if (eng1FireGnparkbrk.clearFlag == 0 and getprop("controls/gear/brake-parking") == 0) {
eng1FireGnstopped.active = 1;
eng1FireGnparkbrk.active = 1;
} else {
@@ -370,31 +370,31 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng1FireGnparkbrk);
}
- if (eng1FireGnmaster.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
+ if (eng1FireGnmaster.clearFlag == 0 and getprop("controls/engines/engine[0]/cutoff-switch") == 0) {
eng1FireGnmaster.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnmaster);
}
- if (eng1FireGnPB.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 0) {
+ if (eng1FireGnPB.clearFlag == 0 and getprop("controls/engines/engine[0]/fire-btn") == 0) {
eng1FireGnPB.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnPB);
}
- if (eng1FireGnAgent1.clearFlag == 0 and !getprop("/systems/fire/engine1/disch1")) {
+ if (eng1FireGnAgent1.clearFlag == 0 and !getprop("systems/fire/engine1/disch1")) {
eng1FireGnAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnAgent1);
}
- if (eng1FireGnAgent2.clearFlag == 0 and !getprop("/systems/fire/engine1/disch2")) {
+ if (eng1FireGnAgent2.clearFlag == 0 and !getprop("systems/fire/engine1/disch2")) {
eng1FireGnAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnAgent2);
}
- if (eng1FireGnmaster2.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
+ if (eng1FireGnmaster2.clearFlag == 0 and getprop("controls/engines/engine[1]/cutoff-switch") == 0) {
eng1FireGnmaster2.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnmaster2);
@@ -420,7 +420,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng1FireGnevacSw);
}
- if (eng1FireGnevacApu.clearFlag == 0 and getprop("/controls/APU/master") and getprop("/systems/apu/rpm") > 99) {
+ if (eng1FireGnevacApu.clearFlag == 0 and getprop("controls/APU/master") and getprop("systems/apu/rpm") > 99) {
eng1FireGnevacApu.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnevacApu);
@@ -473,35 +473,35 @@ var messages_priority_3 = func {
if (eng2Fire.active == 1) {
if (phaseVar >= 5 and phaseVar <= 7) {
- if (eng2FireFllever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
+ if (eng2FireFllever.clearFlag == 0 and getprop("fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
eng2FireFllever.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFllever);
}
- if (eng2FireFlmaster.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
+ if (eng2FireFlmaster.clearFlag == 0 and getprop("controls/engines/engine[1]/cutoff-switch") == 0) {
eng2FireFlmaster.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlmaster);
}
- if (eng2FireFlPB.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 0) {
+ if (eng2FireFlPB.clearFlag == 0 and getprop("controls/engines/engine[1]/fire-btn") == 0) {
eng2FireFlPB.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlPB);
}
- if (getprop("/systems/fire/engine2/agent1-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) {
- eng2FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("/systems/fire/engine2/agent1-timer") ~ " S...DISCH";
+ if (getprop("systems/fire/engine2/agent1-timer") != 0 and getprop("systems/fire/engine2/agent1-timer") != 99) {
+ eng2FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("systems/fire/engine2/agent1-timer") ~ " S...DISCH";
}
- if (eng2FireFlAgent1.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 1 and !getprop("/systems/fire/engine2/disch1") and getprop("/systems/fire/engine2agent1-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) {
+ if (eng2FireFlAgent1.clearFlag == 0 and getprop("controls/engines/engine[1]/fire-btn") == 1 and !getprop("systems/fire/engine2/disch1") and getprop("systems/fire/engine2agent1-timer") != 0 and getprop("systems/fire/engine2/agent1-timer") != 99) {
eng2FireFlAgent1Timer.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlAgent1Timer);
}
- if (eng2FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1") and (getprop("/systems/fire/engine2/agent1-timer") == 0 or getprop("/systems/fire/engine2/agent1-timer") == 99)) {
+ if (eng2FireFlAgent1.clearFlag == 0 and !getprop("systems/fire/engine2/disch1") and (getprop("systems/fire/engine2/agent1-timer") == 0 or getprop("systems/fire/engine2/agent1-timer") == 99)) {
eng2FireFlAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlAgent1);
@@ -513,17 +513,17 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng2FireFlATC);
}
- if (getprop("/systems/fire/engine2/agent2-timer") != 0 and getprop("/systems/fire/engine2/agent2-timer") != 99) {
- eng2FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine2/agent2-timer") ~ " S:";
+ if (getprop("systems/fire/engine2/agent2-timer") != 0 and getprop("systems/fire/engine2/agent2-timer") != 99) {
+ eng2FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("systems/fire/engine2/agent2-timer") ~ " S:";
}
- if (eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/disch1") and !getprop("/systems/fire/engine2/disch2") and getprop("/systems/fire/engine2/agent2-timer") > 0) {
+ if (eng2FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine2/disch1") and !getprop("systems/fire/engine2/disch2") and getprop("systems/fire/engine2/agent2-timer") > 0) {
eng2FireFl30Sec.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFl30Sec);
}
- if (eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/disch1") and !getprop("/systems/fire/engine2/disch2")) {
+ if (eng2FireFlAgent2.clearFlag == 0 and getprop("systems/fire/engine2/disch1") and !getprop("systems/fire/engine2/disch2")) {
eng2FireFlAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlAgent2);
@@ -539,13 +539,13 @@ var messages_priority_3 = func {
}
if (phaseVar < 5 or phaseVar > 7) {
- if (eng2FireGnlever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
+ if (eng2FireGnlever.clearFlag == 0 and getprop("fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
eng2FireGnlever.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnlever);
}
- if (eng2FireGnparkbrk.clearFlag == 0 and getprop("/controls/gear/brake-parking") == 0) {
+ if (eng2FireGnparkbrk.clearFlag == 0 and getprop("controls/gear/brake-parking") == 0) {
eng2FireGnstopped.active = 1;
eng2FireGnparkbrk.active = 1;
} else {
@@ -553,31 +553,31 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng2FireGnparkbrk);
}
- if (eng2FireGnmaster.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
+ if (eng2FireGnmaster.clearFlag == 0 and getprop("controls/engines/engine[1]/cutoff-switch") == 0) {
eng2FireGnmaster.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnmaster);
}
- if (eng2FireGnPB.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 0) {
+ if (eng2FireGnPB.clearFlag == 0 and getprop("controls/engines/engine[1]/fire-btn") == 0) {
eng2FireGnPB.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnPB);
}
- if (eng2FireGnAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1")) {
+ if (eng2FireGnAgent1.clearFlag == 0 and !getprop("systems/fire/engine2/disch1")) {
eng2FireGnAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnAgent1);
}
- if (eng2FireGnAgent2.clearFlag == 0 and !getprop("/systems/fire/engine2/disch2")) {
+ if (eng2FireGnAgent2.clearFlag == 0 and !getprop("systems/fire/engine2/disch2")) {
eng2FireGnAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnAgent2);
}
- if (eng2FireGnmaster2.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
+ if (eng2FireGnmaster2.clearFlag == 0 and getprop("controls/engines/engine[0]/cutoff-switch") == 0) {
eng2FireGnmaster2.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnmaster2);
@@ -603,7 +603,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(eng2FireGnevacSw);
}
- if (eng2FireGnevacApu.clearFlag == 0 and getprop("/controls/APU/master") and getprop("/systems/apu/rpm") > 99) {
+ if (eng2FireGnevacApu.clearFlag == 0 and getprop("controls/APU/master") and getprop("systems/apu/rpm") > 99) {
eng2FireGnevacApu.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnevacApu);
@@ -656,29 +656,29 @@ var messages_priority_3 = func {
# APU Fire
if (apuFire.active == 1) {
- if (apuFirePB.clearFlag == 0 and !getprop("/controls/APU/fire-btn")) {
+ if (apuFirePB.clearFlag == 0 and !getprop("controls/APU/fire-btn")) {
apuFirePB.active = 1;
} else {
ECAM_controller.warningReset(apuFirePB);
}
- if (getprop("/systems/fire/apu/agent-timer") != 0 and getprop("/systems/fire/apu/agent-timer") != 99) {
- apuFireAgentTimer.msg = " -AGENT AFT " ~ getprop("/systems/fire/apu/agent-timer") ~ " S...DISCH";
+ if (getprop("systems/fire/apu/agent-timer") != 0 and getprop("systems/fire/apu/agent-timer") != 99) {
+ apuFireAgentTimer.msg = " -AGENT AFT " ~ getprop("systems/fire/apu/agent-timer") ~ " S...DISCH";
}
- if (apuFireAgent.clearFlag == 0 and getprop("/controls/APU/fire-btn") and !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") != 0) {
+ if (apuFireAgent.clearFlag == 0 and getprop("controls/APU/fire-btn") and !getprop("systems/fire/apu/disch") and getprop("systems/fire/apu/agent-timer") != 0) {
apuFireAgentTimer.active = 1;
} else {
ECAM_controller.warningReset(apuFireAgentTimer);
}
- if (apuFireAgent.clearFlag == 0 and getprop("/controls/APU/fire-btn") and !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") == 0) {
+ if (apuFireAgent.clearFlag == 0 and getprop("controls/APU/fire-btn") and !getprop("systems/fire/apu/disch") and getprop("systems/fire/apu/agent-timer") == 0) {
apuFireAgent.active = 1;
} else {
ECAM_controller.warningReset(apuFireAgent);
}
- if (apuFireMaster.clearFlag == 0 and getprop("/controls/APU/master")) {
+ if (apuFireMaster.clearFlag == 0 and getprop("controls/APU/master")) {
apuFireMaster.active = 1;
} else {
ECAM_controller.warningReset(apuFireMaster);
@@ -691,7 +691,7 @@ var messages_priority_3 = func {
}
# CONFIG
- if ((slats_config.clearFlag == 0) and (getprop("/controls/flight/flap-lever") == 0 or getprop("/controls/flight/flap-lever")) == 4 and phaseVar >= 3 and phaseVar <= 4) {
+ if ((slats_config.clearFlag == 0) and (getprop("controls/flight/flap-lever") == 0 or getprop("controls/flight/flap-lever")) == 4 and phaseVar >= 3 and phaseVar <= 4) {
slats_config.active = 1;
slats_config_1.active = 1;
} else {
@@ -699,7 +699,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(slats_config_1);
}
- if ((flaps_config.clearFlag == 0) and (getprop("/controls/flight/flap-lever") == 0 or getprop("/controls/flight/flap-lever") == 4) and phaseVar >= 3 and phaseVar <= 4) {
+ if ((flaps_config.clearFlag == 0) and (getprop("controls/flight/flap-lever") == 0 or getprop("controls/flight/flap-lever") == 4) and phaseVar >= 3 and phaseVar <= 4) {
flaps_config.active = 1;
flaps_config_1.active = 1;
} else {
@@ -707,7 +707,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(flaps_config_1);
}
- if ((spd_brk_config.clearFlag == 0) and getprop("/controls/flight/speedbrake") != 0 and phaseVar >= 3 and phaseVar <= 4) {
+ if ((spd_brk_config.clearFlag == 0) and getprop("controls/flight/speedbrake") != 0 and phaseVar >= 3 and phaseVar <= 4) {
spd_brk_config.active = 1;
spd_brk_config_1.active = 1;
} else {
@@ -715,7 +715,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(spd_brk_config_1);
}
- if ((pitch_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65) and phaseVar >= 3 and phaseVar <= 4) {
+ if ((pitch_trim_config.clearFlag == 0) and (getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65) and phaseVar >= 3 and phaseVar <= 4) {
pitch_trim_config.active = 1;
pitch_trim_config_1.active = 1;
} else {
@@ -723,7 +723,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(pitch_trim_config_1);
}
- if ((rud_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) and phaseVar >= 3 and phaseVar <= 4) {
+ if ((rud_trim_config.clearFlag == 0) and (getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) and phaseVar >= 3 and phaseVar <= 4) {
rud_trim_config.active = 1;
rud_trim_config_1.active = 1;
} else {
@@ -731,7 +731,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(rud_trim_config_1);
}
- if ((park_brk_config.clearFlag == 0) and getprop("/controls/gear/brake-parking") == 1 and phaseVar >= 3 and phaseVar <= 4) {
+ if ((park_brk_config.clearFlag == 0) and getprop("controls/gear/brake-parking") == 1 and phaseVar >= 3 and phaseVar <= 4) {
park_brk_config.active = 1;
} else {
ECAM_controller.warningReset(park_brk_config);
@@ -752,7 +752,7 @@ var messages_priority_3 = func {
cargoSmokeFwd.isMainMsg = 1;
}
- if (cargoSmokeFwdAgent.clearFlag == 0 and cargoSmokeFwd.active == 1 and !getprop("/systems/fire/cargo/disch")) {
+ if (cargoSmokeFwdAgent.clearFlag == 0 and cargoSmokeFwd.active == 1 and !getprop("systems/fire/cargo/disch")) {
cargoSmokeFwdAgent.active = 1;
} else {
ECAM_controller.warningReset(cargoSmokeFwdAgent);
@@ -767,7 +767,7 @@ var messages_priority_3 = func {
systems.cargoTestBtnOff.setBoolValue(0);
}
- if (cargoSmokeAftAgent.clearFlag == 0 and cargoSmokeAft.active == 1 and !getprop("/systems/fire/cargo/disch")) {
+ if (cargoSmokeAftAgent.clearFlag == 0 and cargoSmokeAft.active == 1 and !getprop("systems/fire/cargo/disch")) {
cargoSmokeAftAgent.active = 1;
} else {
ECAM_controller.warningReset(cargoSmokeAftAgent);
@@ -788,7 +788,7 @@ var messages_priority_3 = func {
}
# ESS on BAT
- if ((!gear.getValue() or !getprop("/controls/gear/gear-down")) and getprop("/systems/electrical/some-electric-thingie/static-inverter-timer") == 1 and phaseVar >= 5 and phaseVar <= 7) {
+ if ((!gear.getValue() or !getprop("controls/gear/gear-down")) and getprop("systems/electrical/some-electric-thingie/static-inverter-timer") == 1 and phaseVar >= 5 and phaseVar <= 7) {
essBusOnBat.active = 1;
essBusOnBatLGUplock.active = 1;
essBusOnBatManOn.active = 1;
@@ -805,24 +805,24 @@ var messages_priority_3 = func {
}
# EMER CONFIG
- if (getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dualFailNode.getBoolValue() and phaseVar != 4 and phaseVar != 8 and emerconfig.clearFlag == 0) {
+ if (getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !dualFailNode.getBoolValue() and phaseVar != 4 and phaseVar != 8 and emerconfig.clearFlag == 0) {
emerconfig.active = 1;
- if (getprop("/systems/hydraulic/sources/rat/position") != 0 and emerconfigMinRat.clearFlag == 0) {
+ if (getprop("systems/hydraulic/sources/rat/position") != 0 and emerconfigMinRat.clearFlag == 0) {
emerconfigMinRat.active = 1;
} else {
ECAM_controller.warningReset(emerconfigMinRat);
}
- if (!(getprop("/systems/electrical/some-electric-thingie/generator-1-reset") and getprop("/systems/electrical/some-electric-thingie/generator-2-reset")) and emerconfigGen.clearFlag == 0) {
+ if (!(getprop("systems/electrical/some-electric-thingie/generator-1-reset") and getprop("systems/electrical/some-electric-thingie/generator-2-reset")) and emerconfigGen.clearFlag == 0) {
emerconfigGen.active = 1; # EGEN12R TRUE
} else {
ECAM_controller.warningReset(emerconfigGen);
}
- if (!(getprop("/systems/electrical/some-electric-thingie/generator-1-reset-bustie") and getprop("/systems/electrical/some-electric-thingie/generator-2-reset-bustie")) and emerconfigGen2.clearFlag == 0) {
+ if (!(getprop("systems/electrical/some-electric-thingie/generator-1-reset-bustie") and getprop("systems/electrical/some-electric-thingie/generator-2-reset-bustie")) and emerconfigGen2.clearFlag == 0) {
emerconfigGen2.active = 1;
- if (getprop("/controls/electrical/switches/bus-tie")) {
+ if (getprop("controls/electrical/switches/bus-tie")) {
emerconfigBusTie.active = 1;
} else {
ECAM_controller.warningReset(emerconfigBusTie);
@@ -834,13 +834,13 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(emerconfigGen3);
}
- if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 0 and emerconfigManOn.clearFlag == 0) {
+ if (getprop("systems/electrical/relay/emer-glc/contact-pos") == 0 and emerconfigManOn.clearFlag == 0) {
emerconfigManOn.active = 1;
} else {
ECAM_controller.warningReset(emerconfigManOn);
}
- if (getprop("/controls/engines/engine-start-switch") != 2 and emerconfigEngMode.clearFlag == 0) {
+ if (getprop("controls/engines/engine-start-switch") != 2 and emerconfigEngMode.clearFlag == 0) {
emerconfigEngMode.active = 1;
} else {
ECAM_controller.warningReset(emerconfigEngMode);
@@ -876,7 +876,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(emerconfigFAC);
}
- if (!getprop("/controls/electrical/switches/bus-tie") and emerconfigBusTie2.clearFlag == 0) {
+ if (!getprop("controls/electrical/switches/bus-tie") and emerconfigBusTie2.clearFlag == 0) {
emerconfigBusTie2.active = 1;
} else {
ECAM_controller.warningReset(emerconfigBusTie2);
@@ -937,7 +937,7 @@ var messages_priority_3 = func {
var messages_priority_2 = func {
phaseVar = phaseNode.getValue();
# DC EMER CONFIG
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and dcEmerconfig.clearFlag == 0) {
+ if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and dcEmerconfig.clearFlag == 0) {
dcEmerconfig.active = 1;
dcEmerconfigManOn.active = 1;
} else {
@@ -945,7 +945,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcEmerconfigManOn);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and dcBus12Fault.clearFlag == 0) {
+ if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and dcBus12Fault.clearFlag == 0) {
dcBus12Fault.active = 1;
dcBus12FaultBlower.active = 1;
dcBus12FaultExtract.active = 1;
@@ -961,7 +961,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus12FaultBrking);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBusEssFault.clearFlag == 0) {
+ if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBusEssFault.clearFlag == 0) {
AcBusEssFault.active = 1;
if (!systems.ELEC.Switch.acEssFeed.getBoolValue()) {
AcBusEssFaultFeed.active = 1;
@@ -975,7 +975,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(AcBusEssFaultAtc);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBus1Fault.clearFlag == 0) {
+ if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBus1Fault.clearFlag == 0) {
AcBus1Fault.active = 1;
AcBus1FaultBlower.active = 1;
} else {
@@ -997,7 +997,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(DcEssBusFaultGPWS);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBus2Fault.clearFlag == 0) {
+ if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBus2Fault.clearFlag == 0) {
AcBus2Fault.active = 1;
AcBus2FaultExtract.active = 1;
} else {
@@ -1005,7 +1005,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(AcBus2FaultExtract);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar != 4 and phaseVar != 8 and dcBus1Fault.clearFlag == 0) {
+ if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar != 4 and phaseVar != 8 and dcBus1Fault.clearFlag == 0) {
dcBus1Fault.active = 1;
dcBus1FaultBlower.active = 1;
dcBus1FaultExtract.active = 1;
@@ -1015,7 +1015,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus1FaultExtract);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar != 4 and phaseVar != 8 and dcBus2Fault.clearFlag == 0) {
+ if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar != 4 and phaseVar != 8 and dcBus2Fault.clearFlag == 0) {
dcBus2Fault.active = 1;
dcBus2FaultAirData.active = 1;
dcBus2FaultBaro.active = 1;
@@ -1025,13 +1025,13 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus2FaultBaro);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar != 4 and phaseVar != 5 and phaseVar != 7 and phaseVar != 8 and dcBusBatFault.clearFlag == 0) {
+ if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar != 4 and phaseVar != 5 and phaseVar != 7 and phaseVar != 8 and dcBusBatFault.clearFlag == 0) {
dcBusBatFault.active = 1;
} else {
ECAM_controller.warningReset(dcBusBatFault);
}
- if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar != 4 and phaseVar != 8 and dcBusEssShed.clearFlag == 0) {
+ if (!(getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar != 4 and phaseVar != 8 and dcBusEssShed.clearFlag == 0) {
dcBusEssShed.active = 1;
dcBusEssShedExtract.active = 1;
dcBusEssShedIcing.active = 1;
@@ -1041,9 +1041,9 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBusEssShedIcing);
}
- if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar != 4 and phaseVar != 8 and acBusEssShed.clearFlag == 0) {
+ if (!(getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar != 4 and phaseVar != 8 and acBusEssShed.clearFlag == 0) {
acBusEssShed.active = 1;
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config")) {
+ if (!getprop("systems/electrical/some-electric-thingie/emer-elec-config")) {
acBusEssShedAtc.active = 1;
} else {
ECAM_controller.warningReset(acBusEssShed);
@@ -1061,8 +1061,8 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(athr_offw_1);
}
- if ((athr_lock.clearFlag == 0) and phaseVar >= 5 and phaseVar <= 7 and getprop("/systems/thrust/thr-locked-alert") == 1) {
- if (getprop("/systems/thrust/thr-locked-flash") == 0) {
+ if ((athr_lock.clearFlag == 0) and phaseVar >= 5 and phaseVar <= 7 and getprop("systems/thrust/thr-locked-alert") == 1) {
+ if (getprop("systems/thrust/thr-locked-flash") == 0) {
athr_lock.msg = " ";
} else {
athr_lock.msg = msgSave
@@ -1075,7 +1075,7 @@ var messages_priority_2 = func {
}
- if ((athr_lim.clearFlag == 0) and getprop("/it-autoflight/output/athr") == 1 and ((getprop("/systems/thrust/eng-out") != 1 and (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN")) or (getprop("/systems/thrust/eng-out") == 1 and (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN" or (getprop("/systems/thrust/state1") == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83) or (getprop("/systems/thrust/state2") == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83)))) and (phaseVar >= 5 and phaseVar <= 7)) {
+ if ((athr_lim.clearFlag == 0) and getprop("it-autoflight/output/athr") == 1 and ((getprop("systems/thrust/eng-out") != 1 and (getprop("systems/thrust/state1") == "MAN" or getprop("systems/thrust/state2") == "MAN")) or (getprop("systems/thrust/eng-out") == 1 and (getprop("systems/thrust/state1") == "MAN" or getprop("systems/thrust/state2") == "MAN" or (getprop("systems/thrust/state1") == "MAN THR" and getprop("controls/engines/engine[0]/throttle-pos") <= 0.83) or (getprop("systems/thrust/state2") == "MAN THR" and getprop("controls/engines/engine[0]/throttle-pos") <= 0.83)))) and (phaseVar >= 5 and phaseVar <= 7)) {
athr_lim.active = 1;
athr_lim_1.active = 1;
} else {
@@ -1084,7 +1084,7 @@ var messages_priority_2 = func {
}
- if (getprop("/instrumentation/tcas/serviceable") == 0 and phaseVar != 3 and phaseVar != 4 and phaseVar != 7 and systems.ELEC.Bus.ac1.getValue() and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
+ if (getprop("instrumentation/tcas/serviceable") == 0 and phaseVar != 3 and phaseVar != 4 and phaseVar != 7 and systems.ELEC.Bus.ac1.getValue() and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
tcasFault.active = 1;
} else {
ECAM_controller.warningReset(tcasFault);
@@ -1115,14 +1115,14 @@ var messages_priority_2 = func {
}
# APU EMER SHUT DOWN
- if (apuEmerShutdown.clearFlag == 0 and systems.apuEmerShutdown.getBoolValue() and !getprop("/systems/fire/apu/warning-active") and (phaseVar == 6 or phaseVar >= 9 or phaseVar <= 2)) {
+ if (apuEmerShutdown.clearFlag == 0 and systems.apuEmerShutdown.getBoolValue() and !getprop("systems/fire/apu/warning-active") and (phaseVar == 6 or phaseVar >= 9 or phaseVar <= 2)) {
apuEmerShutdown.active = 1;
} elsif (apuEmerShutdown.clearFlag == 1) {
ECAM_controller.warningReset(apuEmerShutdown);
apuEmerShutdown.isMainMsg = 1;
}
- if (apuEmerShutdownMast.clearFlag == 0 and getprop("/controls/APU/master") and apuEmerShutdown.active == 1) {
+ if (apuEmerShutdownMast.clearFlag == 0 and getprop("controls/APU/master") and apuEmerShutdown.active == 1) {
apuEmerShutdownMast.active = 1;
} else {
ECAM_controller.warningReset(apuEmerShutdownMast);
@@ -1213,25 +1213,25 @@ var messages_priority_0 = func {
var messages_config_memo = func {
phaseVar = phaseNode.getValue();
- if (getprop("/controls/flight/flap-lever") == 0 or getprop("/controls/flight/flap-lever") == 4 or getprop("/controls/flight/speedbrake") != 0 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) {
- setprop("/ECAM/to-config-normal", 0);
+ if (getprop("controls/flight/flap-lever") == 0 or getprop("controls/flight/flap-lever") == 4 or getprop("controls/flight/speedbrake") != 0 or getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65 or getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) {
+ setprop("ECAM/to-config-normal", 0);
} else {
- setprop("/ECAM/to-config-normal", 1);
+ setprop("ECAM/to-config-normal", 1);
}
- if (getprop("/ECAM/to-config-test") and (phaseVar == 2 or phaseVar == 9)) {
- setprop("/ECAM/to-config-set", 1);
+ if (getprop("ECAM/to-config-test") and (phaseVar == 2 or phaseVar == 9)) {
+ setprop("ECAM/to-config-set", 1);
} else {
- setprop("/ECAM/to-config-set", 0);
+ setprop("ECAM/to-config-set", 0);
}
- if (!getprop("/ECAM/to-config-normal") or phaseVar == 6) {
- setprop("/ECAM/to-config-reset", 1);
+ if (!getprop("ECAM/to-config-normal") or phaseVar == 6) {
+ setprop("ECAM/to-config-reset", 1);
} else {
- setprop("/ECAM/to-config-reset", 0);
+ setprop("ECAM/to-config-reset", 0);
}
- if (getprop("/controls/autobrake/mode") == 3) {
+ if (getprop("controls/autobrake/mode") == 3) {
toMemoLine1.msg = "T.O AUTO BRK MAX";
toMemoLine1.colour = "g";
} else {
@@ -1239,7 +1239,7 @@ var messages_config_memo = func {
toMemoLine1.colour = "c";
}
- if (getprop("/controls/switches/seatbelt-sign") and getprop("/controls/switches/no-smoking-sign")) {
+ if (getprop("controls/switches/seatbelt-sign") and getprop("controls/switches/no-smoking-sign")) {
toMemoLine2.msg = " SIGNS ON";
toMemoLine2.colour = "g";
} else {
@@ -1247,7 +1247,7 @@ var messages_config_memo = func {
toMemoLine2.colour = "c";
}
- if (getprop("/controls/flight/speedbrake-arm")) {
+ if (getprop("controls/flight/speedbrake-arm")) {
toMemoLine3.msg = " SPLRS ARM";
toMemoLine3.colour = "g";
} else {
@@ -1255,7 +1255,7 @@ var messages_config_memo = func {
toMemoLine3.colour = "c";
}
- if (getprop("/controls/flight/flap-pos") > 0 and getprop("/controls/flight/flap-pos") < 5) {
+ if (getprop("controls/flight/flap-pos") > 0 and getprop("controls/flight/flap-pos") < 5) {
toMemoLine4.msg = " FLAPS T.O";
toMemoLine4.colour = "g";
} else {
@@ -1263,7 +1263,7 @@ var messages_config_memo = func {
toMemoLine4.colour = "c";
}
- if (getprop("/ECAM/to-config-flipflop") and getprop("/ECAM/to-config-normal")) {
+ if (getprop("ECAM/to-config-flipflop") and getprop("ECAM/to-config-normal")) {
toMemoLine5.msg = " T.O CONFIG NORMAL";
toMemoLine5.colour = "g";
} else {
@@ -1271,19 +1271,19 @@ var messages_config_memo = func {
toMemoLine5.colour = "c";
}
- if (getprop("/ECAM/to-config-test") and (phaseVar == 2 or phaseVar == 9)) {
- setprop("/ECAM/to-memo-set", 1);
+ if (getprop("ECAM/to-config-test") and (phaseVar == 2 or phaseVar == 9)) {
+ setprop("ECAM/to-memo-set", 1);
} else {
- setprop("/ECAM/to-memo-set", 0);
+ setprop("ECAM/to-memo-set", 0);
}
if (phaseVar == 1 or phaseVar == 3 or phaseVar == 6 or phaseVar == 10) {
- setprop("/ECAM/to-memo-reset", 1);
+ setprop("ECAM/to-memo-reset", 1);
} else {
- setprop("/ECAM/to-memo-reset", 0);
+ setprop("ECAM/to-memo-reset", 0);
}
- if ((phaseVar == 2 and getprop("/ECAM/engine-start-time") != 0 and getprop("/ECAM/engine-start-time") + 120 < getprop("/sim/time/elapsed-sec")) or getprop("/ECAM/to-memo-flipflop")) {
+ if ((phaseVar == 2 and getprop("ECAM/engine-start-time") != 0 and getprop("ECAM/engine-start-time") + 120 < getprop("sim/time/elapsed-sec")) or getprop("ECAM/to-memo-flipflop")) {
toMemoLine1.active = 1;
toMemoLine2.active = 1;
toMemoLine3.active = 1;
@@ -1297,7 +1297,7 @@ var messages_config_memo = func {
ECAM_controller.warningReset(toMemoLine5);
}
- if (getprop("/fdm/jsbsim/gear/gear-pos-norm") == 1) {
+ if (getprop("fdm/jsbsim/gear/gear-pos-norm") == 1) {
ldgMemoLine1.msg = "LDG LDG GEAR DN";
ldgMemoLine1.colour = "g";
} else {
@@ -1305,7 +1305,7 @@ var messages_config_memo = func {
ldgMemoLine1.colour = "c";
}
- if (getprop("/controls/switches/seatbelt-sign") and getprop("/controls/switches/no-smoking-sign")) {
+ if (getprop("controls/switches/seatbelt-sign") and getprop("controls/switches/no-smoking-sign")) {
ldgMemoLine2.msg = " SIGNS ON";
ldgMemoLine2.colour = "g";
} else {
@@ -1313,7 +1313,7 @@ var messages_config_memo = func {
ldgMemoLine2.colour = "c";
}
- if (getprop("/controls/flight/speedbrake-arm")) {
+ if (getprop("controls/flight/speedbrake-arm")) {
ldgMemoLine3.msg = " SPLRS ARM";
ldgMemoLine3.colour = "g";
} else {
@@ -1321,8 +1321,8 @@ var messages_config_memo = func {
ldgMemoLine3.colour = "c";
}
- if (getprop("/it-fbw/law") == 1 or getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override")) {
- if (getprop("/controls/flight/flap-pos") == 4) {
+ if (getprop("it-fbw/law") == 1 or getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override")) {
+ if (getprop("controls/flight/flap-pos") == 4) {
ldgMemoLine4.msg = " FLAPS CONF 3";
ldgMemoLine4.colour = "g";
} else {
@@ -1330,7 +1330,7 @@ var messages_config_memo = func {
ldgMemoLine4.colour = "c";
}
} else {
- if (getprop("/controls/flight/flap-pos") == 5) {
+ if (getprop("controls/flight/flap-pos") == 5) {
ldgMemoLine4.msg = " FLAPS FULL";
ldgMemoLine4.colour = "g";
} else {
@@ -1341,30 +1341,30 @@ var messages_config_memo = func {
gear_agl_cur = pts.Position.gearAglFt.getValue();
if (gear_agl_cur < 2000) {
- setprop("/ECAM/ldg-memo-set", 1);
+ setprop("ECAM/ldg-memo-set", 1);
} else {
- setprop("/ECAM/ldg-memo-set", 0);
+ setprop("ECAM/ldg-memo-set", 0);
}
if (gear_agl_cur > 2200) {
- setprop("/ECAM/ldg-memo-reset", 1);
+ setprop("ECAM/ldg-memo-reset", 1);
} else {
- setprop("/ECAM/ldg-memo-reset", 0);
+ setprop("ECAM/ldg-memo-reset", 0);
}
if (gear_agl_cur > 2200) {
- setprop("/ECAM/ldg-memo-2200-set", 1);
+ setprop("ECAM/ldg-memo-2200-set", 1);
} else {
- setprop("/ECAM/ldg-memo-2200-set", 0);
+ setprop("ECAM/ldg-memo-2200-set", 0);
}
if (phaseVar != 6 and phaseVar != 7 and phaseVar != 8) {
- setprop("/ECAM/ldg-memo-2200-reset", 1);
+ setprop("ECAM/ldg-memo-2200-reset", 1);
} else {
- setprop("/ECAM/ldg-memo-2200-reset", 0);
+ setprop("ECAM/ldg-memo-2200-reset", 0);
}
- if ((phaseVar == 6 and getprop("/ECAM/ldg-memo-flipflop") and getprop("/ECAM/ldg-memo-2200-flipflop")) or phaseVar == 7 or phaseVar == 8) {
+ if ((phaseVar == 6 and getprop("ECAM/ldg-memo-flipflop") and getprop("ECAM/ldg-memo-2200-flipflop")) or phaseVar == 7 or phaseVar == 8) {
ldgMemoLine1.active = 1;
ldgMemoLine2.active = 1;
ldgMemoLine3.active = 1;
@@ -1379,7 +1379,7 @@ var messages_config_memo = func {
var messages_memo = func {
phaseVar = phaseNode.getValue();
- if (getprop("/services/fuel-truck/enable") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
+ if (getprop("services/fuel-truck/enable") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
refuelg.active = 1;
} else {
refuelg.active = 0;
@@ -1387,7 +1387,7 @@ var messages_memo = func {
if ((phaseVar == 1 or phaseVar == 2) and toMemoLine1.active != 1 and ldgMemoLine1.active != 1 and (systems.ADIRSnew.ADIRunits[0].inAlign == 1 or systems.ADIRSnew.ADIRunits[1].inAlign == 1 or systems.ADIRSnew.ADIRunits[2].inAlign == 1)) {
irs_in_align.active = 1;
- if (getprop("/ECAM/phases/timer/eng1or2-output")) {
+ if (getprop("ECAM/phases/timer/eng1or2-output")) {
irs_in_align.colour = "a";
} else {
irs_in_align.colour = "g";
@@ -1418,25 +1418,25 @@ var messages_memo = func {
}
}
- if (getprop("/controls/flight/speedbrake-arm") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
+ if (getprop("controls/flight/speedbrake-arm") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
gnd_splrs.active = 1;
} else {
gnd_splrs.active = 0;
}
- if (getprop("/controls/lighting/seatbelt-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
+ if (getprop("controls/lighting/seatbelt-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
seatbelts.active = 1;
} else {
seatbelts.active = 0;
}
- if (getprop("/controls/lighting/no-smoking-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed!
+ if (getprop("controls/lighting/no-smoking-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed!
nosmoke.active = 1;
} else {
nosmoke.active = 0;
}
- if (getprop("/controls/lighting/strobe") == 0 and getprop("/gear/gear[1]/wow") == 0 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # todo: use gear branch properties
+ if (getprop("controls/lighting/strobe") == 0 and getprop("gear/gear[1]/wow") == 0 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # todo: use gear branch properties
strobe_lt_off.active = 1;
} else {
strobe_lt_off.active = 0;
@@ -1448,7 +1448,7 @@ var messages_memo = func {
outr_tk_fuel_xfrd.active = 0;
}
- if (getprop("/consumables/fuel/total-fuel-lbs") < 6000 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # assuming US short ton 2000lb
+ if (getprop("consumables/fuel/total-fuel-lbs") < 6000 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # assuming US short ton 2000lb
fob_3T.active = 1;
} else {
fob_3T.active = 0;
@@ -1476,14 +1476,14 @@ var messages_right_memo = func {
ldg_inhibit.active = 0;
}
- if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/systems/electrical/some-electric-thingie/emer-elec-config") or getprop("/systems/fire/engine1/warning-active") == 1 or getprop("/systems/fire/engine2/warning-active") == 1 or getprop("/systems/fire/apu/warning-active") == 1 or getprop("/systems/failures/cargo-aft-fire") == 1 or getprop("/systems/failures/cargo-fwd-fire") == 1) or (((getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/engines/engine[0]/state") == 3) and (getprop("/systems/hydraulic/yellow-psi") < 1500 and getprop("/engines/engine[1]/state") == 3)) or ((getprop("/systems/hydraulic/green-psi") < 1500 or getprop("/systems/hydraulic/yellow-psi") < 1500) and getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") == 3) and phaseVar >= 3 and phaseVar <= 8)) {
+ if ((getprop("gear/gear[1]/wow") == 0) and (getprop("systems/electrical/some-electric-thingie/emer-elec-config") or getprop("systems/fire/engine1/warning-active") == 1 or getprop("systems/fire/engine2/warning-active") == 1 or getprop("systems/fire/apu/warning-active") == 1 or getprop("systems/failures/cargo-aft-fire") == 1 or getprop("systems/failures/cargo-fwd-fire") == 1) or (((getprop("systems/hydraulic/green-psi") < 1500 and getprop("engines/engine[0]/state") == 3) and (getprop("systems/hydraulic/yellow-psi") < 1500 and getprop("engines/engine[1]/state") == 3)) or ((getprop("systems/hydraulic/green-psi") < 1500 or getprop("systems/hydraulic/yellow-psi") < 1500) and getprop("engines/engine[0]/state") == 3 and getprop("engines/engine[1]/state") == 3) and phaseVar >= 3 and phaseVar <= 8)) {
# todo: emer elec
land_asap_r.active = 1;
} else {
land_asap_r.active = 0;
}
- if (land_asap_r.active == 0 and getprop("/gear/gear[1]/wow") == 0 and ((getprop("/fdm/jsbsim/propulsion/tank[0]/contents-lbs") < 1650 and getprop("/fdm/jsbsim/propulsion/tank[1]/contents-lbs") < 1650) or ((getprop("/systems/electrical/bus/dc-2") < 25 and (getprop("/systems/failures/elac1") == 1 or getprop("/systems/failures/sec1") == 1)) or (getprop("/systems/hydraulic/green-psi") < 1500 and (getprop("/systems/failures/elac1") == 1 and getprop("/systems/failures/sec1") == 1)) or (getprop("/systems/hydraulic/yellow-psi") < 1500 and (getprop("/systems/failures/elac1") == 1 and getprop("/systems/failures/sec1") == 1)) or (getprop("/systems/hydraulic/blue-psi") < 1500 and (getprop("/systems/failures/elac2") == 1 and getprop("/systems/failures/sec2") == 1))) or (phaseVar >= 3 and phaseVar <= 8 and (getprop("/engines/engine[0]/state") != 3 or getprop("/engines/engine[1]/state") != 3)))) {
+ if (land_asap_r.active == 0 and getprop("gear/gear[1]/wow") == 0 and ((getprop("fdm/jsbsim/propulsion/tank[0]/contents-lbs") < 1650 and getprop("fdm/jsbsim/propulsion/tank[1]/contents-lbs") < 1650) or ((getprop("systems/electrical/bus/dc-2") < 25 and (getprop("systems/failures/elac1") == 1 or getprop("systems/failures/sec1") == 1)) or (getprop("systems/hydraulic/green-psi") < 1500 and (getprop("systems/failures/elac1") == 1 and getprop("systems/failures/sec1") == 1)) or (getprop("systems/hydraulic/yellow-psi") < 1500 and (getprop("systems/failures/elac1") == 1 and getprop("systems/failures/sec1") == 1)) or (getprop("systems/hydraulic/blue-psi") < 1500 and (getprop("systems/failures/elac2") == 1 and getprop("systems/failures/sec2") == 1))) or (phaseVar >= 3 and phaseVar <= 8 and (getprop("engines/engine[0]/state") != 3 or getprop("engines/engine[1]/state") != 3)))) {
land_asap_a.active = 1;
} else {
land_asap_a.active = 0;
@@ -1507,13 +1507,13 @@ var messages_right_memo = func {
spd_brk.active = 0;
}
- if (getprop("/systems/thrust/state1") == "IDLE" and getprop("/systems/thrust/state2") == "IDLE" and phaseVar >= 6 and phaseVar <= 7) {
+ if (getprop("systems/thrust/state1") == "IDLE" and getprop("systems/thrust/state2") == "IDLE" and phaseVar >= 6 and phaseVar <= 7) {
spd_brk.colour = "g";
- } else if ((phaseVar >= 2 and phaseVar <= 5) or ((getprop("/systems/thrust/state1") != "IDLE" or getprop("/systems/thrust/state2") != "IDLE") and (phaseVar >= 6 and phaseVar <= 7))) {
+ } else if ((phaseVar >= 2 and phaseVar <= 5) or ((getprop("systems/thrust/state1") != "IDLE" or getprop("systems/thrust/state2") != "IDLE") and (phaseVar >= 6 and phaseVar <= 7))) {
spd_brk.colour = "a";
}
- if (getprop("/controls/gear/brake-parking") == 1 and phaseVar != 3) {
+ if (getprop("controls/gear/brake-parking") == 1 and phaseVar != 3) {
park_brk.active = 1;
} else {
park_brk.active = 0;
@@ -1524,19 +1524,19 @@ var messages_right_memo = func {
park_brk.colour = "g";
}
- if (getprop("/controls/gear/brake-fans") == 1) {
+ if (getprop("controls/gear/brake-fans") == 1) {
brk_fan.active = 1;
} else {
brk_fan.active = 0;
}
- if (getprop("/controls/hydraulic/ptu") == 1 and ((getprop("/systems/hydraulic/yellow-psi") < 1450 and getprop("/systems/hydraulic/green-psi") > 1450 and getprop("/controls/hydraulic/elec-pump-yellow") == 0) or (getprop("/systems/hydraulic/yellow-psi") > 1450 and getprop("/systems/hydraulic/green-psi") < 1450))) {
+ if (getprop("controls/hydraulic/ptu") == 1 and ((getprop("systems/hydraulic/yellow-psi") < 1450 and getprop("systems/hydraulic/green-psi") > 1450 and getprop("controls/hydraulic/elec-pump-yellow") == 0) or (getprop("systems/hydraulic/yellow-psi") > 1450 and getprop("systems/hydraulic/green-psi") < 1450))) {
ptu.active = 1;
} else {
ptu.active = 0;
}
- if (getprop("/systems/hydraulic/sources/rat/position") != 0) {
+ if (getprop("systems/hydraulic/sources/rat/position") != 0) {
rat.active = 1;
} else {
rat.active = 0;
@@ -1548,90 +1548,90 @@ var messages_right_memo = func {
rat.colour = "g";
}
- if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 1 and getprop("/systems/hydraulic/sources/rat/position") != 0 and getprop("/gear/gear[1]/wow") == 0) {
+ if (getprop("systems/electrical/relay/emer-glc/contact-pos") == 1 and getprop("systems/hydraulic/sources/rat/position") != 0 and getprop("gear/gear[1]/wow") == 0) {
emer_gen.active = 1;
} else {
emer_gen.active = 0;
}
- if (getprop("/sim/model/autopush/enabled") == 1) { # this message is only on when towing - not when disc with switch
+ if (getprop("sim/model/autopush/enabled") == 1) { # this message is only on when towing - not when disc with switch
nw_strg_disc.active = 1;
} else {
nw_strg_disc.active = 0;
}
- if (getprop("/engines/engine[0]/state") == 3 or getprop("/engines/engine[1]/state") == 3) {
+ if (getprop("engines/engine[0]/state") == 3 or getprop("engines/engine[1]/state") == 3) {
nw_strg_disc.colour = "a";
} else {
nw_strg_disc.colour = "g";
}
- if (getprop("/controls/pneumatic/switches/ram-air") == 1) {
+ if (getprop("controls/pneumatic/switches/ram-air") == 1) {
ram_air.active = 1;
} else {
ram_air.active = 0;
}
- if (getprop("/controls/engines/engine[0]/igniter-a") == 1 or getprop("/controls/engines/engine[0]/igniter-b") == 1 or getprop("/controls/engines/engine[1]/igniter-a") == 1 or getprop("/controls/engines/engine[1]/igniter-b") == 1) {
+ if (getprop("controls/engines/engine[0]/igniter-a") == 1 or getprop("controls/engines/engine[0]/igniter-b") == 1 or getprop("controls/engines/engine[1]/igniter-a") == 1 or getprop("controls/engines/engine[1]/igniter-b") == 1) {
ignition.active = 1;
} else {
ignition.active = 0;
}
- if (getprop("/controls/pneumatic/switches/bleedapu") == 1 and getprop("/systems/apu/rpm") >= 95) {
+ if (getprop("controls/pneumatic/switches/bleedapu") == 1 and getprop("systems/apu/rpm") >= 95) {
apu_bleed.active = 1;
} else {
apu_bleed.active = 0;
}
- if (apu_bleed.active == 0 and getprop("/systems/apu/rpm") >= 95) {
+ if (apu_bleed.active == 0 and getprop("systems/apu/rpm") >= 95) {
apu_avail.active = 1;
} else {
apu_avail.active = 0;
}
- if (getprop("/controls/lighting/landing-lights[1]") > 0 or getprop("/controls/lighting/landing-lights[2]") > 0) {
+ if (getprop("controls/lighting/landing-lights[1]") > 0 or getprop("controls/lighting/landing-lights[2]") > 0) {
ldg_lt.active = 1;
} else {
ldg_lt.active = 0;
}
- if (getprop("/controls/switches/leng") == 1 or getprop("/controls/switches/reng") == 1 or getprop("/systems/electrical/bus/dc-1") == 0 or getprop("/systems/electrical/bus/dc-2") == 0) {
+ if (getprop("controls/switches/leng") == 1 or getprop("controls/switches/reng") == 1 or getprop("systems/electrical/bus/dc-1") == 0 or getprop("systems/electrical/bus/dc-2") == 0) {
eng_aice.active = 1;
} else {
eng_aice.active = 0;
}
- if (getprop("/controls/switches/wing") == 1) {
+ if (getprop("controls/switches/wing") == 1) {
wing_aice.active = 1;
} else {
wing_aice.active = 0;
}
- if (getprop("/instrumentation/comm[2]/frequencies/selected-mhz") != 0 and (phaseVar == 1 or phaseVar == 2 or phaseVar == 6 or phaseVar == 9 or phaseVar == 10)) {
+ if (getprop("instrumentation/comm[2]/frequencies/selected-mhz") != 0 and (phaseVar == 1 or phaseVar == 2 or phaseVar == 6 or phaseVar == 9 or phaseVar == 10)) {
vhf3_voice.active = 1;
} else {
vhf3_voice.active = 0;
}
- if (getprop("/controls/autobrake/mode") == 1 and (phaseVar == 7 or phaseVar == 8)) {
+ if (getprop("controls/autobrake/mode") == 1 and (phaseVar == 7 or phaseVar == 8)) {
auto_brk_lo.active = 1;
} else {
auto_brk_lo.active = 0;
}
- if (getprop("/controls/autobrake/mode") == 2 and (phaseVar == 7 or phaseVar == 8)) {
+ if (getprop("controls/autobrake/mode") == 2 and (phaseVar == 7 or phaseVar == 8)) {
auto_brk_med.active = 1;
} else {
auto_brk_med.active = 0;
}
- if (getprop("/controls/autobrake/mode") == 3 and (phaseVar == 7 or phaseVar == 8)) {
+ if (getprop("controls/autobrake/mode") == 3 and (phaseVar == 7 or phaseVar == 8)) {
auto_brk_max.active = 1;
} else {
auto_brk_max.active = 0;
}
- if (getprop("/systems/fuel/valves/crossfeed-valve") != 0 and getprop("/controls/fuel/switches/crossfeed") == 1) {
+ if (getprop("systems/fuel/valves/crossfeed-valve") != 0 and getprop("controls/fuel/switches/crossfeed") == 1) {
fuelx.active = 1;
} else {
fuelx.active = 0;
@@ -1643,13 +1643,13 @@ var messages_right_memo = func {
fuelx.colour = "g";
}
- if (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1) { # todo: emer elec
+ if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1) { # todo: emer elec
gpws_flap3.active = 1;
} else {
gpws_flap3.active = 0;
}
- if (phaseVar >= 2 and phaseVar <= 9 and systems.ELEC.Bus.ac1.getValue() >= 110 and systems.ELEC.Bus.ac2.getValue() >= 110 and (getprop("/systems/fuel/feed-center-1") or getprop("/systems/fuel/feed-center-2"))) {
+ if (phaseVar >= 2 and phaseVar <= 9 and systems.ELEC.Bus.ac1.getValue() >= 110 and systems.ELEC.Bus.ac2.getValue() >= 110 and (getprop("systems/fuel/feed-center-1") or getprop("systems/fuel/feed-center-2"))) {
ctr_tk_feedg.active = 1;
} else {
ctr_tk_feedg.active = 0;
diff --git a/Nasal/ECAM/ECAM-main.nas b/Nasal/ECAM/ECAM-main.nas
index 5b286f65..4996b20c 100644
--- a/Nasal/ECAM/ECAM-main.nas
+++ b/Nasal/ECAM/ECAM-main.nas
@@ -42,7 +42,7 @@ var clrLight = 0;
var ECAM = {
_cachePage: "",
init: func() {
- setprop("/systems/gear/landing-gear-warning-light", 0);
+ setprop("systems/gear/landing-gear-warning-light", 0);
page = props.globals.initNode("/ECAM/Lower/page", "door", "STRING");
apuLight = props.globals.initNode("/ECAM/Lower/light/apu", 0, "BOOL");
bleedLight = props.globals.initNode("/ECAM/Lower/light/bleed", 0, "BOOL");
@@ -70,38 +70,38 @@ var ECAM = {
me.reset();
},
reset: func() {
- setprop("/ECAM/msg/line1", "");
- setprop("/ECAM/msg/line2", "");
- setprop("/ECAM/msg/line3", "");
- setprop("/ECAM/msg/line4", "");
- setprop("/ECAM/msg/line5", "");
- setprop("/ECAM/msg/line6", "");
- setprop("/ECAM/msg/line7", "");
- setprop("/ECAM/msg/line8", "");
- setprop("/ECAM/msg/linec1", "w");
- setprop("/ECAM/msg/linec2", "w");
- setprop("/ECAM/msg/linec3", "w");
- setprop("/ECAM/msg/linec4", "w");
- setprop("/ECAM/msg/linec5", "w");
- setprop("/ECAM/msg/linec6", "w");
- setprop("/ECAM/msg/linec7", "w");
- setprop("/ECAM/msg/linec8", "w");
- setprop("/ECAM/rightmsg/line1", "");
- setprop("/ECAM/rightmsg/line2", "");
- setprop("/ECAM/rightmsg/line3", "");
- setprop("/ECAM/rightmsg/line4", "");
- setprop("/ECAM/rightmsg/line5", "");
- setprop("/ECAM/rightmsg/line6", "");
- setprop("/ECAM/rightmsg/line7", "");
- setprop("/ECAM/rightmsg/line8", "");
- setprop("/ECAM/rightmsg/linec1", "w");
- setprop("/ECAM/rightmsg/linec2", "w");
- setprop("/ECAM/rightmsg/linec3", "w");
- setprop("/ECAM/rightmsg/linec4", "w");
- setprop("/ECAM/rightmsg/linec5", "w");
- setprop("/ECAM/rightmsg/linec6", "w");
- setprop("/ECAM/rightmsg/linec7", "w");
- setprop("/ECAM/rightmsg/linec8", "w");
+ setprop("ECAM/msg/line1", "");
+ setprop("ECAM/msg/line2", "");
+ setprop("ECAM/msg/line3", "");
+ setprop("ECAM/msg/line4", "");
+ setprop("ECAM/msg/line5", "");
+ setprop("ECAM/msg/line6", "");
+ setprop("ECAM/msg/line7", "");
+ setprop("ECAM/msg/line8", "");
+ setprop("ECAM/msg/linec1", "w");
+ setprop("ECAM/msg/linec2", "w");
+ setprop("ECAM/msg/linec3", "w");
+ setprop("ECAM/msg/linec4", "w");
+ setprop("ECAM/msg/linec5", "w");
+ setprop("ECAM/msg/linec6", "w");
+ setprop("ECAM/msg/linec7", "w");
+ setprop("ECAM/msg/linec8", "w");
+ setprop("ECAM/rightmsg/line1", "");
+ setprop("ECAM/rightmsg/line2", "");
+ setprop("ECAM/rightmsg/line3", "");
+ setprop("ECAM/rightmsg/line4", "");
+ setprop("ECAM/rightmsg/line5", "");
+ setprop("ECAM/rightmsg/line6", "");
+ setprop("ECAM/rightmsg/line7", "");
+ setprop("ECAM/rightmsg/line8", "");
+ setprop("ECAM/rightmsg/linec1", "w");
+ setprop("ECAM/rightmsg/linec2", "w");
+ setprop("ECAM/rightmsg/linec3", "w");
+ setprop("ECAM/rightmsg/linec4", "w");
+ setprop("ECAM/rightmsg/linec5", "w");
+ setprop("ECAM/rightmsg/linec6", "w");
+ setprop("ECAM/rightmsg/linec7", "w");
+ setprop("ECAM/rightmsg/linec8", "w");
page.setValue("door");
apuLight.setValue(0);
diff --git a/Nasal/ECAM/ECAM-phases.nas b/Nasal/ECAM/ECAM-phases.nas
index 2f240491..db81cf05 100644
--- a/Nasal/ECAM/ECAM-phases.nas
+++ b/Nasal/ECAM/ECAM-phases.nas
@@ -36,8 +36,8 @@ var FWC = {
phase5Output: props.globals.initNode("/ECAM/phases/monostable/phase-5-output"),
phase7Output: props.globals.initNode("/ECAM/phases/monostable/phase-7-output"),
phase9Output: props.globals.initNode("/ECAM/phases/monostable/phase-9-output"),
- toPowerOutput: props.globals.getNode("/ECAM/phases/monostable/to-power-set-output"),
- m80kt: props.globals.getNode("/ECAM/phases/monostable-80kt"),
+ toPowerOutput: props.globals.getNode("ECAM/phases/monostable/to-power-set-output"),
+ m80kt: props.globals.getNode("ECAM/phases/monostable-80kt"),
},
Flipflop: {
gearSet: props.globals.initNode("/ECAM/phases/flipflop/gear-set", 0, "BOOL"),
@@ -59,11 +59,11 @@ var FWC = {
eng1or2: props.globals.initNode("/ECAM/phases/timer/eng1or2", 0, "INT"),
toInhibit: props.globals.initNode("/ECAM/phases/timer/to-inhibit", 0, "INT"),
ldgInhibit: props.globals.initNode("/ECAM/phases/timer/ldg-inhibit", 0, "INT"),
- eng1idleOutput: props.globals.getNode("/ECAM/phases/timer/eng1idle-output"),
- eng2idleOutput: props.globals.getNode("/ECAM/phases/timer/eng2idle-output"),
+ eng1idleOutput: props.globals.getNode("ECAM/phases/timer/eng1idle-output"),
+ eng2idleOutput: props.globals.getNode("ECAM/phases/timer/eng2idle-output"),
eng1or2Output: props.globals.initNode("/ECAM/phases/timer/eng1or2-output", 0, "INT"),
- toInhibitOutput: props.globals.getNode("/ECAM/phases/timer/to-inhibit-output"),
- ldgInhibitOutput: props.globals.getNode("/ECAM/phases/timer/ldg-inhibit-output"),
+ toInhibitOutput: props.globals.getNode("ECAM/phases/timer/to-inhibit-output"),
+ ldgInhibitOutput: props.globals.getNode("ECAM/phases/timer/ldg-inhibit-output"),
},
speed80: props.globals.initNode("/ECAM/phases/speed-gt-80", 0, "BOOL"),
toPower: props.globals.initNode("/ECAM/phases/to-power-set", 0, "BOOL"),
@@ -131,15 +131,15 @@ var phaseLoop = func() {
}
if (eng == "IAE") {
- eprlim = getprop("/controls/engines/epr-limit");
- if ((!getprop("/controls/engines/engine[0]/reverser") and !getprop("/controls/engines/engine[1]/reverser")) and (((pts.Controls.Engines.Engine1.throttle.getValue() >= 0.8 or pts.Controls.Engines.Engine2.throttle.getValue() >= 0.8) and pts.PTSSystems.Thrust.flex.getBoolValue()) or (pts.Controls.Engines.Engine1.throttle.getValue() == 1.0 or pts.Controls.Engines.Engine2.throttle.getValue() == 1.0))) {
+ eprlim = getprop("controls/engines/epr-limit");
+ if ((!getprop("controls/engines/engine[0]/reverser") and !getprop("controls/engines/engine[1]/reverser")) and (((pts.Controls.Engines.Engine1.throttle.getValue() >= 0.8 or pts.Controls.Engines.Engine2.throttle.getValue() >= 0.8) and pts.PTSSystems.Thrust.flex.getBoolValue()) or (pts.Controls.Engines.Engine1.throttle.getValue() == 1.0 or pts.Controls.Engines.Engine2.throttle.getValue() == 1.0))) {
FWC.toPower.setBoolValue(1);
} else {
FWC.toPower.setBoolValue(0);
}
} else {
- n1lim = getprop("/controls/engines/n1-limit");
- if ((!getprop("/controls/engines/engine[0]/reverser") and !getprop("/controls/engines/engine[1]/reverser")) and (((pts.Controls.Engines.Engine1.throttle.getValue() >= 0.8 or pts.Controls.Engines.Engine2.throttle.getValue() >= 0.8) and pts.PTSSystems.Thrust.flex.getBoolValue()) or (pts.Controls.Engines.Engine1.throttle.getValue() == 1.0 or pts.Controls.Engines.Engine2.throttle.getValue() == 1.0))) {
+ n1lim = getprop("controls/engines/n1-limit");
+ if ((!getprop("controls/engines/engine[0]/reverser") and !getprop("controls/engines/engine[1]/reverser")) and (((pts.Controls.Engines.Engine1.throttle.getValue() >= 0.8 or pts.Controls.Engines.Engine2.throttle.getValue() >= 0.8) and pts.PTSSystems.Thrust.flex.getBoolValue()) or (pts.Controls.Engines.Engine1.throttle.getValue() == 1.0 or pts.Controls.Engines.Engine2.throttle.getValue() == 1.0))) {
FWC.toPower.setBoolValue(1);
} else {
FWC.toPower.setBoolValue(0);
diff --git a/Nasal/Effects/light-manager.nas b/Nasal/Effects/light-manager.nas
index 5d041169..035debdd 100644
--- a/Nasal/Effects/light-manager.nas
+++ b/Nasal/Effects/light-manager.nas
@@ -3,8 +3,8 @@
# Thanks to BAWV12 / Thorsten
-var als_on = props.globals.getNode("/sim/rendering/shaders/skydome");
-var alt_agl = props.globals.getNode("/position/gear-agl-ft");
+var als_on = props.globals.getNode("sim/rendering/shaders/skydome");
+var alt_agl = props.globals.getNode("position/gear-agl-ft");
var cur_alt = 0;
var light_manager = {
@@ -67,30 +67,30 @@ var light_manager = {
flcpt: 0,
prev_view : 1,
- nd_ref_light1_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m", 1),
- nd_ref_light1_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m", 1),
- nd_ref_light1_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m", 1),
- nd_ref_light1_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir", 1),
+ nd_ref_light1_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m", 1),
+ nd_ref_light1_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m", 1),
+ nd_ref_light1_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m", 1),
+ nd_ref_light1_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir", 1),
- nd_ref_light2_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[1]", 1),
- nd_ref_light2_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[1]", 1),
- nd_ref_light2_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[1]", 1),
- nd_ref_light2_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[1]", 1),
+ nd_ref_light2_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[1]", 1),
+ nd_ref_light2_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[1]", 1),
+ nd_ref_light2_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[1]", 1),
+ nd_ref_light2_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[1]", 1),
- nd_ref_light3_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[2]", 1),
- nd_ref_light3_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[2]", 1),
- nd_ref_light3_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[2]", 1),
- nd_ref_light3_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[2]", 1),
+ nd_ref_light3_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[2]", 1),
+ nd_ref_light3_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[2]", 1),
+ nd_ref_light3_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[2]", 1),
+ nd_ref_light3_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[2]", 1),
- nd_ref_light4_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[3]", 1),
- nd_ref_light4_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[3]", 1),
- nd_ref_light4_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[3]", 1),
- nd_ref_light4_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[3]", 1),
+ nd_ref_light4_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[3]", 1),
+ nd_ref_light4_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[3]", 1),
+ nd_ref_light4_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[3]", 1),
+ nd_ref_light4_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[3]", 1),
- nd_ref_light5_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[4]", 1),
- nd_ref_light5_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[4]", 1),
- nd_ref_light5_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[4]", 1),
- nd_ref_light5_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[4]", 1),
+ nd_ref_light5_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[4]", 1),
+ nd_ref_light5_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[4]", 1),
+ nd_ref_light5_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[4]", 1),
+ nd_ref_light5_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[4]", 1),
init: func {
# define your lights here
@@ -152,16 +152,16 @@ var light_manager = {
},
start: func {
- setprop("/sim/rendering/als-secondary-lights/num-lightspots", 5);
+ setprop("sim/rendering/als-secondary-lights/num-lightspots", 5);
- setprop("/sim/rendering/als-secondary-lights/lightspot/size", me.light1_size);
- setprop("/sim/rendering/als-secondary-lights/lightspot/size[1]", me.light2_size);
- setprop("/sim/rendering/als-secondary-lights/lightspot/size[2]", me.light3_size);
- setprop("/sim/rendering/als-secondary-lights/lightspot/size[3]", me.light4_size);
- setprop("/sim/rendering/als-secondary-lights/lightspot/size[4]", me.light5_size);
+ setprop("sim/rendering/als-secondary-lights/lightspot/size", me.light1_size);
+ setprop("sim/rendering/als-secondary-lights/lightspot/size[1]", me.light2_size);
+ setprop("sim/rendering/als-secondary-lights/lightspot/size[2]", me.light3_size);
+ setprop("sim/rendering/als-secondary-lights/lightspot/size[3]", me.light4_size);
+ setprop("sim/rendering/als-secondary-lights/lightspot/size[4]", me.light5_size);
- setprop("/sim/rendering/als-secondary-lights/lightspot/stretch", me.light1_stretch);
- setprop("/sim/rendering/als-secondary-lights/lightspot/stretch[1]", me.light2_stretch);
+ setprop("sim/rendering/als-secondary-lights/lightspot/stretch", me.light1_stretch);
+ setprop("sim/rendering/als-secondary-lights/lightspot/stretch[1]", me.light2_stretch);
me.run = 1;
me.update();
@@ -181,14 +181,14 @@ var light_manager = {
ll1 = getprop("controls/lighting/landing-lights[1]");
ll2 = getprop("controls/lighting/landing-lights[2]");
ll3 = getprop("sim/model/lights/nose-lights");
- nav = getprop("/sim/model/lights/nav-lights");
+ nav = getprop("sim/model/lights/nav-lights");
var apos = geo.aircraft_position();
var vpos = geo.viewer_position();
me.lon_to_m = math.cos(apos.lat()*math.pi/180.0) * me.lat_to_m;
- var heading = getprop("/orientation/heading-deg") * math.pi/180.0;
+ var heading = getprop("orientation/heading-deg") * math.pi/180.0;
var lat = apos.lat();
var lon = apos.lon();
@@ -197,15 +197,15 @@ var light_manager = {
var sh = math.sin(heading);
var ch = math.cos(heading);
- if ((ll1 == 1 and getprop("/systems/electrical/bus/ac-1") != 0) and (ll2 == 1 and getprop("/systems/electrical/bus/ac-2") !=0)) {
+ if ((ll1 == 1 and getprop("systems/electrical/bus/ac-1") != 0) and (ll2 == 1 and getprop("systems/electrical/bus/ac-2") !=0)) {
me.light1_ypos = 0.0;
me.light1_setSize(16);
me.light1_on();
- } else if (ll1 == 1 and getprop("/systems/electrical/bus/ac-1") != 0) {
+ } else if (ll1 == 1 and getprop("systems/electrical/bus/ac-1") != 0) {
me.light1_ypos = 3.0;
me.light1_setSize(12);
me.light1_on();
- } else if (ll2 == 1 and getprop("/systems/electrical/bus/ac-2") !=0) {
+ } else if (ll2 == 1 and getprop("systems/electrical/bus/ac-2") !=0) {
me.light1_ypos = -3.0;
me.light1_setSize(12);
me.light1_on();
@@ -320,89 +320,89 @@ var light_manager = {
light1_on : func {
if (me.light1_is_on == 1) {return;}
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r", me.light1_r);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g", me.light1_g);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b", me.light1_b);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r", me.light1_r);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g", me.light1_g);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b", me.light1_b);
me.light1_is_on = 1;
},
light1_off : func {
if (me.light1_is_on == 0) {return;}
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r", 0.0);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g", 0.0);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b", 0.0);
me.light1_is_on = 0;
},
light1_setSize : func(size) {
- setprop("/sim/rendering/als-secondary-lights/lightspot/size[0]", size);
+ setprop("sim/rendering/als-secondary-lights/lightspot/size[0]", size);
},
light2_on : func {
if (me.light2_is_on == 1) {return;}
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", me.light2_r);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", me.light2_g);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", me.light2_b);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", me.light2_r);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", me.light2_g);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", me.light2_b);
me.light2_is_on = 1;
},
light2_off : func {
if (me.light2_is_on == 0) {return;}
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", 0.0);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", 0.0);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", 0.0);
me.light2_is_on = 0;
},
light2_setSize : func(size) {
- setprop("/sim/rendering/als-secondary-lights/lightspot/size[1]", size);
+ setprop("sim/rendering/als-secondary-lights/lightspot/size[1]", size);
},
light3_on : func {
if (me.light3_is_on == 1) {return;}
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", me.light3_r);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", me.light3_g);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", me.light3_b);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", me.light3_r);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", me.light3_g);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", me.light3_b);
me.light3_is_on = 1;
},
light3_off : func {
if (me.light3_is_on == 0) {return;}
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", 0.0);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", 0.0);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", 0.0);
me.light3_is_on = 0;
},
light4_on : func {
if (me.light4_is_on == 1) {return;}
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", me.light4_r);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", me.light4_g);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", me.light4_b);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", me.light4_r);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", me.light4_g);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", me.light4_b);
me.light4_is_on = 1;
},
light4_off : func {
if (me.light4_is_on == 0) {return;}
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", 0.0);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", 0.0);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", 0.0);
me.light4_is_on = 0;
},
light5_on : func {
if (me.light5_is_on == 1) {return;}
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", me.light5_r);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", me.light5_g);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", me.light5_b);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", me.light5_r);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", me.light5_g);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", me.light5_b);
me.light5_is_on = 1;
},
light5_off : func {
if (me.light5_is_on == 0) {return;}
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", 0.0);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", 0.0);
- setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", 0.0);
+ setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", 0.0);
me.light5_is_on = 0;
},
};
\ No newline at end of file
diff --git a/Nasal/FBW/it-fbw.nas b/Nasal/FBW/it-fbw.nas
index b6f8f122..a6b20fb4 100644
--- a/Nasal/FBW/it-fbw.nas
+++ b/Nasal/FBW/it-fbw.nas
@@ -44,49 +44,49 @@ var battery2_sw = 0;
var law = 0;
var FBW = {
- degradeLaw: props.globals.getNode("/it-fbw/degrade-law"),
- activeLaw: props.globals.getNode("/it-fbw/law"),
- override: props.globals.getNode("/it-fbw/override"),
- rollBack: props.globals.getNode("/it-fbw/roll-back"),
- rollLim: props.globals.getNode("/it-fbw/roll-lim"),
+ degradeLaw: props.globals.getNode("it-fbw/degrade-law"),
+ activeLaw: props.globals.getNode("it-fbw/law"),
+ override: props.globals.getNode("it-fbw/override"),
+ rollBack: props.globals.getNode("it-fbw/roll-back"),
+ rollLim: props.globals.getNode("it-fbw/roll-lim"),
Computers: {
- elac1: props.globals.getNode("/systems/fctl/elac1"),
- elac2: props.globals.getNode("/systems/fctl/elac2"),
- sec1: props.globals.getNode("/systems/fctl/sec1"),
- sec2: props.globals.getNode("/systems/fctl/sec2"),
- sec3: props.globals.getNode("/systems/fctl/sec3"),
- fac1: props.globals.getNode("/systems/fctl/fac1"),
- fac2: props.globals.getNode("/systems/fctl/fac2"),
+ elac1: props.globals.getNode("systems/fctl/elac1"),
+ elac2: props.globals.getNode("systems/fctl/elac2"),
+ sec1: props.globals.getNode("systems/fctl/sec1"),
+ sec2: props.globals.getNode("systems/fctl/sec2"),
+ sec3: props.globals.getNode("systems/fctl/sec3"),
+ fac1: props.globals.getNode("systems/fctl/fac1"),
+ fac2: props.globals.getNode("systems/fctl/fac2"),
},
Failures: {
- elac1: props.globals.getNode("/systems/failures/fctl/elac1"),
- elac2: props.globals.getNode("/systems/failures/fctl/elac2"),
- sec1: props.globals.getNode("/systems/failures/fctl/sec1"),
- sec2: props.globals.getNode("/systems/failures/fctl/sec2"),
- sec3: props.globals.getNode("/systems/failures/fctl/sec3"),
- fac1: props.globals.getNode("/systems/failures/fctl/fac1"),
- fac2: props.globals.getNode("/systems/failures/fctl/fac2"),
+ elac1: props.globals.getNode("systems/failures/fctl/elac1"),
+ elac2: props.globals.getNode("systems/failures/fctl/elac2"),
+ sec1: props.globals.getNode("systems/failures/fctl/sec1"),
+ sec2: props.globals.getNode("systems/failures/fctl/sec2"),
+ sec3: props.globals.getNode("systems/failures/fctl/sec3"),
+ fac1: props.globals.getNode("systems/failures/fctl/fac1"),
+ fac2: props.globals.getNode("systems/failures/fctl/fac2"),
},
Lights: {
- elac1: props.globals.getNode("/controls/fctl/lights/elac1-fault"),
- elac2: props.globals.getNode("/controls/fctl/lights/elac2-fault"),
- sec1: props.globals.getNode("/controls/fctl/lights/sec1-fault"),
- sec2: props.globals.getNode("/controls/fctl/lights/sec2-fault"),
- sec2: props.globals.getNode("/controls/fctl/lights/sec3-fault"),
- fac1: props.globals.getNode("/controls/fctl/lights/fac1-fault"),
- fac2: props.globals.getNode("/controls/fctl/lights/fac2-fault"),
+ elac1: props.globals.getNode("controls/fctl/lights/elac1-fault"),
+ elac2: props.globals.getNode("controls/fctl/lights/elac2-fault"),
+ sec1: props.globals.getNode("controls/fctl/lights/sec1-fault"),
+ sec2: props.globals.getNode("controls/fctl/lights/sec2-fault"),
+ sec2: props.globals.getNode("controls/fctl/lights/sec3-fault"),
+ fac1: props.globals.getNode("controls/fctl/lights/fac1-fault"),
+ fac2: props.globals.getNode("controls/fctl/lights/fac2-fault"),
},
Protections: {
- overspeedRoll: props.globals.getNode("/it-fbw/protections/overspeed-roll-back"),
+ overspeedRoll: props.globals.getNode("it-fbw/protections/overspeed-roll-back"),
},
Switches: {
- elac1Sw: props.globals.getNode("/controls/fctl/switches/elac1"),
- elac2Sw: props.globals.getNode("/controls/fctl/switches/elac2"),
- sec1Sw: props.globals.getNode("/controls/fctl/switches/sec1"),
- sec2Sw: props.globals.getNode("/controls/fctl/switches/sec2"),
- sec3Sw: props.globals.getNode("/controls/fctl/switches/sec3"),
- fac1Sw: props.globals.getNode("/controls/fctl/switches/fac1"),
- fac2Sw: props.globals.getNode("/controls/fctl/switches/fac2"),
+ elac1Sw: props.globals.getNode("controls/fctl/switches/elac1"),
+ elac2Sw: props.globals.getNode("controls/fctl/switches/elac2"),
+ sec1Sw: props.globals.getNode("controls/fctl/switches/sec1"),
+ sec2Sw: props.globals.getNode("controls/fctl/switches/sec2"),
+ sec3Sw: props.globals.getNode("controls/fctl/switches/sec3"),
+ fac1Sw: props.globals.getNode("controls/fctl/switches/fac1"),
+ fac2Sw: props.globals.getNode("controls/fctl/switches/fac2"),
},
init: func() {
if (updatet.isRunning) {
@@ -180,92 +180,92 @@ var update_loop = func {
}
if (sec1_sw and !sec1_fail and dc_ess >= 25) {
- setprop("/systems/fctl/sec1", 1);
- setprop("/systems/failures/spoiler-l3", 0);
- setprop("/systems/failures/spoiler-r3", 0);
- setprop("/systems/failures/spoiler-l4", 0);
- setprop("/systems/failures/spoiler-r4", 0);
+ setprop("systems/fctl/sec1", 1);
+ setprop("systems/failures/spoiler-l3", 0);
+ setprop("systems/failures/spoiler-r3", 0);
+ setprop("systems/failures/spoiler-l4", 0);
+ setprop("systems/failures/spoiler-r4", 0);
} else {
- setprop("/systems/fctl/sec1", 0);
- setprop("/systems/failures/spoiler-l3", 1);
- setprop("/systems/failures/spoiler-r3", 1);
- setprop("/systems/failures/spoiler-l4", 1);
- setprop("/systems/failures/spoiler-r4", 1);
+ setprop("systems/fctl/sec1", 0);
+ setprop("systems/failures/spoiler-l3", 1);
+ setprop("systems/failures/spoiler-r3", 1);
+ setprop("systems/failures/spoiler-l4", 1);
+ setprop("systems/failures/spoiler-r4", 1);
}
if (sec2_sw and !sec2_fail and dc2 >= 25) {
- setprop("/systems/fctl/sec2", 1);
- setprop("/systems/failures/spoiler-l5", 0);
- setprop("/systems/failures/spoiler-r5", 0);
+ setprop("systems/fctl/sec2", 1);
+ setprop("systems/failures/spoiler-l5", 0);
+ setprop("systems/failures/spoiler-r5", 0);
} else {
- setprop("/systems/fctl/sec2", 0);
- setprop("/systems/failures/spoiler-l5", 1);
- setprop("/systems/failures/spoiler-r5", 1);
+ setprop("systems/fctl/sec2", 0);
+ setprop("systems/failures/spoiler-l5", 1);
+ setprop("systems/failures/spoiler-r5", 1);
}
if (sec3_sw and !sec3_fail and dc2 >= 25) {
- setprop("/systems/fctl/sec3", 1);
- setprop("/systems/failures/spoiler-l1", 0);
- setprop("/systems/failures/spoiler-r1", 0);
- setprop("/systems/failures/spoiler-l2", 0);
- setprop("/systems/failures/spoiler-r2", 0);
+ setprop("systems/fctl/sec3", 1);
+ setprop("systems/failures/spoiler-l1", 0);
+ setprop("systems/failures/spoiler-r1", 0);
+ setprop("systems/failures/spoiler-l2", 0);
+ setprop("systems/failures/spoiler-r2", 0);
} else {
- setprop("/systems/fctl/sec3", 0);
- setprop("/systems/failures/spoiler-l1", 1);
- setprop("/systems/failures/spoiler-r1", 1);
- setprop("/systems/failures/spoiler-l2", 1);
- setprop("/systems/failures/spoiler-r2", 1);
+ setprop("systems/fctl/sec3", 0);
+ setprop("systems/failures/spoiler-l1", 1);
+ setprop("systems/failures/spoiler-r1", 1);
+ setprop("systems/failures/spoiler-l2", 1);
+ setprop("systems/failures/spoiler-r2", 1);
}
if (fac1_sw and !fac1_fail and (ac_ess >= 110 or dc_ess_shed >= 25)) {
- setprop("/systems/fctl/fac1", 1);
- setprop("/systems/failures/rudder", 0);
- setprop("/systems/failures/fac1-fault", 0);
+ setprop("systems/fctl/fac1", 1);
+ setprop("systems/failures/rudder", 0);
+ setprop("systems/failures/fac1-fault", 0);
} else if (fac1_sw and (battery1_sw or battery2_sw) and (fac1_fail or ac_ess < 110 or dc_ess_shed < 25)) {
- setprop("/systems/failures/fac1-fault", 1);
- setprop("/systems/fctl/fac1", 0);
+ setprop("systems/failures/fac1-fault", 1);
+ setprop("systems/fctl/fac1", 0);
if (!fac2_sw or fac2_fail) {
- setprop("/systems/failures/rudder", 1);
+ setprop("systems/failures/rudder", 1);
}
} else {
- setprop("/systems/failures/fac1-fault", 0);
- setprop("/systems/fctl/fac1", 0);
+ setprop("systems/failures/fac1-fault", 0);
+ setprop("systems/fctl/fac1", 0);
if (!fac2_sw or fac2_fail) {
- setprop("/systems/failures/rudder", 1);
+ setprop("systems/failures/rudder", 1);
}
}
if (fac2_sw and !fac2_fail and (ac2 >= 110 or dc2 >= 25)) {
- setprop("/systems/fctl/fac2", 1);
- setprop("/systems/failures/fac2-fault", 0);
+ setprop("systems/fctl/fac2", 1);
+ setprop("systems/failures/fac2-fault", 0);
} else if (fac2_sw and (fac2_fail or ac2 < 110 or dc2 < 25)) {
- setprop("/systems/failures/fac2-fault", 1);
- setprop("/systems/fctl/fac2", 0);
+ setprop("systems/failures/fac2-fault", 1);
+ setprop("systems/fctl/fac2", 0);
if (!fac1_sw or fac1_fail) {
- setprop("/systems/failures/rudder", 1);
+ setprop("systems/failures/rudder", 1);
}
} else {
- setprop("/systems/fctl/fac2", 0);
- setprop("/systems/failures/fac2-fault", 0);
+ setprop("systems/fctl/fac2", 0);
+ setprop("systems/failures/fac2-fault", 0);
if (!fac1_sw or fac1_fail) {
- setprop("/systems/failures/rudder", 1);
+ setprop("systems/failures/rudder", 1);
}
}
- var elac1 = getprop("/systems/fctl/elac1");
- var elac2 = getprop("/systems/fctl/elac2");
- var sec1 = getprop("/systems/fctl/sec1");
- var sec2 = getprop("/systems/fctl/sec2");
- var sec3 = getprop("/systems/fctl/sec3");
- var fac1 = getprop("/systems/fctl/fac1");
- var fac2 = getprop("/systems/fctl/fac2");
+ var elac1 = getprop("systems/fctl/elac1");
+ var elac2 = getprop("systems/fctl/elac2");
+ var sec1 = getprop("systems/fctl/sec1");
+ var sec2 = getprop("systems/fctl/sec2");
+ var sec3 = getprop("systems/fctl/sec3");
+ var fac1 = getprop("systems/fctl/fac1");
+ var fac2 = getprop("systems/fctl/fac2");
law = FBW.activeLaw.getValue();
# Degrade logic, all failures which degrade FBW need to go here. -JD
blue = systems.HYD.Psi.blue.getValue();
green = systems.HYD.Psi.green.getValue();
yellow = systems.HYD.Psi.yellow.getValue();
- if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
+ if (getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0) {
if (!elac1 and !elac2) {
if (law == 0) {
FBW.degradeLaw.setValue(1);
@@ -273,7 +273,7 @@ var update_loop = func {
fcu.athrOff("hard");
}
}
- if (getprop("/systems/electrical/some-electric-thingie/emer-elec-config") == 1) {
+ if (getprop("systems/electrical/some-electric-thingie/emer-elec-config") == 1) {
if (law == 0) {
FBW.degradeLaw.setValue(1);
fcu.apOff("hard", 0);
@@ -294,7 +294,7 @@ var update_loop = func {
}
}
- if (getprop("/controls/gear/gear-down") == 1 and getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0) {
+ if (getprop("controls/gear/gear-down") == 1 and getprop("it-autoflight/output/ap1") == 0 and getprop("it-autoflight/output/ap2") == 0) {
if (law == 1) {
FBW.degradeLaw.setValue(2);
}
@@ -308,23 +308,23 @@ var update_loop = func {
FBW.degradeLaw.setValue(2);
}
- mmoIAS = (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") / getprop("/instrumentation/airspeed-indicator/indicated-mach")) * 0.82;
+ mmoIAS = (getprop("instrumentation/airspeed-indicator/indicated-speed-kt") / getprop("instrumentation/airspeed-indicator/indicated-mach")) * 0.82;
if (mmoIAS < 350) {
- setprop("/it-fbw/speeds/vmo-mmo", mmoIAS);
+ setprop("it-fbw/speeds/vmo-mmo", mmoIAS);
} else {
- setprop("/it-fbw/speeds/vmo-mmo", 350);
+ setprop("it-fbw/speeds/vmo-mmo", 350);
}
- if (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") > getprop("/it-fbw/speeds/vmo-mmo") + 6 and (law == 0 or law == 1)) {
- if (getprop("/it-autoflight/input/ap1") == 1 or getprop("/it-autoflight/input/ap2") == 1) {
+ if (getprop("instrumentation/airspeed-indicator/indicated-speed-kt") > getprop("it-fbw/speeds/vmo-mmo") + 6 and (law == 0 or law == 1)) {
+ if (getprop("it-autoflight/input/ap1") == 1 or getprop("it-autoflight/input/ap2") == 1) {
fcu.apOff("hard", 0);
}
- if (getprop("/it-fbw/protections/overspeed") != 1) {
- setprop("/it-fbw/protections/overspeed", 1);
+ if (getprop("it-fbw/protections/overspeed") != 1) {
+ setprop("it-fbw/protections/overspeed", 1);
}
} else {
- if (getprop("/it-fbw/protections/overspeed") != 0) {
- setprop("/it-fbw/protections/overspeed", 0);
+ if (getprop("it-fbw/protections/overspeed") != 0) {
+ setprop("it-fbw/protections/overspeed", 0);
}
}
}
@@ -361,7 +361,7 @@ var fbw_loop = func {
FBW.Protections.overspeedRoll.setValue(1);
}
- if (getprop("/it-fbw/override") == 0) {
+ if (getprop("it-fbw/override") == 0) {
var active = FBW.activeLaw.getValue();
var degrade = FBW.degradeLaw.getValue();
if (degrade == 0) {
@@ -384,7 +384,7 @@ var fbw_loop = func {
}
if (FBW.activeLaw.getValue() != 0) {
- if (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1) {
+ if (getprop("it-autoflight/output/ap1") == 1 or getprop("it-autoflight/output/ap2") == 1) {
fcu.apOff("hard", 0);
fcu.athrOff("hard");
}
diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas
index 8f3ec0fc..024d6b70 100644
--- a/Nasal/FMGC/FCU.nas
+++ b/Nasal/FMGC/FCU.nas
@@ -3,37 +3,37 @@
# Copyright (c) 2019 Joshua Davidson (Octal450), Jonathan Redpath (legoboyvdlp)
# Nodes
-var fd1 = props.globals.getNode("/it-autoflight/output/fd1", 1);
-var fd2 = props.globals.getNode("/it-autoflight/output/fd2", 1);
-var ap1 = props.globals.getNode("/it-autoflight/output/ap1", 1);
-var ap2 = props.globals.getNode("/it-autoflight/output/ap2", 1);
-var athr = props.globals.getNode("/it-autoflight/output/athr", 1);
-var fd1Input = props.globals.getNode("/it-autoflight/input/fd1", 1);
-var fd2Input = props.globals.getNode("/it-autoflight/input/fd2", 1);
-var ap1Input = props.globals.getNode("/it-autoflight/input/ap1", 1);
-var ap2Input = props.globals.getNode("/it-autoflight/input/ap2", 1);
-var athrInput = props.globals.getNode("/it-autoflight/input/athr", 1);
-var ktsMach = props.globals.getNode("/it-autoflight/input/kts-mach", 1);
-var iasSet = props.globals.getNode("/it-autoflight/input/spd-kts", 1);
-var machSet = props.globals.getNode("/it-autoflight/input/spd-mach", 1);
-var hdgSet = props.globals.getNode("/it-autoflight/input/hdg", 1);
-var altSet = props.globals.getNode("/it-autoflight/input/alt", 1);
-var altSetMode = props.globals.getNode("/it-autoflight/config/altitude-dial-mode", 1);
-var vsSet = props.globals.getNode("/it-autoflight/input/vs", 1);
-var fpaSet = props.globals.getNode("/it-autoflight/input/fpa", 1);
-var iasNow = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1);
-var machNow = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1);
-var spdManaged = props.globals.getNode("/it-autoflight/input/spd-managed", 1);
-var showHDG = props.globals.getNode("/it-autoflight/custom/show-hdg", 1);
-var trkFpaSW = props.globals.getNode("/it-autoflight/custom/trk-fpa", 1);
-var latMode = props.globals.getNode("/it-autoflight/output/lat", 1);
-var vertMode = props.globals.getNode("/it-autoflight/output/vert", 1);
-var fpaModeInput = props.globals.getNode("/it-autoflight/input/fpa", 1);
-var latModeInput = props.globals.getNode("/it-autoflight/input/lat", 1);
-var vertModeInput = props.globals.getNode("/it-autoflight/input/vert", 1);
-var vsModeInput = props.globals.getNode("/it-autoflight/input/vs", 1);
-var locArm = props.globals.getNode("/it-autoflight/output/loc-armed", 1);
-var apprArm = props.globals.getNode("/it-autoflight/output/appr-armed", 1);
+var fd1 = props.globals.getNode("it-autoflight/output/fd1", 1);
+var fd2 = props.globals.getNode("it-autoflight/output/fd2", 1);
+var ap1 = props.globals.getNode("it-autoflight/output/ap1", 1);
+var ap2 = props.globals.getNode("it-autoflight/output/ap2", 1);
+var athr = props.globals.getNode("it-autoflight/output/athr", 1);
+var fd1Input = props.globals.getNode("it-autoflight/input/fd1", 1);
+var fd2Input = props.globals.getNode("it-autoflight/input/fd2", 1);
+var ap1Input = props.globals.getNode("it-autoflight/input/ap1", 1);
+var ap2Input = props.globals.getNode("it-autoflight/input/ap2", 1);
+var athrInput = props.globals.getNode("it-autoflight/input/athr", 1);
+var ktsMach = props.globals.getNode("it-autoflight/input/kts-mach", 1);
+var iasSet = props.globals.getNode("it-autoflight/input/spd-kts", 1);
+var machSet = props.globals.getNode("it-autoflight/input/spd-mach", 1);
+var hdgSet = props.globals.getNode("it-autoflight/input/hdg", 1);
+var altSet = props.globals.getNode("it-autoflight/input/alt", 1);
+var altSetMode = props.globals.getNode("it-autoflight/config/altitude-dial-mode", 1);
+var vsSet = props.globals.getNode("it-autoflight/input/vs", 1);
+var fpaSet = props.globals.getNode("it-autoflight/input/fpa", 1);
+var iasNow = props.globals.getNode("instrumentation/airspeed-indicator/indicated-speed-kt", 1);
+var machNow = props.globals.getNode("instrumentation/airspeed-indicator/indicated-mach", 1);
+var spdManaged = props.globals.getNode("it-autoflight/input/spd-managed", 1);
+var showHDG = props.globals.getNode("it-autoflight/custom/show-hdg", 1);
+var trkFpaSW = props.globals.getNode("it-autoflight/custom/trk-fpa", 1);
+var latMode = props.globals.getNode("it-autoflight/output/lat", 1);
+var vertMode = props.globals.getNode("it-autoflight/output/vert", 1);
+var fpaModeInput = props.globals.getNode("it-autoflight/input/fpa", 1);
+var latModeInput = props.globals.getNode("it-autoflight/input/lat", 1);
+var vertModeInput = props.globals.getNode("it-autoflight/input/vert", 1);
+var vsModeInput = props.globals.getNode("it-autoflight/input/vs", 1);
+var locArm = props.globals.getNode("it-autoflight/output/loc-armed", 1);
+var apprArm = props.globals.getNode("it-autoflight/output/appr-armed", 1);
var FCUworkingNode = props.globals.initNode("/FMGC/FCU-working", 0, "BOOL");
var FCU = {
@@ -59,7 +59,7 @@ var FCU = {
var FCUController = {
FCU1: nil,
FCU2: nil,
- activeFMGC: props.globals.getNode("/FMGC/active-fmgc-channel"),
+ activeFMGC: props.globals.getNode("FMGC/active-fmgc-channel"),
FCUworking: 0,
_init: 0,
init: func() {
@@ -150,13 +150,13 @@ var FCUController = {
if (ap1.getBoolValue() or ap2.getBoolValue()) {
apOff("soft", 0);
} else {
- if (getprop("/it-autoflight/sound/apoffsound") == 1 or getprop("/it-autoflight/sound/apoffsound2") == 1) {
- setprop("/it-autoflight/sound/apoffsound", 0);
- setprop("/it-autoflight/sound/apoffsound2", 0);
+ if (getprop("it-autoflight/sound/apoffsound") == 1 or getprop("it-autoflight/sound/apoffsound2") == 1) {
+ setprop("it-autoflight/sound/apoffsound", 0);
+ setprop("it-autoflight/sound/apoffsound2", 0);
}
- if (getprop("/it-autoflight/output/ap-warning") != 0) {
- setprop("/it-autoflight/output/ap-warning", 0);
- setprop("/ECAM/warnings/master-warning-light", 0);
+ if (getprop("it-autoflight/output/ap-warning") != 0) {
+ setprop("it-autoflight/output/ap-warning", 0);
+ setprop("ECAM/warnings/master-warning-light", 0);
}
}
}
@@ -165,11 +165,11 @@ var FCUController = {
if (me.FCUworking) {
if (athr.getBoolValue()) {
athrOff("soft");
- setprop("/ECAM/warnings/master-caution-light", 1);
+ setprop("ECAM/warnings/master-caution-light", 1);
} else {
- if (getprop("/it-autoflight/output/athr-warning") == 1) {
- setprop("/it-autoflight/output/athr-warning", 0);
- setprop("/ECAM/warnings/master-caution-light", 0);
+ if (getprop("it-autoflight/output/athr-warning") == 1) {
+ setprop("it-autoflight/output/athr-warning", 0);
+ setprop("ECAM/warnings/master-caution-light", 0);
}
}
}
@@ -185,7 +185,7 @@ var FCUController = {
},
SPDPush: func() {
if (me.FCUworking) {
- if (getprop("/FMGC/internal/cruise-lvl-set") == 1 and getprop("/FMGC/internal/cost-index-set") == 1) {
+ if (getprop("FMGC/internal/cruise-lvl-set") == 1 and getprop("FMGC/internal/cost-index-set") == 1) {
spdManaged.setBoolValue(1);
fmgc.ManagedSPD.start();
}
@@ -334,7 +334,7 @@ var FCUController = {
},
ALTPush: func() {
if (me.FCUworking) {
- # setprop("/it-autoflight/input/vert", 8); # He don't work yet m8
+ # setprop("it-autoflight/input/vert", 8); # He don't work yet m8
}
},
ALTPull: func() {
@@ -506,7 +506,7 @@ var athrOff = func(type) {
var hdgInput = func {
if (latMode.getValue() != 0) {
showHDG.setBoolValue(1);
- var hdgnow = getprop("/it-autoflight/input/hdg");
- setprop("/modes/fcu/hdg-time", getprop("/sim/time/elapsed-sec"));
+ var hdgnow = getprop("it-autoflight/input/hdg");
+ setprop("modes/fcu/hdg-time", getprop("sim/time/elapsed-sec"));
}
}
\ No newline at end of file
diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas
index c7b41368..2c0f15db 100644
--- a/Nasal/FMGC/FMGC-b.nas
+++ b/Nasal/FMGC/FMGC-b.nas
@@ -5,53 +5,53 @@
# Initialize all used variables and property nodes
# Sim
var Velocity = {
- airspeedKt: props.globals.getNode("/velocities/airspeed-kt", 1), # Only used for gain scheduling
- groundspeedKt: props.globals.getNode("/velocities/groundspeed-kt", 1),
+ airspeedKt: props.globals.getNode("velocities/airspeed-kt", 1), # Only used for gain scheduling
+ groundspeedKt: props.globals.getNode("velocities/groundspeed-kt", 1),
groundspeedMps: 0,
- indicatedAirspeedKt: props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1),
- indicatedMach: props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1),
- trueAirspeedKt: props.globals.getNode("/instrumentation/airspeed-indicator/true-speed-kt", 1),
+ indicatedAirspeedKt: props.globals.getNode("instrumentation/airspeed-indicator/indicated-speed-kt", 1),
+ indicatedMach: props.globals.getNode("instrumentation/airspeed-indicator/indicated-mach", 1),
+ trueAirspeedKt: props.globals.getNode("instrumentation/airspeed-indicator/true-speed-kt", 1),
trueAirspeedKtTemp: 0,
};
var Position = {
gearAglFtTemp: 0,
- gearAglFt: props.globals.getNode("/position/gear-agl-ft", 1),
- indicatedAltitudeFt: props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1),
+ gearAglFt: props.globals.getNode("position/gear-agl-ft", 1),
+ indicatedAltitudeFt: props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft", 1),
indicatedAltitudeFtTemp: 0,
};
var Gear = {
- wow0: props.globals.getNode("/gear/gear[0]/wow", 1),
- wow1: props.globals.getNode("/gear/gear[1]/wow", 1),
+ wow0: props.globals.getNode("gear/gear[0]/wow", 1),
+ wow1: props.globals.getNode("gear/gear[1]/wow", 1),
wow1Temp: 1,
- wow2: props.globals.getNode("/gear/gear[2]/wow", 1),
+ wow2: props.globals.getNode("gear/gear[2]/wow", 1),
wow2Temp: 1,
};
var Control = {
- aileron: props.globals.getNode("/controls/flight/aileron", 1),
- elevator: props.globals.getNode("/controls/flight/elevator", 1),
- rudder: props.globals.getNode("/controls/flight/rudder", 1),
+ aileron: props.globals.getNode("controls/flight/aileron", 1),
+ elevator: props.globals.getNode("controls/flight/elevator", 1),
+ rudder: props.globals.getNode("controls/flight/rudder", 1),
};
var Radio = {
- gsDefl: [props.globals.getNode("/instrumentation/nav[0]/gs-needle-deflection-norm", 1), props.globals.getNode("/instrumentation/nav[1]/gs-needle-deflection-norm", 1)],
+ gsDefl: [props.globals.getNode("instrumentation/nav[0]/gs-needle-deflection-norm", 1), props.globals.getNode("instrumentation/nav[1]/gs-needle-deflection-norm", 1)],
gsDeflTemp: 0,
- inRange: [props.globals.getNode("/instrumentation/nav[0]/in-range", 1), props.globals.getNode("/instrumentation/nav[1]/in-range", 1)],
+ inRange: [props.globals.getNode("instrumentation/nav[0]/in-range", 1), props.globals.getNode("instrumentation/nav[1]/in-range", 1)],
inRangeTemp: 0,
- locDefl: [props.globals.getNode("/instrumentation/nav[0]/heading-needle-deflection-norm", 1), props.globals.getNode("/instrumentation/nav[1]/heading-needle-deflection-norm", 1)],
+ locDefl: [props.globals.getNode("instrumentation/nav[0]/heading-needle-deflection-norm", 1), props.globals.getNode("instrumentation/nav[1]/heading-needle-deflection-norm", 1)],
locDeflTemp: 0,
radioSel: 0,
- signalQuality: [props.globals.getNode("/instrumentation/nav[0]/signal-quality-norm", 1), props.globals.getNode("/instrumentation/nav[1]/signal-quality-norm", 1)],
+ signalQuality: [props.globals.getNode("instrumentation/nav[0]/signal-quality-norm", 1), props.globals.getNode("instrumentation/nav[1]/signal-quality-norm", 1)],
signalQualityTemp: 0,
};
var FPLN = {
- active: props.globals.getNode("/autopilot/route-manager/active", 1),
+ active: props.globals.getNode("autopilot/route-manager/active", 1),
activeTemp: 0,
currentCourse: 0,
- currentWP: props.globals.getNode("/autopilot/route-manager/current-wp", 1),
+ currentWP: props.globals.getNode("autopilot/route-manager/current-wp", 1),
currentWPTemp: 0,
deltaAngle: 0,
deltaAngleRad: 0,
@@ -59,22 +59,22 @@ var FPLN = {
maxBank: 0,
maxBankLimit: 0,
nextCourse: 0,
- num: props.globals.getNode("/autopilot/route-manager/route/num", 1),
+ num: props.globals.getNode("autopilot/route-manager/route/num", 1),
numTemp: 0,
R: 0,
radius: 0,
turnDist: 0,
- wp0Dist: props.globals.getNode("/autopilot/route-manager/wp/dist", 1),
+ wp0Dist: props.globals.getNode("autopilot/route-manager/wp/dist", 1),
wpFlyFrom: 0,
wpFlyTo: 0,
};
var Misc = {
- acEss: props.globals.getNode("/systems/electrical/bus/ac-ess", 1),
- elapsedSec: props.globals.getNode("/sim/time/elapsed-sec", 1),
- fbwLaw: props.globals.getNode("/it-fbw/law", 1),
- flapNorm: props.globals.getNode("/surface-positions/flap-pos-norm", 1),
- pfdHeadingScale: props.globals.getNode("/instrumentation/pfd/heading-scale", 1),
+ acEss: props.globals.getNode("systems/electrical/bus/ac-ess", 1),
+ elapsedSec: props.globals.getNode("sim/time/elapsed-sec", 1),
+ fbwLaw: props.globals.getNode("it-fbw/law", 1),
+ flapNorm: props.globals.getNode("surface-positions/flap-pos-norm", 1),
+ pfdHeadingScale: props.globals.getNode("instrumentation/pfd/heading-scale", 1),
};
# IT-AUTOFLIGHT
@@ -166,12 +166,12 @@ var Sound = {
# A3XX Custom
var Custom = {
apFdOn: 0,
- hdgTime: props.globals.getNode("/modes/fcu/hdg-time", 1),
- ndTrkSel: [props.globals.getNode("/instrumentation/efis[0]/trk-selected", 1), props.globals.getNode("/instrumentation/efis[1]/trk-selected", 1)],
+ hdgTime: props.globals.getNode("modes/fcu/hdg-time", 1),
+ ndTrkSel: [props.globals.getNode("instrumentation/efis[0]/trk-selected", 1), props.globals.getNode("instrumentation/efis[1]/trk-selected", 1)],
showHdg: props.globals.initNode("/it-autoflight/custom/show-hdg", 1, "BOOL"),
trkFpa: props.globals.initNode("/it-autoflight/custom/trk-fpa", 0, "BOOL"),
Input: {
- spdManaged: props.globals.getNode("/it-autoflight/input/spd-managed", 1),
+ spdManaged: props.globals.getNode("it-autoflight/input/spd-managed", 1),
},
Output: {
fmaPower: props.globals.initNode("/it-autoflight/output/fma-pwr", 0, "BOOL"),
@@ -180,7 +180,7 @@ var Custom = {
athrOff: props.globals.initNode("/it-autoflight/sound/athrsound", 0, "BOOL"),
enableAthrOff: 0,
},
- ThrLock: props.globals.getNode("/systems/thrust/thr-locked", 1)
+ ThrLock: props.globals.getNode("systems/thrust/thr-locked", 1)
};
var ITAF = {
@@ -358,9 +358,9 @@ var ITAF = {
# Preselect Heading
if (Output.latTemp != 0 and Output.latTemp != 9) { # Modes that always show HDG
if (Custom.hdgTime.getValue() + 45 >= Misc.elapsedSec.getValue()) {
- setprop("/it-autoflight/custom/show-hdg", 1);
+ setprop("it-autoflight/custom/show-hdg", 1);
} else {
- setprop("/it-autoflight/custom/show-hdg", 0);
+ setprop("it-autoflight/custom/show-hdg", 0);
}
}
@@ -404,12 +404,12 @@ var ITAF = {
if (FPLN.wpFlyFrom < 0) {
FPLN.wpFlyFrom = 0;
}
- FPLN.currentCourse = getprop("/autopilot/route-manager/route/wp[" ~ FPLN.wpFlyFrom ~ "]/leg-bearing-true-deg"); # Best left at getprop
+ FPLN.currentCourse = getprop("autopilot/route-manager/route/wp[" ~ FPLN.wpFlyFrom ~ "]/leg-bearing-true-deg"); # Best left at getprop
FPLN.wpFlyTo = FPLN.currentWPTemp + 1;
if (FPLN.wpFlyTo < 0) {
FPLN.wpFlyTo = 0;
}
- FPLN.nextCourse = getprop("/autopilot/route-manager/route/wp[" ~ FPLN.wpFlyTo ~ "]/leg-bearing-true-deg"); # Best left at getprop
+ FPLN.nextCourse = getprop("autopilot/route-manager/route/wp[" ~ FPLN.wpFlyTo ~ "]/leg-bearing-true-deg"); # Best left at getprop
FPLN.maxBankLimit = Internal.bankLimit.getValue();
FPLN.deltaAngle = math.abs(geo.normdeg180(FPLN.currentCourse - FPLN.nextCourse));
@@ -1008,11 +1008,11 @@ setlistener("/sim/signals/fdm-initialized", func {
# For Canvas Nav Display.
setlistener("/it-autoflight/input/hdg", func {
- setprop("/autopilot/settings/heading-bug-deg", getprop("/it-autoflight/input/hdg"));
+ setprop("autopilot/settings/heading-bug-deg", getprop("it-autoflight/input/hdg"));
});
setlistener("/it-autoflight/internal/alt", func {
- setprop("/autopilot/settings/target-altitude-ft", getprop("/it-autoflight/internal/alt"));
+ setprop("autopilot/settings/target-altitude-ft", getprop("it-autoflight/internal/alt"));
});
var loopTimer = maketimer(0.1, ITAF, ITAF.loop);
diff --git a/Nasal/FMGC/FMGC-c.nas b/Nasal/FMGC/FMGC-c.nas
index f8e435c3..c489e13c 100644
--- a/Nasal/FMGC/FMGC-c.nas
+++ b/Nasal/FMGC/FMGC-c.nas
@@ -3,37 +3,37 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
-setprop("/FMGC/internal/cruise-ft", 10000);
-setprop("/it-autoflight/internal/alt", 10000);
-setprop("/modes/pfd/fma/throttle-mode", " ");
-setprop("/modes/pfd/fma/pitch-mode", " ");
-setprop("/modes/pfd/fma/pitch-mode-armed", " ");
-setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
-setprop("/modes/pfd/fma/roll-mode", " ");
-setprop("/modes/pfd/fma/roll-mode-armed", " ");
-setprop("/modes/pfd/fma/ap-mode", " ");
-setprop("/modes/pfd/fma/fd-mode", " ");
-setprop("/modes/pfd/fma/at-mode", " ");
-setprop("/modes/pfd/fma/athr-armed", 0);
-setprop("/modes/pfd/fma/throttle-mode-box", 0);
-setprop("/modes/pfd/fma/pitch-mode-box", 0);
-setprop("/modes/pfd/fma/pitch-mode-armed-box", 0);
-setprop("/modes/pfd/fma/pitch-mode2-armed-box", 0);
-setprop("/modes/pfd/fma/roll-mode-box", 0);
-setprop("/modes/pfd/fma/roll-mode-armed-box", 0);
-setprop("/modes/pfd/fma/ap-mode-box", 0);
-setprop("/modes/pfd/fma/fd-mode-box", 0);
-setprop("/modes/pfd/fma/athr-mode-box", 0);
-setprop("/modes/pfd/fma/throttle-mode-time", 0);
-setprop("/modes/pfd/fma/pitch-mode-time", 0);
-setprop("/modes/pfd/fma/pitch-mode-armed-time", 0);
-setprop("/modes/pfd/fma/pitch-mode2-armed-time", 0);
-setprop("/modes/pfd/fma/roll-mode-time", 0);
-setprop("/modes/pfd/fma/roll-mode-armed-time", 0);
-setprop("/modes/pfd/fma/ap-mode-time", 0);
-setprop("/modes/pfd/fma/fd-mode-time", 0);
-setprop("/modes/pfd/fma/athr-mode-time", 0);
-setprop("/modes/fcu/hdg-time", -45);
+setprop("FMGC/internal/cruise-ft", 10000);
+setprop("it-autoflight/internal/alt", 10000);
+setprop("modes/pfd/fma/throttle-mode", " ");
+setprop("modes/pfd/fma/pitch-mode", " ");
+setprop("modes/pfd/fma/pitch-mode-armed", " ");
+setprop("modes/pfd/fma/pitch-mode2-armed", " ");
+setprop("modes/pfd/fma/roll-mode", " ");
+setprop("modes/pfd/fma/roll-mode-armed", " ");
+setprop("modes/pfd/fma/ap-mode", " ");
+setprop("modes/pfd/fma/fd-mode", " ");
+setprop("modes/pfd/fma/at-mode", " ");
+setprop("modes/pfd/fma/athr-armed", 0);
+setprop("modes/pfd/fma/throttle-mode-box", 0);
+setprop("modes/pfd/fma/pitch-mode-box", 0);
+setprop("modes/pfd/fma/pitch-mode-armed-box", 0);
+setprop("modes/pfd/fma/pitch-mode2-armed-box", 0);
+setprop("modes/pfd/fma/roll-mode-box", 0);
+setprop("modes/pfd/fma/roll-mode-armed-box", 0);
+setprop("modes/pfd/fma/ap-mode-box", 0);
+setprop("modes/pfd/fma/fd-mode-box", 0);
+setprop("modes/pfd/fma/athr-mode-box", 0);
+setprop("modes/pfd/fma/throttle-mode-time", 0);
+setprop("modes/pfd/fma/pitch-mode-time", 0);
+setprop("modes/pfd/fma/pitch-mode-armed-time", 0);
+setprop("modes/pfd/fma/pitch-mode2-armed-time", 0);
+setprop("modes/pfd/fma/roll-mode-time", 0);
+setprop("modes/pfd/fma/roll-mode-armed-time", 0);
+setprop("modes/pfd/fma/ap-mode-time", 0);
+setprop("modes/pfd/fma/fd-mode-time", 0);
+setprop("modes/pfd/fma/athr-mode-time", 0);
+setprop("modes/fcu/hdg-time", -45);
setlistener("sim/signals/fdm-initialized", func {
loopFMA.start();
@@ -41,51 +41,51 @@ setlistener("sim/signals/fdm-initialized", func {
# Master Thrust
var loopFMA = maketimer(0.05, func {
- var state1 = getprop("/systems/thrust/state1");
- var state2 = getprop("/systems/thrust/state2");
- var newthr = getprop("/modes/pfd/fma/throttle-mode");
- var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
- var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
+ var state1 = getprop("systems/thrust/state1");
+ var state2 = getprop("systems/thrust/state2");
+ var newthr = getprop("modes/pfd/fma/throttle-mode");
+ var thr1 = getprop("controls/engines/engine[0]/throttle-pos");
+ var thr2 = getprop("controls/engines/engine[1]/throttle-pos");
if (state1 == "TOGA" or state2 == "TOGA") {
if (newthr != " ") {
- setprop("/modes/pfd/fma/throttle-mode", " ");
+ setprop("modes/pfd/fma/throttle-mode", " ");
}
} else if ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) {
if (newthr != " ") {
- setprop("/modes/pfd/fma/throttle-mode", " ");
+ setprop("modes/pfd/fma/throttle-mode", " ");
}
- } else if ((state1 == "MCT" or state2 == "MCT") and getprop("/systems/thrust/eng-out") != 1) {
+ } else if ((state1 == "MCT" or state2 == "MCT") and getprop("systems/thrust/eng-out") != 1) {
if (newthr != " ") {
- setprop("/modes/pfd/fma/throttle-mode", " ");
+ setprop("modes/pfd/fma/throttle-mode", " ");
}
- } else if (((state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("/systems/thrust/eng-out") != 1) {
+ } else if (((state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("systems/thrust/eng-out") != 1) {
if (newthr != " ") {
- setprop("/modes/pfd/fma/throttle-mode", " ");
+ setprop("modes/pfd/fma/throttle-mode", " ");
}
} else {
- if ((getprop("/it-autoflight/output/vert") == 4) or (getprop("/it-autoflight/output/vert") == 6) or (getprop("/it-autoflight/output/vert") == 7) or (getprop("/it-autoflight/output/vert") == 8)) {
- if (getprop("/it-autoflight/output/fd1") == 0 and getprop("/it-autoflight/output/fd2") == 0 and getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0) {
+ if ((getprop("it-autoflight/output/vert") == 4) or (getprop("it-autoflight/output/vert") == 6) or (getprop("it-autoflight/output/vert") == 7) or (getprop("it-autoflight/output/vert") == 8)) {
+ if (getprop("it-autoflight/output/fd1") == 0 and getprop("it-autoflight/output/fd2") == 0 and getprop("it-autoflight/output/ap1") == 0 and getprop("it-autoflight/output/ap2") == 0) {
loopFMA_b();
} else {
- var thr = getprop("/it-autoflight/output/thr-mode");
+ var thr = getprop("it-autoflight/output/thr-mode");
if (thr == 0) {
loopFMA_b();
} else if (thr == 1) {
if (newthr != "THR IDLE") {
- setprop("/modes/pfd/fma/throttle-mode", "THR IDLE");
+ setprop("modes/pfd/fma/throttle-mode", "THR IDLE");
}
} else if (thr == 2) {
- if (state1 == "MCT" or state2 == "MCT" and getprop("/systems/thrust/eng-out") == 1) {
+ if (state1 == "MCT" or state2 == "MCT" and getprop("systems/thrust/eng-out") == 1) {
if (newthr != "THR MCT") {
- setprop("/modes/pfd/fma/throttle-mode", "THR MCT");
+ setprop("modes/pfd/fma/throttle-mode", "THR MCT");
}
} else if (state1 == "CL" or state2 == "CL") {
if (newthr != "THR CLB") {
- setprop("/modes/pfd/fma/throttle-mode", "THR CLB");
+ setprop("modes/pfd/fma/throttle-mode", "THR CLB");
}
} else {
if (newthr != "THR LVR") {
- setprop("/modes/pfd/fma/throttle-mode", "THR LVR");
+ setprop("modes/pfd/fma/throttle-mode", "THR LVR");
}
}
}
@@ -96,164 +96,164 @@ var loopFMA = maketimer(0.05, func {
}
# A/THR Armed/Active
- if (getprop("/it-autoflight/output/athr") == 1 and (state1 == "MAN THR" or state2 == "MAN THR" or state1 == "MCT" or state2 == "MCT" or state1 == "TOGA" or state2 == "TOGA") and getprop("/systems/thrust/eng-out") != 1) {
- if (getprop("/modes/pfd/fma/athr-armed") != 1) {
- setprop("/modes/pfd/fma/athr-armed", 1);
+ if (getprop("it-autoflight/output/athr") == 1 and (state1 == "MAN THR" or state2 == "MAN THR" or state1 == "MCT" or state2 == "MCT" or state1 == "TOGA" or state2 == "TOGA") and getprop("systems/thrust/eng-out") != 1) {
+ if (getprop("modes/pfd/fma/athr-armed") != 1) {
+ setprop("modes/pfd/fma/athr-armed", 1);
}
- } else if (getprop("/it-autoflight/output/athr") == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83) or (state1 == "MCT" and getprop("/controls/engines/thrust-limit") == "FLX") or
- (state2 == "MCT" and getprop("/controls/engines/thrust-limit") == "FLX") or state1 == "TOGA" or state2 == "TOGA") and getprop("/systems/thrust/eng-out") == 1) {
- if (getprop("/modes/pfd/fma/athr-armed") != 1) {
- setprop("/modes/pfd/fma/athr-armed", 1);
+ } else if (getprop("it-autoflight/output/athr") == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83) or (state1 == "MCT" and getprop("controls/engines/thrust-limit") == "FLX") or
+ (state2 == "MCT" and getprop("controls/engines/thrust-limit") == "FLX") or state1 == "TOGA" or state2 == "TOGA") and getprop("systems/thrust/eng-out") == 1) {
+ if (getprop("modes/pfd/fma/athr-armed") != 1) {
+ setprop("modes/pfd/fma/athr-armed", 1);
}
} else {
- if (getprop("/modes/pfd/fma/athr-armed") != 0) {
- setprop("/modes/pfd/fma/athr-armed", 0);
+ if (getprop("modes/pfd/fma/athr-armed") != 0) {
+ setprop("modes/pfd/fma/athr-armed", 0);
}
}
# SRS RWY Engagement
- var flx = getprop("/systems/thrust/lim-flex");
- var lat = getprop("/it-autoflight/mode/lat");
- var newlat = getprop("/modes/pfd/fma/roll-mode");
- var vert = getprop("/it-autoflight/mode/vert");
- var newvert = getprop("/modes/pfd/fma/pitch-mode");
- var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
- var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
- var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
- var wow = getprop("/gear/gear[0]/wow");
- var engstate1 = getprop("/engines/engine[0]/state");
- var engstate2 = getprop("/engines/engine[1]/state");
+ var flx = getprop("systems/thrust/lim-flex");
+ var lat = getprop("it-autoflight/mode/lat");
+ var newlat = getprop("modes/pfd/fma/roll-mode");
+ var vert = getprop("it-autoflight/mode/vert");
+ var newvert = getprop("modes/pfd/fma/pitch-mode");
+ var newvertarm = getprop("modes/pfd/fma/pitch-mode2-armed");
+ var thr1 = getprop("controls/engines/engine[0]/throttle-pos");
+ var thr2 = getprop("controls/engines/engine[1]/throttle-pos");
+ var wow = getprop("gear/gear[0]/wow");
+ var engstate1 = getprop("engines/engine[0]/state");
+ var engstate2 = getprop("engines/engine[1]/state");
if (((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)))) and (engstate1 == 3 or engstate2 == 3)) {
# RWY Engagement would go here, but automatic ILS selection is not simulated yet.
- if (wow and getprop("/FMGC/internal/v2-set") == 1 and getprop("/it-autoflight/output/vert") != 7) {
+ if (wow and getprop("FMGC/internal/v2-set") == 1 and getprop("it-autoflight/output/vert") != 7) {
ITAF.setVertMode(7);
- setprop("/it-autoflight/mode/vert", "T/O CLB");
+ setprop("it-autoflight/mode/vert", "T/O CLB");
}
} else {
- var gear1 = getprop("/gear/gear[1]/wow");
- var gear2 = getprop("/gear/gear[2]/wow");
- if (getprop("/it-autoflight/input/lat") == 5 and (gear1 or gear2)) {
+ var gear1 = getprop("gear/gear[1]/wow");
+ var gear2 = getprop("gear/gear[2]/wow");
+ if (getprop("it-autoflight/input/lat") == 5 and (gear1 or gear2)) {
ITAF.setLatMode(9);
}
- if (getprop("/it-autoflight/output/vert") == 7 and (gear1 or gear2)) {
+ if (getprop("it-autoflight/output/vert") == 7 and (gear1 or gear2)) {
ITAF.setVertMode(9);
}
}
- var trk = getprop("/it-autoflight/custom/trk-fpa");
+ var trk = getprop("it-autoflight/custom/trk-fpa");
if (lat == "HDG" and trk == 0) {
if (newlat != "HDG") {
- setprop("/modes/pfd/fma/roll-mode", "HDG");
+ setprop("modes/pfd/fma/roll-mode", "HDG");
}
} else if (lat == "HDG" and trk == 1) {
if (newlat != "TRACK") {
- setprop("/modes/pfd/fma/roll-mode", "TRACK");
+ setprop("modes/pfd/fma/roll-mode", "TRACK");
}
}
# Boxes
- var elapsedtime = getprop("/sim/time/elapsed-sec");
- if (getprop("/modes/pfd/fma/ap-mode-time") + 10 >= elapsedtime) {
- setprop("/modes/pfd/fma/ap-mode-box", 1);
+ var elapsedtime = getprop("sim/time/elapsed-sec");
+ if (getprop("modes/pfd/fma/ap-mode-time") + 10 >= elapsedtime) {
+ setprop("modes/pfd/fma/ap-mode-box", 1);
} else {
- setprop("/modes/pfd/fma/ap-mode-box", 0);
+ setprop("modes/pfd/fma/ap-mode-box", 0);
}
- if (getprop("/modes/pfd/fma/fd-mode-time") + 10 >= elapsedtime) {
- setprop("/modes/pfd/fma/fd-mode-box", 1);
+ if (getprop("modes/pfd/fma/fd-mode-time") + 10 >= elapsedtime) {
+ setprop("modes/pfd/fma/fd-mode-box", 1);
} else {
- setprop("/modes/pfd/fma/fd-mode-box", 0);
+ setprop("modes/pfd/fma/fd-mode-box", 0);
}
- if (getprop("/modes/pfd/fma/athr-mode-time") + 10 >= elapsedtime) {
- setprop("/modes/pfd/fma/athr-mode-box", 1);
+ if (getprop("modes/pfd/fma/athr-mode-time") + 10 >= elapsedtime) {
+ setprop("modes/pfd/fma/athr-mode-box", 1);
} else {
- setprop("/modes/pfd/fma/athr-mode-box", 0);
+ setprop("modes/pfd/fma/athr-mode-box", 0);
}
- if (getprop("/modes/pfd/fma/throttle-mode-time") + 10 >= elapsedtime) {
- setprop("/modes/pfd/fma/throttle-mode-box", 1);
+ if (getprop("modes/pfd/fma/throttle-mode-time") + 10 >= elapsedtime) {
+ setprop("modes/pfd/fma/throttle-mode-box", 1);
} else {
- setprop("/modes/pfd/fma/throttle-mode-box", 0);
+ setprop("modes/pfd/fma/throttle-mode-box", 0);
}
- if (getprop("/modes/pfd/fma/roll-mode-time") + 10 >= elapsedtime) {
- setprop("/modes/pfd/fma/roll-mode-box", 1);
+ if (getprop("modes/pfd/fma/roll-mode-time") + 10 >= elapsedtime) {
+ setprop("modes/pfd/fma/roll-mode-box", 1);
} else {
- setprop("/modes/pfd/fma/roll-mode-box", 0);
+ setprop("modes/pfd/fma/roll-mode-box", 0);
}
- if (getprop("/modes/pfd/fma/pitch-mode-time") + 10 >= elapsedtime) {
- setprop("/modes/pfd/fma/pitch-mode-box", 1);
+ if (getprop("modes/pfd/fma/pitch-mode-time") + 10 >= elapsedtime) {
+ setprop("modes/pfd/fma/pitch-mode-box", 1);
} else {
- setprop("/modes/pfd/fma/pitch-mode-box", 0);
+ setprop("modes/pfd/fma/pitch-mode-box", 0);
}
- if (getprop("/modes/pfd/fma/roll-mode-armed-time") + 10 >= elapsedtime) {
- setprop("/modes/pfd/fma/roll-mode-armed-box", 1);
+ if (getprop("modes/pfd/fma/roll-mode-armed-time") + 10 >= elapsedtime) {
+ setprop("modes/pfd/fma/roll-mode-armed-box", 1);
} else {
- setprop("/modes/pfd/fma/roll-mode-armed-box", 0);
+ setprop("modes/pfd/fma/roll-mode-armed-box", 0);
}
- if (getprop("/modes/pfd/fma/pitch-mode-armed-time") + 10 >= elapsedtime) {
- setprop("/modes/pfd/fma/pitch-mode-armed-box", 1);
+ if (getprop("modes/pfd/fma/pitch-mode-armed-time") + 10 >= elapsedtime) {
+ setprop("modes/pfd/fma/pitch-mode-armed-box", 1);
} else {
- setprop("/modes/pfd/fma/pitch-mode-armed-box", 0);
+ setprop("modes/pfd/fma/pitch-mode-armed-box", 0);
}
- if (getprop("/modes/pfd/fma/pitch-mode2-armed-time") + 10 >= elapsedtime) {
- setprop("/modes/pfd/fma/pitch-mode2-armed-box", 1);
+ if (getprop("modes/pfd/fma/pitch-mode2-armed-time") + 10 >= elapsedtime) {
+ setprop("modes/pfd/fma/pitch-mode2-armed-box", 1);
} else {
- setprop("/modes/pfd/fma/pitch-mode2-armed-box", 0);
+ setprop("modes/pfd/fma/pitch-mode2-armed-box", 0);
}
});
var loopFMA_b = func {
- var newthr = getprop("/modes/pfd/fma/throttle-mode");
- if (getprop("/it-autoflight/input/kts-mach") == 0) {
+ var newthr = getprop("modes/pfd/fma/throttle-mode");
+ if (getprop("it-autoflight/input/kts-mach") == 0) {
if (newthr != "SPEED") {
- setprop("/modes/pfd/fma/throttle-mode", "SPEED");
+ setprop("modes/pfd/fma/throttle-mode", "SPEED");
}
- } else if (getprop("/it-autoflight/input/kts-mach") == 1) {
+ } else if (getprop("it-autoflight/input/kts-mach") == 1) {
if (newthr != "MACH") {
- setprop("/modes/pfd/fma/throttle-mode", "MACH");
+ setprop("modes/pfd/fma/throttle-mode", "MACH");
}
}
}
# Master Lateral
setlistener("/it-autoflight/mode/lat", func {
- var lat = getprop("/it-autoflight/mode/lat");
- var newlat = getprop("/modes/pfd/fma/roll-mode");
+ var lat = getprop("it-autoflight/mode/lat");
+ var newlat = getprop("modes/pfd/fma/roll-mode");
if (lat == "LNAV") {
if (newlat != "NAV") {
- setprop("/modes/pfd/fma/roll-mode", "NAV");
+ setprop("modes/pfd/fma/roll-mode", "NAV");
}
} else if (lat == "LOC") {
if (newlat != "LOC*" and newlat != "LOC") {
- setprop("/modes/pfd/fma/roll-mode", "LOC*");
+ setprop("modes/pfd/fma/roll-mode", "LOC*");
locupdate.start();
}
} else if (lat == "ALGN") {
if (newlat != " ") {
- setprop("/modes/pfd/fma/roll-mode", " ");
+ setprop("modes/pfd/fma/roll-mode", " ");
}
} else if (lat == "RLOU") {
if (newlat != " ") {
- setprop("/modes/pfd/fma/roll-mode", " ");
+ setprop("modes/pfd/fma/roll-mode", " ");
}
} else if (lat == "T/O") {
if (newlat != "RWY") {
- setprop("/modes/pfd/fma/roll-mode", "RWY");
+ setprop("modes/pfd/fma/roll-mode", "RWY");
}
} else if (lat == " ") {
if (newlat != " ") {
- setprop("/modes/pfd/fma/roll-mode", " ");
+ setprop("modes/pfd/fma/roll-mode", " ");
}
}
});
var locupdate = maketimer(0.5, func {
- var lat = getprop("/it-autoflight/mode/lat");
- var newlat = getprop("/modes/pfd/fma/roll-mode");
- var nav_defl = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm");
+ var lat = getprop("it-autoflight/mode/lat");
+ var newlat = getprop("modes/pfd/fma/roll-mode");
+ var nav_defl = getprop("instrumentation/nav[0]/heading-needle-deflection-norm");
if (lat == "LOC") {
if (nav_defl > -0.06 and nav_defl < 0.06) {
locupdate.stop();
if (newlat != "LOC") {
- setprop("/modes/pfd/fma/roll-mode", "LOC");
+ setprop("modes/pfd/fma/roll-mode", "LOC");
}
}
}
@@ -261,82 +261,82 @@ var locupdate = maketimer(0.5, func {
# Master Vertical
setlistener("/it-autoflight/mode/vert", func {
- var vert = getprop("/it-autoflight/mode/vert");
- var newvert = getprop("/modes/pfd/fma/pitch-mode");
- var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
+ var vert = getprop("it-autoflight/mode/vert");
+ var newvert = getprop("modes/pfd/fma/pitch-mode");
+ var newvertarm = getprop("modes/pfd/fma/pitch-mode2-armed");
if (vert == "ALT HLD") {
altvert();
if (newvertarm != " ") {
- setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
+ setprop("modes/pfd/fma/pitch-mode2-armed", " ");
}
} else if (vert == "ALT CAP") {
altvert();
if (newvertarm != " ") {
- setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
+ setprop("modes/pfd/fma/pitch-mode2-armed", " ");
}
} else if (vert == "V/S") {
if (newvert != "V/S") {
- setprop("/modes/pfd/fma/pitch-mode", "V/S");
+ setprop("modes/pfd/fma/pitch-mode", "V/S");
}
if (newvertarm != "ALT") {
- setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
+ setprop("modes/pfd/fma/pitch-mode2-armed", "ALT");
}
} else if (vert == "G/S") {
if (newvert != "G/S*" and newvert != "G/S") {
- setprop("/modes/pfd/fma/pitch-mode", "G/S*");
+ setprop("modes/pfd/fma/pitch-mode", "G/S*");
gsupdate.start();
}
if (newvertarm != " ") {
- setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
+ setprop("modes/pfd/fma/pitch-mode2-armed", " ");
}
} else if (vert == "SPD CLB") {
if (newvert != "OP CLB") {
- setprop("/modes/pfd/fma/pitch-mode", "OP CLB");
+ setprop("modes/pfd/fma/pitch-mode", "OP CLB");
}
if (newvertarm != "ALT") {
- setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
+ setprop("modes/pfd/fma/pitch-mode2-armed", "ALT");
}
} else if (vert == "SPD DES") {
if (newvert != "OP DES") {
- setprop("/modes/pfd/fma/pitch-mode", "OP DES");
+ setprop("modes/pfd/fma/pitch-mode", "OP DES");
}
if (newvertarm != "ALT") {
- setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
+ setprop("modes/pfd/fma/pitch-mode2-armed", "ALT");
}
} else if (vert == "FPA") {
if (newvert != "FPA") {
- setprop("/modes/pfd/fma/pitch-mode", "FPA");
+ setprop("modes/pfd/fma/pitch-mode", "FPA");
}
if (newvertarm != "ALT") {
- setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
+ setprop("modes/pfd/fma/pitch-mode2-armed", "ALT");
}
} else if (vert == "LAND") {
if (newvert != "LAND") {
- setprop("/modes/pfd/fma/pitch-mode", "LAND");
+ setprop("modes/pfd/fma/pitch-mode", "LAND");
}
} else if (vert == "FLARE") {
if (newvert != "FLARE") {
- setprop("/modes/pfd/fma/pitch-mode", "FLARE");
+ setprop("modes/pfd/fma/pitch-mode", "FLARE");
}
} else if (vert == "ROLLOUT") {
if (newvert != "ROLL OUT") {
- setprop("/modes/pfd/fma/pitch-mode", "ROLL OUT");
+ setprop("modes/pfd/fma/pitch-mode", "ROLL OUT");
}
} else if (vert == "T/O CLB") {
if (newvert != "SRS") {
- setprop("/modes/pfd/fma/pitch-mode", "SRS");
+ setprop("modes/pfd/fma/pitch-mode", "SRS");
}
updatePitchArm2();
} else if (vert == "G/A CLB") {
if (newvert != "SRS") {
- setprop("/modes/pfd/fma/pitch-mode", "SRS");
+ setprop("modes/pfd/fma/pitch-mode", "SRS");
}
if (newvertarm != "ALT") {
- setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
+ setprop("modes/pfd/fma/pitch-mode2-armed", "ALT");
}
} else if (vert == " ") {
if (newvert != " ") {
- setprop("/modes/pfd/fma/pitch-mode", " ");
+ setprop("modes/pfd/fma/pitch-mode", " ");
}
updatePitchArm2();
}
@@ -348,52 +348,52 @@ setlistener("/FMGC/internal/v2-set", func {
});
var updatePitchArm2 = func {
- var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
- if (newvertarm != "CLB" and getprop("/FMGC/internal/v2-set") == 1) {
- setprop("/modes/pfd/fma/pitch-mode2-armed", "CLB");
- } else if (newvertarm != " " and getprop("/FMGC/internal/v2-set") != 1) {
- setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
+ var newvertarm = getprop("modes/pfd/fma/pitch-mode2-armed");
+ if (newvertarm != "CLB" and getprop("FMGC/internal/v2-set") == 1) {
+ setprop("modes/pfd/fma/pitch-mode2-armed", "CLB");
+ } else if (newvertarm != " " and getprop("FMGC/internal/v2-set") != 1) {
+ setprop("modes/pfd/fma/pitch-mode2-armed", " ");
}
}
var gsupdate = maketimer(0.5, func {
- var vert = getprop("/it-autoflight/mode/vert");
- var newvert = getprop("/modes/pfd/fma/pitch-mode");
- var gs_defl = getprop("/instrumentation/nav[0]/gs-needle-deflection-norm");
+ var vert = getprop("it-autoflight/mode/vert");
+ var newvert = getprop("modes/pfd/fma/pitch-mode");
+ var gs_defl = getprop("instrumentation/nav[0]/gs-needle-deflection-norm");
if (vert == "G/S") {
if (gs_defl > -0.06 and gs_defl < 0.06) {
gsupdate.stop();
if (newvert != "G/S") {
- setprop("/modes/pfd/fma/pitch-mode", "G/S");
+ setprop("modes/pfd/fma/pitch-mode", "G/S");
}
}
}
});
var altvert = func {
- var FMGCalt = getprop("/FMGC/internal/cruise-ft");
- var MCPalt = getprop("/it-autoflight/internal/alt");
+ var FMGCalt = getprop("FMGC/internal/cruise-ft");
+ var MCPalt = getprop("it-autoflight/internal/alt");
var ALTdif = abs(FMGCalt - MCPalt);
- var vert = getprop("/it-autoflight/mode/vert");
- var newvert = getprop("/modes/pfd/fma/pitch-mode");
+ var vert = getprop("it-autoflight/mode/vert");
+ var newvert = getprop("modes/pfd/fma/pitch-mode");
if (ALTdif <= 20) {
if (vert == "ALT HLD") {
if (newvert != "ALT CRZ") {
- setprop("/modes/pfd/fma/pitch-mode", "ALT CRZ");
+ setprop("modes/pfd/fma/pitch-mode", "ALT CRZ");
}
} else if (vert == "ALT CAP") {
if (newvert != "ALT CRZ*") {
- setprop("/modes/pfd/fma/pitch-mode", "ALT CRZ*");
+ setprop("modes/pfd/fma/pitch-mode", "ALT CRZ*");
}
}
} else {
if (vert == "ALT HLD") {
if (newvert != "ALT") {
- setprop("/modes/pfd/fma/pitch-mode", "ALT");
+ setprop("modes/pfd/fma/pitch-mode", "ALT");
}
} else if (vert == "ALT CAP") {
if (newvert != "ALT*") {
- setprop("/modes/pfd/fma/pitch-mode", "ALT*");
+ setprop("modes/pfd/fma/pitch-mode", "ALT*");
}
}
}
@@ -403,123 +403,123 @@ setlistener("/FMGC/internal/cruise-ft", altvert);
# Arm HDG or NAV
setlistener("/it-autoflight/mode/arm", func {
- var arm = getprop("/it-autoflight/mode/arm");
- var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
+ var arm = getprop("it-autoflight/mode/arm");
+ var newarm = getprop("modes/pfd/fma/roll-mode-armed");
if (arm == "HDG") {
if (newarm != "HDG") {
- setprop("/modes/pfd/fma/roll-mode-armed", " ");
+ setprop("modes/pfd/fma/roll-mode-armed", " ");
}
} else if (arm == "LNV") {
if (newarm != "NAV") {
- setprop("/modes/pfd/fma/roll-mode-armed", "NAV");
+ setprop("modes/pfd/fma/roll-mode-armed", "NAV");
}
} else if (arm == " ") {
if (newarm != " ") {
- setprop("/modes/pfd/fma/roll-mode-armed", " ");
+ setprop("modes/pfd/fma/roll-mode-armed", " ");
}
}
});
# Arm LOC
setlistener("/it-autoflight/output/loc-armed", func {
- var loca = getprop("/it-autoflight/output/loc-armed");
- var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
+ var loca = getprop("it-autoflight/output/loc-armed");
+ var newarm = getprop("modes/pfd/fma/roll-mode-armed");
if (loca) {
if (newarm != "LOC") {
- setprop("/modes/pfd/fma/roll-mode-armed", "LOC");
+ setprop("modes/pfd/fma/roll-mode-armed", "LOC");
}
} else {
if (newarm != " ") {
- setprop("/modes/pfd/fma/roll-mode-armed", " ");
+ setprop("modes/pfd/fma/roll-mode-armed", " ");
}
}
});
# Arm G/S
setlistener("/it-autoflight/output/appr-armed", func {
- var appa = getprop("/it-autoflight/output/appr-armed");
- var newvert2arm = getprop("/modes/pfd/fma/pitch-mode-armed");
+ var appa = getprop("it-autoflight/output/appr-armed");
+ var newvert2arm = getprop("modes/pfd/fma/pitch-mode-armed");
if (appa) {
if (newvert2arm != "G/S") {
- setprop("/modes/pfd/fma/pitch-mode-armed", "G/S");
+ setprop("modes/pfd/fma/pitch-mode-armed", "G/S");
}
} else {
if (newvert2arm != " ") {
- setprop("/modes/pfd/fma/pitch-mode-armed", " ");
+ setprop("modes/pfd/fma/pitch-mode-armed", " ");
}
}
});
# AP
var ap = func {
- var ap1 = getprop("/it-autoflight/output/ap1");
- var ap2 = getprop("/it-autoflight/output/ap2");
- var newap = getprop("/modes/pfd/fma/ap-mode");
+ var ap1 = getprop("it-autoflight/output/ap1");
+ var ap2 = getprop("it-autoflight/output/ap2");
+ var newap = getprop("modes/pfd/fma/ap-mode");
if (ap1 and ap2 and newap != "AP1+2") {
- setprop("/modes/pfd/fma/ap-mode", "AP 1+2");
+ setprop("modes/pfd/fma/ap-mode", "AP 1+2");
} else if (ap1 and !ap2 and newap != "AP 1") {
- setprop("/modes/pfd/fma/ap-mode", "AP 1");
+ setprop("modes/pfd/fma/ap-mode", "AP 1");
} else if (ap2 and !ap1 and newap != "AP 2") {
- setprop("/modes/pfd/fma/ap-mode", "AP 2");
+ setprop("modes/pfd/fma/ap-mode", "AP 2");
} else if (!ap1 and !ap2) {
- setprop("/modes/pfd/fma/ap-mode", " ");
+ setprop("modes/pfd/fma/ap-mode", " ");
}
}
# FD
var fd = func {
- var fd1 = getprop("/it-autoflight/output/fd1");
- var fd2 = getprop("/it-autoflight/output/fd2");
- var newfd = getprop("/modes/pfd/fma/fd-mode");
+ var fd1 = getprop("it-autoflight/output/fd1");
+ var fd2 = getprop("it-autoflight/output/fd2");
+ var newfd = getprop("modes/pfd/fma/fd-mode");
if (fd1 and fd2 and newfd != "1FD2") {
- setprop("/modes/pfd/fma/fd-mode", "1 FD 2");
+ setprop("modes/pfd/fma/fd-mode", "1 FD 2");
} else if (fd1 and !fd2 and newfd != "1 FD -") {
- setprop("/modes/pfd/fma/fd-mode", "1 FD -");
+ setprop("modes/pfd/fma/fd-mode", "1 FD -");
} else if (fd2 and !fd1 and newfd != "- FD 2") {
- setprop("/modes/pfd/fma/fd-mode", "- FD 2");
+ setprop("modes/pfd/fma/fd-mode", "- FD 2");
} else if (!fd1 and !fd2) {
- setprop("/modes/pfd/fma/fd-mode", " ");
+ setprop("modes/pfd/fma/fd-mode", " ");
}
}
# AT
var at = func {
- var at = getprop("/it-autoflight/output/athr");
- var newat = getprop("/modes/pfd/fma/at-mode");
+ var at = getprop("it-autoflight/output/athr");
+ var newat = getprop("modes/pfd/fma/at-mode");
if (at and newat != "A/THR") {
- setprop("/modes/pfd/fma/at-mode", "A/THR");
+ setprop("modes/pfd/fma/at-mode", "A/THR");
} else if (!at) {
- setprop("/modes/pfd/fma/at-mode", " ");
+ setprop("modes/pfd/fma/at-mode", " ");
}
}
var boxchk = func {
- if ((getprop("/it-autoflight/output/ap1") or getprop("/it-autoflight/output/ap2") or getprop("/it-autoflight/output/fd1") or getprop("/it-autoflight/output/fd2")) and getprop("/it-autoflight/output/fma-pwr") == 0) {
- setprop("/it-autoflight/input/lat", 3);
+ if ((getprop("it-autoflight/output/ap1") or getprop("it-autoflight/output/ap2") or getprop("it-autoflight/output/fd1") or getprop("it-autoflight/output/fd2")) and getprop("it-autoflight/output/fma-pwr") == 0) {
+ setprop("it-autoflight/input/lat", 3);
boxchk_b();
}
}
var boxchk_b = func {
- var newlat = getprop("/modes/pfd/fma/roll-mode");
+ var newlat = getprop("modes/pfd/fma/roll-mode");
if (newlat != " ") {
- setprop("/modes/pfd/fma/roll-mode-time", getprop("/sim/time/elapsed-sec"));
+ setprop("modes/pfd/fma/roll-mode-time", getprop("sim/time/elapsed-sec"));
}
- var newvert = getprop("/modes/pfd/fma/pitch-mode");
+ var newvert = getprop("modes/pfd/fma/pitch-mode");
if (newvert != " ") {
- setprop("/modes/pfd/fma/pitch-mode-time", getprop("/sim/time/elapsed-sec"));
+ setprop("modes/pfd/fma/pitch-mode-time", getprop("sim/time/elapsed-sec"));
}
- var newarmr = getprop("/modes/pfd/fma/roll-mode-armed");
+ var newarmr = getprop("modes/pfd/fma/roll-mode-armed");
if (newarmr != " ") {
- setprop("/modes/pfd/fma/roll-mode-armed-time", getprop("/sim/time/elapsed-sec"));
+ setprop("modes/pfd/fma/roll-mode-armed-time", getprop("sim/time/elapsed-sec"));
}
- var newarmp = getprop("/modes/pfd/fma/pitch-mode-armed");
+ var newarmp = getprop("modes/pfd/fma/pitch-mode-armed");
if (newarmp != " ") {
- setprop("/modes/pfd/fma/pitch-mode-armed-time", getprop("/sim/time/elapsed-sec"));
+ setprop("modes/pfd/fma/pitch-mode-armed-time", getprop("sim/time/elapsed-sec"));
}
- var newarmp2 = getprop("/modes/pfd/fma/pitch-mode2-armed");
+ var newarmp2 = getprop("modes/pfd/fma/pitch-mode2-armed");
if (newarmp2 != " ") {
- setprop("/modes/pfd/fma/pitch-mode2-armed-time", getprop("/sim/time/elapsed-sec"));
+ setprop("modes/pfd/fma/pitch-mode2-armed-time", getprop("sim/time/elapsed-sec"));
}
}
@@ -546,74 +546,74 @@ setlistener("/it-autoflight/output/athr", func {
# Boxes
setlistener("/modes/pfd/fma/ap-mode", func {
- if (getprop("/modes/pfd/fma/ap-mode") != " ") {
- setprop("/modes/pfd/fma/ap-mode-time", getprop("/sim/time/elapsed-sec"));
+ if (getprop("modes/pfd/fma/ap-mode") != " ") {
+ setprop("modes/pfd/fma/ap-mode-time", getprop("sim/time/elapsed-sec"));
}
});
setlistener("/modes/pfd/fma/fd-mode", func {
- if (getprop("/modes/pfd/fma/fd-mode") != " ") {
- setprop("/modes/pfd/fma/fd-mode-time", getprop("/sim/time/elapsed-sec"));
+ if (getprop("modes/pfd/fma/fd-mode") != " ") {
+ setprop("modes/pfd/fma/fd-mode-time", getprop("sim/time/elapsed-sec"));
}
});
setlistener("/modes/pfd/fma/at-mode", func {
- if (getprop("/modes/pfd/fma/at-mode") != " ") {
- setprop("/modes/pfd/fma/throttle-mode-time", getprop("/sim/time/elapsed-sec"));
- setprop("/modes/pfd/fma/athr-mode-time", getprop("/sim/time/elapsed-sec"));
+ if (getprop("modes/pfd/fma/at-mode") != " ") {
+ setprop("modes/pfd/fma/throttle-mode-time", getprop("sim/time/elapsed-sec"));
+ setprop("modes/pfd/fma/athr-mode-time", getprop("sim/time/elapsed-sec"));
}
});
setlistener("/modes/pfd/fma/athr-armed", func {
- if (getprop("/modes/pfd/fma/at-mode") != " ") {
- setprop("/modes/pfd/fma/athr-mode-time", getprop("/sim/time/elapsed-sec"));
+ if (getprop("modes/pfd/fma/at-mode") != " ") {
+ setprop("modes/pfd/fma/athr-mode-time", getprop("sim/time/elapsed-sec"));
}
});
setlistener("/modes/pfd/fma/throttle-mode", func {
- var state1 = getprop("/systems/thrust/state1");
- var state2 = getprop("/systems/thrust/state2");
- if (getprop("/it-autoflight/output/athr") == 1 and state1 != "MCT" and state2 != "MCT" and state1 != "MAN THR" and state2 != "MAN THR" and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and
- getprop("/systems/thrust/eng-out") != 1) {
- setprop("/modes/pfd/fma/throttle-mode-time", getprop("/sim/time/elapsed-sec"));
- } else if (getprop("/it-autoflight/output/athr") == 1 and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and getprop("/systems/thrust/eng-out") == 1) {
- if (getprop("/controls/engines/engine[0]/throttle-pos") < 0.83 and getprop("/controls/engines/engine[1]/throttle-pos") < 0.83) {
- setprop("/modes/pfd/fma/throttle-mode-time", getprop("/sim/time/elapsed-sec"));
+ var state1 = getprop("systems/thrust/state1");
+ var state2 = getprop("systems/thrust/state2");
+ if (getprop("it-autoflight/output/athr") == 1 and state1 != "MCT" and state2 != "MCT" and state1 != "MAN THR" and state2 != "MAN THR" and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and
+ getprop("systems/thrust/eng-out") != 1) {
+ setprop("modes/pfd/fma/throttle-mode-time", getprop("sim/time/elapsed-sec"));
+ } else if (getprop("it-autoflight/output/athr") == 1 and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and getprop("systems/thrust/eng-out") == 1) {
+ if (getprop("controls/engines/engine[0]/throttle-pos") < 0.83 and getprop("controls/engines/engine[1]/throttle-pos") < 0.83) {
+ setprop("modes/pfd/fma/throttle-mode-time", getprop("sim/time/elapsed-sec"));
}
}
});
setlistener("/modes/pfd/fma/roll-mode", func {
- var newlat = getprop("/modes/pfd/fma/roll-mode");
+ var newlat = getprop("modes/pfd/fma/roll-mode");
if (newlat != " ") {
- setprop("/modes/pfd/fma/roll-mode-time", getprop("/sim/time/elapsed-sec"));
+ setprop("modes/pfd/fma/roll-mode-time", getprop("sim/time/elapsed-sec"));
}
});
setlistener("/modes/pfd/fma/pitch-mode", func {
- var newvert = getprop("/modes/pfd/fma/pitch-mode");
+ var newvert = getprop("modes/pfd/fma/pitch-mode");
if (newvert != " ") {
- setprop("/modes/pfd/fma/pitch-mode-time", getprop("/sim/time/elapsed-sec"));
+ setprop("modes/pfd/fma/pitch-mode-time", getprop("sim/time/elapsed-sec"));
}
});
setlistener("/modes/pfd/fma/roll-mode-armed", func {
- var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
+ var newarm = getprop("modes/pfd/fma/roll-mode-armed");
if (newarm != " ") {
- setprop("/modes/pfd/fma/roll-mode-armed-time", getprop("/sim/time/elapsed-sec"));
+ setprop("modes/pfd/fma/roll-mode-armed-time", getprop("sim/time/elapsed-sec"));
}
});
setlistener("/modes/pfd/fma/pitch-mode-armed", func {
- var newarm = getprop("/modes/pfd/fma/pitch-mode-armed");
+ var newarm = getprop("modes/pfd/fma/pitch-mode-armed");
if (newarm != " ") {
- setprop("/modes/pfd/fma/pitch-mode-armed-time", getprop("/sim/time/elapsed-sec"));
+ setprop("modes/pfd/fma/pitch-mode-armed-time", getprop("sim/time/elapsed-sec"));
}
});
setlistener("/modes/pfd/fma/pitch-mode2-armed", func {
- var newarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
+ var newarm = getprop("modes/pfd/fma/pitch-mode2-armed");
if (newarm != " ") {
- setprop("/modes/pfd/fma/pitch-mode2-armed-time", getprop("/sim/time/elapsed-sec"));
+ setprop("modes/pfd/fma/pitch-mode2-armed-time", getprop("sim/time/elapsed-sec"));
}
});
diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas
index 92262827..acde97fe 100644
--- a/Nasal/FMGC/FMGC.nas
+++ b/Nasal/FMGC/FMGC.nas
@@ -95,38 +95,38 @@ var newvert = 0;
var newvertarm = 0;
var thr1 = 0;
var thr2 = 0;
-setprop("/FMGC/internal/maxspeed", 0);
-setprop("/FMGC/internal/minspeed", 0);
-setprop("/position/gear-agl-ft", 0);
-setprop("/FMGC/internal/mng-spd", 157);
-setprop("/FMGC/internal/mng-spd-cmd", 157);
-setprop("/FMGC/internal/mng-kts-mach", 0);
-setprop("/FMGC/internal/mach-switchover", 0);
-setprop("/it-autoflight/settings/reduc-agl-ft", 3000);
-setprop("/it-autoflight/internal/vert-speed-fpm", 0);
-setprop("/it-autoflight/output/fma-pwr", 0);
-setprop("/instrumentation/nav[0]/nav-id", "XXX");
-setprop("/instrumentation/nav[1]/nav-id", "XXX");
-setprop("/FMGC/internal/ils1-mcdu", "XXX/999.99");
-setprop("/FMGC/internal/ils2-mcdu", "XXX/999.99");
-setprop("/FMGC/internal/vor1-mcdu", "XXX/999.99");
-setprop("/FMGC/internal/vor2-mcdu", "999.99/XXX");
-setprop("/FMGC/internal/adf1-mcdu", "XXX/999.99");
-setprop("/FMGC/internal/adf2-mcdu", "999.99/XXX");
-setprop("/gear/gear[0]/wow-fmgc", 1);
+setprop("FMGC/internal/maxspeed", 0);
+setprop("FMGC/internal/minspeed", 0);
+setprop("position/gear-agl-ft", 0);
+setprop("FMGC/internal/mng-spd", 157);
+setprop("FMGC/internal/mng-spd-cmd", 157);
+setprop("FMGC/internal/mng-kts-mach", 0);
+setprop("FMGC/internal/mach-switchover", 0);
+setprop("it-autoflight/settings/reduc-agl-ft", 3000);
+setprop("it-autoflight/internal/vert-speed-fpm", 0);
+setprop("it-autoflight/output/fma-pwr", 0);
+setprop("instrumentation/nav[0]/nav-id", "XXX");
+setprop("instrumentation/nav[1]/nav-id", "XXX");
+setprop("FMGC/internal/ils1-mcdu", "XXX/999.99");
+setprop("FMGC/internal/ils2-mcdu", "XXX/999.99");
+setprop("FMGC/internal/vor1-mcdu", "XXX/999.99");
+setprop("FMGC/internal/vor2-mcdu", "999.99/XXX");
+setprop("FMGC/internal/adf1-mcdu", "XXX/999.99");
+setprop("FMGC/internal/adf2-mcdu", "999.99/XXX");
+setprop("gear/gear[0]/wow-fmgc", 1);
var FMGCinit = func {
- setprop("/FMGC/status/to-state", 0);
- setprop("/FMGC/status/phase", "0"); # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
- setprop("/FMGC/internal/maxspeed", 338);
- setprop("/FMGC/internal/mng-spd", 157);
- setprop("/FMGC/internal/mng-spd-cmd", 157);
- setprop("/FMGC/internal/mng-kts-mach", 0);
- setprop("/FMGC/internal/mach-switchover", 0);
- setprop("/it-autoflight/settings/reduc-agl-ft", 3000);
- setprop("/FMGC/internal/decel", 0);
- setprop("/FMGC/internal/loc-source", "NAV0");
- setprop("/FMGC/internal/optalt", 0);
+ setprop("FMGC/status/to-state", 0);
+ setprop("FMGC/status/phase", "0"); # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
+ setprop("FMGC/internal/maxspeed", 338);
+ setprop("FMGC/internal/mng-spd", 157);
+ setprop("FMGC/internal/mng-spd-cmd", 157);
+ setprop("FMGC/internal/mng-kts-mach", 0);
+ setprop("FMGC/internal/mach-switchover", 0);
+ setprop("it-autoflight/settings/reduc-agl-ft", 3000);
+ setprop("FMGC/internal/decel", 0);
+ setprop("FMGC/internal/loc-source", "NAV0");
+ setprop("FMGC/internal/optalt", 0);
masterFMGC.start();
various.start();
various2.start();
@@ -141,9 +141,9 @@ setlistener("/gear/gear[0]/wow-fmgc", func {
});
var trimReset = func {
- gear0 = getprop("/gear/gear[0]/wow");
- flaps = getprop("/controls/flight/flap-pos");
- if (gear0 == 1 and getprop("/FMGC/status/to-state") == 0 and (flaps >= 5 or (flaps >= 4 and getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override") == 1))) {
+ gear0 = getprop("gear/gear[0]/wow");
+ flaps = getprop("controls/flight/flap-pos");
+ if (gear0 == 1 and getprop("FMGC/status/to-state") == 0 and (flaps >= 5 or (flaps >= 4 and getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap3-override") == 1))) {
interpolate("/controls/flight/elevator-trim", 0.0, 1.5);
}
}
@@ -153,17 +153,17 @@ var trimReset = func {
###############
var updateARPT = func {
- dep = getprop("/FMGC/internal/dep-arpt");
- arr = getprop("/FMGC/internal/arr-arpt");
- setprop("/autopilot/route-manager/departure/airport", dep);
- setprop("/autopilot/route-manager/destination/airport", arr);
- if (getprop("/autopilot/route-manager/active") != 1) {
+ dep = getprop("FMGC/internal/dep-arpt");
+ arr = getprop("FMGC/internal/arr-arpt");
+ setprop("autopilot/route-manager/departure/airport", dep);
+ setprop("autopilot/route-manager/destination/airport", arr);
+ if (getprop("autopilot/route-manager/active") != 1) {
fgcommand("activate-flightplan", props.Node.new({"activate": 1}));
}
}
setlistener("/FMGC/internal/cruise-ft", func {
- setprop("/autopilot/route-manager/cruise/altitude-ft", getprop("/FMGC/internal/cruise-ft"));
+ setprop("autopilot/route-manager/cruise/altitude-ft", getprop("FMGC/internal/cruise-ft"));
});
############################
@@ -171,181 +171,181 @@ setlistener("/FMGC/internal/cruise-ft", func {
############################
var masterFMGC = maketimer(0.2, func {
- n1_left = getprop("/engines/engine[0]/n1-actual");
- n1_right = getprop("/engines/engine[1]/n1-actual");
- flaps = getprop("/controls/flight/flap-pos");
- modelat = getprop("/modes/pfd/fma/roll-mode");
- mode = getprop("/modes/pfd/fma/pitch-mode");
- modeI = getprop("/it-autoflight/mode/vert");
- gs = getprop("/velocities/groundspeed-kt");
- alt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
+ n1_left = getprop("engines/engine[0]/n1-actual");
+ n1_right = getprop("engines/engine[1]/n1-actual");
+ flaps = getprop("controls/flight/flap-pos");
+ modelat = getprop("modes/pfd/fma/roll-mode");
+ mode = getprop("modes/pfd/fma/pitch-mode");
+ modeI = getprop("it-autoflight/mode/vert");
+ gs = getprop("velocities/groundspeed-kt");
+ alt = getprop("instrumentation/altimeter/indicated-altitude-ft");
aglalt = pts.Position.gearAglFt.getValue();
- cruiseft = getprop("/FMGC/internal/cruise-ft");
- cruiseft_b = getprop("/FMGC/internal/cruise-ft") - 200;
- newcruise = getprop("/it-autoflight/internal/alt");
- phase = getprop("/FMGC/status/phase");
- state1 = getprop("/systems/thrust/state1");
- state2 = getprop("/systems/thrust/state2");
- wowl = getprop("/gear/gear[1]/wow");
- wowr = getprop("/gear/gear[2]/wow");
- targetalt = getprop("/it-autoflight/internal/alt");
- targetvs = getprop("/it-autoflight/input/vs");
- targetfpa = getprop("/it-autoflight/input/fpa");
- reduc_agl_ft = getprop("/it-autoflight/settings/reduc-agl-ft");
- locarm = getprop("/it-autopilot/output/loc-armed");
- apprarm = getprop("/it-autopilot/output/appr-armed");
- gear0 = getprop("/gear/gear[0]/wow");
- ap1 = getprop("/it-autoflight/output/ap1");
- ap2 = getprop("/it-autoflight/output/ap2");
- flx = getprop("/systems/thrust/lim-flex");
- lat = getprop("/it-autoflight/mode/lat");
- newlat = getprop("/modes/pfd/fma/roll-mode");
- vert = getprop("/it-autoflight/mode/vert");
- newvert = getprop("/modes/pfd/fma/pitch-mode");
- newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
- thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
- thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
- gear0 = getprop("/gear/gear[0]/wow");
- state1 = getprop("/systems/thrust/state1");
- state2 = getprop("/systems/thrust/state2");
+ cruiseft = getprop("FMGC/internal/cruise-ft");
+ cruiseft_b = getprop("FMGC/internal/cruise-ft") - 200;
+ newcruise = getprop("it-autoflight/internal/alt");
+ phase = getprop("FMGC/status/phase");
+ state1 = getprop("systems/thrust/state1");
+ state2 = getprop("systems/thrust/state2");
+ wowl = getprop("gear/gear[1]/wow");
+ wowr = getprop("gear/gear[2]/wow");
+ targetalt = getprop("it-autoflight/internal/alt");
+ targetvs = getprop("it-autoflight/input/vs");
+ targetfpa = getprop("it-autoflight/input/fpa");
+ reduc_agl_ft = getprop("it-autoflight/settings/reduc-agl-ft");
+ locarm = getprop("it-autopilot/output/loc-armed");
+ apprarm = getprop("it-autopilot/output/appr-armed");
+ gear0 = getprop("gear/gear[0]/wow");
+ ap1 = getprop("it-autoflight/output/ap1");
+ ap2 = getprop("it-autoflight/output/ap2");
+ flx = getprop("systems/thrust/lim-flex");
+ lat = getprop("it-autoflight/mode/lat");
+ newlat = getprop("modes/pfd/fma/roll-mode");
+ vert = getprop("it-autoflight/mode/vert");
+ newvert = getprop("modes/pfd/fma/pitch-mode");
+ newvertarm = getprop("modes/pfd/fma/pitch-mode2-armed");
+ thr1 = getprop("controls/engines/engine[0]/throttle-pos");
+ thr2 = getprop("controls/engines/engine[1]/throttle-pos");
+ gear0 = getprop("gear/gear[0]/wow");
+ state1 = getprop("systems/thrust/state1");
+ state2 = getprop("systems/thrust/state2");
- if (getprop("/gear/gear[0]/wow") != getprop("/gear/gear[0]/wow-fmgc")) {
- setprop("/gear/gear[0]/wow-fmgc", getprop("/gear/gear[0]/wow"));
+ if (getprop("gear/gear[0]/wow") != getprop("gear/gear[0]/wow-fmgc")) {
+ setprop("gear/gear[0]/wow-fmgc", getprop("gear/gear[0]/wow"));
}
if ((n1_left < 70 or n1_right < 70) and gs < 90 and mode == " " and gear0 == 1 and phase == 1) {
- setprop("/FMGC/status/phase", "0");
- setprop("/systems/pressurization/mode", "GN");
+ setprop("FMGC/status/phase", "0");
+ setprop("systems/pressurization/mode", "GN");
}
if (gear0 == 1 and phase == 0 and ((n1_left >= 70 and n1_right >= 70) or gs >= 90) and (state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or
(state2 == "MAN THR" and thr2 >= 0.83)))) {
- setprop("/FMGC/status/phase", "1");
- setprop("/systems/pressurization/mode", "TO");
+ setprop("FMGC/status/phase", "1");
+ setprop("systems/pressurization/mode", "TO");
}
if (phase == 1 and mode != "SRS" and mode != " ") {
- setprop("/FMGC/status/phase", "2");
- setprop("/systems/pressurization/mode", "TO");
+ setprop("FMGC/status/phase", "2");
+ setprop("systems/pressurization/mode", "TO");
}
- if ((phase == 3 or phase == 4 or phase == 5 or phase == 6) and (mode == "OP CLB" or mode == "CLB" or (modeI == "V/S" and getprop("/it-autoflight/input/vs") >= 100) or (modeI == "FPA" and getprop("/it-autoflight/input/fpa") >= 0.1))) {
- setprop("/FMGC/status/phase", "2");
- setprop("/systems/pressurization/mode", "TO");
+ if ((phase == 3 or phase == 4 or phase == 5 or phase == 6) and (mode == "OP CLB" or mode == "CLB" or (modeI == "V/S" and getprop("it-autoflight/input/vs") >= 100) or (modeI == "FPA" and getprop("it-autoflight/input/fpa") >= 0.1))) {
+ setprop("FMGC/status/phase", "2");
+ setprop("systems/pressurization/mode", "TO");
}
if ((phase == 2 or phase == 4 or phase == 5) and (mode == "ALT" or mode == "ALT CRZ" or mode == "ALT CST")) {
- setprop("/FMGC/status/phase", "3");
- setprop("/systems/pressurization/mode", "CR");
+ setprop("FMGC/status/phase", "3");
+ setprop("systems/pressurization/mode", "CR");
}
- if ((phase == 2 or phase == 3) and (mode == "OP DES" or mode == "DES" or (modeI == "V/S" and getprop("/it-autoflight/input/vs") <= -100) or (modeI == "FPA" and getprop("/it-autoflight/input/fpa") <= -0.1))) {
- setprop("/FMGC/status/phase", "4");
- setprop("/systems/pressurization/mode", "DE");
+ if ((phase == 2 or phase == 3) and (mode == "OP DES" or mode == "DES" or (modeI == "V/S" and getprop("it-autoflight/input/vs") <= -100) or (modeI == "FPA" and getprop("it-autoflight/input/fpa") <= -0.1))) {
+ setprop("FMGC/status/phase", "4");
+ setprop("systems/pressurization/mode", "DE");
}
- if (getprop("/FMGC/status/to-state") == 0 and flaps >= 3 and (phase == "4" or mode == "G/S" or mode == "LAND" or mode == "FLARE")) {
- setprop("/FMGC/status/phase", "5");
+ if (getprop("FMGC/status/to-state") == 0 and flaps >= 3 and (phase == "4" or mode == "G/S" or mode == "LAND" or mode == "FLARE")) {
+ setprop("FMGC/status/phase", "5");
}
- if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1 and getprop("/autopilot/route-manager/distance-remaining-nm") <= 15) {
- setprop("/FMGC/internal/decel", 1);
- } else if (getprop("/FMGC/internal/decel") == 1 and (phase == 0 or phase == 6)) {
- setprop("/FMGC/internal/decel", 0);
+ if (getprop("autopilot/route-manager/route/num") > 0 and getprop("autopilot/route-manager/active") == 1 and getprop("autopilot/route-manager/distance-remaining-nm") <= 15) {
+ setprop("FMGC/internal/decel", 1);
+ } else if (getprop("FMGC/internal/decel") == 1 and (phase == 0 or phase == 6)) {
+ setprop("FMGC/internal/decel", 0);
}
if (phase == "5" and state1 == "TOGA" and state2 == "TOGA") {
- setprop("/FMGC/status/phase", "6");
- setprop("/systems/pressurization/mode", "TO");
- setprop("/it-autoflight/input/toga", 1);
+ setprop("FMGC/status/phase", "6");
+ setprop("systems/pressurization/mode", "TO");
+ setprop("it-autoflight/input/toga", 1);
}
if (wowl and wowr and gs <= 40 and (phase == "2" or phase == "3" or phase == "4" or phase == "5" or phase == "6") and ap1 == 0 and ap2 == 0) {
reset_FMGC();
}
- if (getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") != 1024) {
- setprop("/FMGC/internal/maxspeed", getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") - 4);
+ if (getprop("systems/navigation/adr/computation/overspeed-vfe-spd") != 1024) {
+ setprop("FMGC/internal/maxspeed", getprop("systems/navigation/adr/computation/overspeed-vfe-spd") - 4);
} elsif (pts.Gear.position[0].getValue() != 0 or pts.Gear.position[1].getValue() != 0 or pts.Gear.position[2].getValue() != 0) {
- setprop("/FMGC/internal/maxspeed", 284);
+ setprop("FMGC/internal/maxspeed", 284);
} else {
- setprop("/FMGC/internal/maxspeed", getprop("/it-fbw/speeds/vmo-mmo"));
+ setprop("FMGC/internal/maxspeed", getprop("it-fbw/speeds/vmo-mmo"));
}
- flap = getprop("/controls/flight/flap-pos");
+ flap = getprop("controls/flight/flap-pos");
if (flap == 0) { # 0
- setprop("/FMGC/internal/minspeed", 202);
+ setprop("FMGC/internal/minspeed", 202);
} else if (flap == 1) { # 1
- setprop("/FMGC/internal/minspeed", 184);
+ setprop("FMGC/internal/minspeed", 184);
} else if (flap == 2) { # 1+F
- setprop("/FMGC/internal/minspeed", 171);
+ setprop("FMGC/internal/minspeed", 171);
} else if (flap == 3) { # 2
- setprop("/FMGC/internal/minspeed", 156);
+ setprop("FMGC/internal/minspeed", 156);
} else if (flap == 4) { # 3
- setprop("/FMGC/internal/minspeed", 147);
+ setprop("FMGC/internal/minspeed", 147);
} else if (flap == 5) { # FULL
- setprop("/FMGC/internal/minspeed", 131);
+ setprop("FMGC/internal/minspeed", 131);
}
if (gear0 == 1 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA") and flaps < 5) {
- setprop("/FMGC/status/to-state", 1);
+ setprop("FMGC/status/to-state", 1);
}
if (pts.Position.gearAglFt.getValue() >= 55) {
- setprop("/FMGC/status/to-state", 0);
+ setprop("FMGC/status/to-state", 0);
}
});
var reset_FMGC = func {
- setprop("/FMGC/status/phase", "7");
- fd1 = getprop("/it-autoflight/input/fd1");
- fd2 = getprop("/it-autoflight/input/fd2");
- spd = getprop("/it-autoflight/input/spd-kts");
- hdg = getprop("/it-autoflight/input/hdg");
- alt = getprop("/it-autoflight/input/alt");
+ setprop("FMGC/status/phase", "7");
+ fd1 = getprop("it-autoflight/input/fd1");
+ fd2 = getprop("it-autoflight/input/fd2");
+ spd = getprop("it-autoflight/input/spd-kts");
+ hdg = getprop("it-autoflight/input/hdg");
+ alt = getprop("it-autoflight/input/alt");
ITAF.init();
FMGCinit();
mcdu.MCDU_reset(0);
mcdu.MCDU_reset(1);
- setprop("/it-autoflight/input/fd1", fd1);
- setprop("/it-autoflight/input/fd2", fd2);
- setprop("/it-autoflight/input/spd-kts", spd);
- setprop("/it-autoflight/input/hdg", hdg);
- setprop("/it-autoflight/input/alt", alt);
- setprop("/systems/pressurization/mode", "GN");
- setprop("/systems/pressurization/vs", "0");
- setprop("/systems/pressurization/targetvs", "0");
- setprop("/systems/pressurization/vs-norm", "0");
- setprop("/systems/pressurization/auto", 1);
- setprop("/systems/pressurization/deltap", "0");
- setprop("/systems/pressurization/outflowpos", "0");
- setprop("/systems/pressurization/deltap-norm", "0");
- setprop("/systems/pressurization/outflowpos-norm", "0");
- altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- setprop("/systems/pressurization/cabinalt", altitude);
- setprop("/systems/pressurization/targetalt", altitude);
- setprop("/systems/pressurization/diff-to-target", "0");
- setprop("/systems/pressurization/ditchingpb", 0);
- setprop("/systems/pressurization/targetvs", "0");
- setprop("/systems/ventilation/cabin/fans", 0); # aircon fans
- setprop("/systems/ventilation/avionics/fan", 0);
- setprop("/systems/ventilation/avionics/extractvalve", "0");
- setprop("/systems/ventilation/avionics/inletvalve", "0");
- setprop("/systems/ventilation/lavatory/extractfan", 0);
- setprop("/systems/ventilation/lavatory/extractvalve", "0");
- setprop("/systems/pressurization/ambientpsi", "0");
- setprop("/systems/pressurization/cabinpsi", "0");
+ setprop("it-autoflight/input/fd1", fd1);
+ setprop("it-autoflight/input/fd2", fd2);
+ setprop("it-autoflight/input/spd-kts", spd);
+ setprop("it-autoflight/input/hdg", hdg);
+ setprop("it-autoflight/input/alt", alt);
+ setprop("systems/pressurization/mode", "GN");
+ setprop("systems/pressurization/vs", "0");
+ setprop("systems/pressurization/targetvs", "0");
+ setprop("systems/pressurization/vs-norm", "0");
+ setprop("systems/pressurization/auto", 1);
+ setprop("systems/pressurization/deltap", "0");
+ setprop("systems/pressurization/outflowpos", "0");
+ setprop("systems/pressurization/deltap-norm", "0");
+ setprop("systems/pressurization/outflowpos-norm", "0");
+ altitude = getprop("instrumentation/altimeter/indicated-altitude-ft");
+ setprop("systems/pressurization/cabinalt", altitude);
+ setprop("systems/pressurization/targetalt", altitude);
+ setprop("systems/pressurization/diff-to-target", "0");
+ setprop("systems/pressurization/ditchingpb", 0);
+ setprop("systems/pressurization/targetvs", "0");
+ setprop("systems/ventilation/cabin/fans", 0); # aircon fans
+ setprop("systems/ventilation/avionics/fan", 0);
+ setprop("systems/ventilation/avionics/extractvalve", "0");
+ setprop("systems/ventilation/avionics/inletvalve", "0");
+ setprop("systems/ventilation/lavatory/extractfan", 0);
+ setprop("systems/ventilation/lavatory/extractvalve", "0");
+ setprop("systems/pressurization/ambientpsi", "0");
+ setprop("systems/pressurization/cabinpsi", "0");
}
var various = maketimer(1, func {
- if (getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") != 3) {
- setprop("/it-autoflight/settings/reduc-agl-ft", getprop("/FMGC/internal/eng-out-reduc"));
- } else if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") == 3) {
- setprop("/it-autoflight/settings/reduc-agl-ft", getprop("/FMGC/internal/eng-out-reduc"));
+ if (getprop("engines/engine[0]/state") == 3 and getprop("engines/engine[1]/state") != 3) {
+ setprop("it-autoflight/settings/reduc-agl-ft", getprop("FMGC/internal/eng-out-reduc"));
+ } else if (getprop("engines/engine[0]/state") != 3 and getprop("engines/engine[1]/state") == 3) {
+ setprop("it-autoflight/settings/reduc-agl-ft", getprop("FMGC/internal/eng-out-reduc"));
} else {
- setprop("/it-autoflight/settings/reduc-agl-ft", getprop("/FMGC/internal/reduc-agl-ft"));
+ setprop("it-autoflight/settings/reduc-agl-ft", getprop("FMGC/internal/reduc-agl-ft"));
}
- setprop("/FMGC/internal/gw", math.round(getprop("/fdm/jsbsim/inertia/weight-lbs"), 100));
+ setprop("FMGC/internal/gw", math.round(getprop("fdm/jsbsim/inertia/weight-lbs"), 100));
});
var various2 = maketimer(0.5, func {
@@ -358,79 +358,79 @@ var various2 = maketimer(0.5, func {
});
var nav0 = func {
- var freqnav0uf = getprop("/instrumentation/nav[0]/frequencies/selected-mhz");
+ var freqnav0uf = getprop("instrumentation/nav[0]/frequencies/selected-mhz");
var freqnav0 = sprintf("%.2f", freqnav0uf);
- var namenav0 = getprop("/instrumentation/nav[0]/nav-id");
+ var namenav0 = getprop("instrumentation/nav[0]/nav-id");
if (freqnav0 >= 108.10 and freqnav0 <= 111.95) {
if (namenav0 != "") {
- setprop("/FMGC/internal/ils1-mcdu", namenav0 ~ "/" ~ freqnav0);
+ setprop("FMGC/internal/ils1-mcdu", namenav0 ~ "/" ~ freqnav0);
} else {
- setprop("/FMGC/internal/ils1-mcdu", freqnav0);
+ setprop("FMGC/internal/ils1-mcdu", freqnav0);
}
}
}
var nav1 = func {
- var freqnav1uf = getprop("/instrumentation/nav[1]/frequencies/selected-mhz");
+ var freqnav1uf = getprop("instrumentation/nav[1]/frequencies/selected-mhz");
var freqnav1 = sprintf("%.2f", freqnav1uf);
- var namenav1 = getprop("/instrumentation/nav[1]/nav-id");
+ var namenav1 = getprop("instrumentation/nav[1]/nav-id");
if (freqnav1 >= 108.10 and freqnav1 <= 111.95) {
if (namenav1 != "") {
- setprop("/FMGC/internal/ils2-mcdu", freqnav1 ~ "/" ~ namenav1);
+ setprop("FMGC/internal/ils2-mcdu", freqnav1 ~ "/" ~ namenav1);
} else {
- setprop("/FMGC/internal/ils2-mcdu", freqnav1);
+ setprop("FMGC/internal/ils2-mcdu", freqnav1);
}
}
}
var nav2 = func {
- var freqnav2uf = getprop("/instrumentation/nav[2]/frequencies/selected-mhz");
+ var freqnav2uf = getprop("instrumentation/nav[2]/frequencies/selected-mhz");
var freqnav2 = sprintf("%.2f", freqnav2uf);
- var namenav2 = getprop("/instrumentation/nav[2]/nav-id");
+ var namenav2 = getprop("instrumentation/nav[2]/nav-id");
if (freqnav2 >= 108.00 and freqnav2 <= 117.95) {
if (namenav2 != "") {
- setprop("/FMGC/internal/vor1-mcdu", namenav2 ~ "/" ~ freqnav2);
+ setprop("FMGC/internal/vor1-mcdu", namenav2 ~ "/" ~ freqnav2);
} else {
- setprop("/FMGC/internal/vor1-mcdu", freqnav2);
+ setprop("FMGC/internal/vor1-mcdu", freqnav2);
}
}
}
var nav3 = func {
- var freqnav3uf = getprop("/instrumentation/nav[3]/frequencies/selected-mhz");
+ var freqnav3uf = getprop("instrumentation/nav[3]/frequencies/selected-mhz");
var freqnav3 = sprintf("%.2f", freqnav3uf);
- var namenav3 = getprop("/instrumentation/nav[3]/nav-id");
+ var namenav3 = getprop("instrumentation/nav[3]/nav-id");
if (freqnav3 >= 108.00 and freqnav3 <= 117.95) {
if (namenav3 != "") {
- setprop("/FMGC/internal/vor2-mcdu", freqnav3 ~ "/" ~ namenav3);
+ setprop("FMGC/internal/vor2-mcdu", freqnav3 ~ "/" ~ namenav3);
} else {
- setprop("/FMGC/internal/vor2-mcdu", freqnav3);
+ setprop("FMGC/internal/vor2-mcdu", freqnav3);
}
}
}
var adf0 = func {
- var freqadf0uf = getprop("/instrumentation/adf[0]/frequencies/selected-khz");
+ var freqadf0uf = getprop("instrumentation/adf[0]/frequencies/selected-khz");
var freqadf0 = sprintf("%.2f", freqadf0uf);
- var nameadf0 = getprop("/instrumentation/adf[0]/ident");
+ var nameadf0 = getprop("instrumentation/adf[0]/ident");
if (freqadf0 >= 190 and freqadf0 <= 1750) {
if (nameadf0 != "") {
- setprop("/FMGC/internal/adf1-mcdu", nameadf0 ~ "/" ~ freqadf0);
+ setprop("FMGC/internal/adf1-mcdu", nameadf0 ~ "/" ~ freqadf0);
} else {
- setprop("/FMGC/internal/adf1-mcdu", freqadf0);
+ setprop("FMGC/internal/adf1-mcdu", freqadf0);
}
}
}
var adf1 = func {
- var freqadf1uf = getprop("/instrumentation/adf[1]/frequencies/selected-khz");
+ var freqadf1uf = getprop("instrumentation/adf[1]/frequencies/selected-khz");
var freqadf1 = sprintf("%.2f", freqadf1uf);
- var nameadf1 = getprop("/instrumentation/adf[1]/ident");
+ var nameadf1 = getprop("instrumentation/adf[1]/ident");
if (freqadf1 >= 190 and freqadf1 <= 1750) {
if (nameadf1 != "") {
- setprop("/FMGC/internal/adf2-mcdu", freqadf1 ~ "/" ~ nameadf1);
+ setprop("FMGC/internal/adf2-mcdu", freqadf1 ~ "/" ~ nameadf1);
} else {
- setprop("/FMGC/internal/adf2-mcdu", freqadf1);
+ setprop("FMGC/internal/adf2-mcdu", freqadf1);
}
}
}
@@ -440,124 +440,124 @@ var adf1 = func {
#################
var ManagedSPD = maketimer(0.25, func {
- if (getprop("/FMGC/internal/cruise-lvl-set") == 1 and getprop("/FMGC/internal/cost-index-set") == 1) {
- if (getprop("/it-autoflight/input/spd-managed") == 1) {
- altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- mode = getprop("/modes/pfd/fma/pitch-mode");
- ias = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
- mach = getprop("/instrumentation/airspeed-indicator/indicated-mach");
- ktsmach = getprop("/it-autoflight/input/kts-mach");
- mngktsmach = getprop("/FMGC/internal/mng-kts-mach");
- mng_spd = getprop("/FMGC/internal/mng-spd");
- mng_spd_cmd = getprop("/FMGC/internal/mng-spd-cmd");
- kts_sel = getprop("/it-autoflight/input/spd-kts");
- mach_sel = getprop("/it-autoflight/input/spd-mach");
- srsSPD = getprop("/it-autoflight/settings/togaspd");
- phase = getprop("/FMGC/status/phase"); # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
- flap = getprop("/controls/flight/flap-pos");
- maxspeed = getprop("/FMGC/internal/maxspeed");
- minspeed = getprop("/FMGC/internal/minspeed");
- mach_switchover = getprop("/FMGC/internal/mach-switchover");
- decel = getprop("/FMGC/internal/decel");
+ if (getprop("FMGC/internal/cruise-lvl-set") == 1 and getprop("FMGC/internal/cost-index-set") == 1) {
+ if (getprop("it-autoflight/input/spd-managed") == 1) {
+ altitude = getprop("instrumentation/altimeter/indicated-altitude-ft");
+ mode = getprop("modes/pfd/fma/pitch-mode");
+ ias = getprop("instrumentation/airspeed-indicator/indicated-speed-kt");
+ mach = getprop("instrumentation/airspeed-indicator/indicated-mach");
+ ktsmach = getprop("it-autoflight/input/kts-mach");
+ mngktsmach = getprop("FMGC/internal/mng-kts-mach");
+ mng_spd = getprop("FMGC/internal/mng-spd");
+ mng_spd_cmd = getprop("FMGC/internal/mng-spd-cmd");
+ kts_sel = getprop("it-autoflight/input/spd-kts");
+ mach_sel = getprop("it-autoflight/input/spd-mach");
+ srsSPD = getprop("it-autoflight/settings/togaspd");
+ phase = getprop("FMGC/status/phase"); # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
+ flap = getprop("controls/flight/flap-pos");
+ maxspeed = getprop("FMGC/internal/maxspeed");
+ minspeed = getprop("FMGC/internal/minspeed");
+ mach_switchover = getprop("FMGC/internal/mach-switchover");
+ decel = getprop("FMGC/internal/decel");
- mng_alt_spd_cmd = getprop("/FMGC/internal/mng-alt-spd");
+ mng_alt_spd_cmd = getprop("FMGC/internal/mng-alt-spd");
mng_alt_spd = math.round(mng_alt_spd_cmd, 1);
- mng_alt_mach_cmd = getprop("/FMGC/internal/mng-alt-mach");
+ mng_alt_mach_cmd = getprop("FMGC/internal/mng-alt-mach");
mng_alt_mach = math.round(mng_alt_mach_cmd, 0.001);
if (mach > mng_alt_mach and (phase == 2 or phase == 3)) {
- setprop("/FMGC/internal/mach-switchover", 1);
+ setprop("FMGC/internal/mach-switchover", 1);
}
if (ias > mng_alt_spd and (phase == 4 or phase == 5)) {
- setprop("/FMGC/internal/mach-switchover", 0);
+ setprop("FMGC/internal/mach-switchover", 0);
}
if ((mode == " " or mode == "SRS") and (phase == 0 or phase == 1)) {
if (mngktsmach) {
- setprop("/FMGC/internal/mng-kts-mach", 0);
+ setprop("FMGC/internal/mng-kts-mach", 0);
}
if (mng_spd_cmd != srsSPD) {
- setprop("/FMGC/internal/mng-spd-cmd", srsSPD);
+ setprop("FMGC/internal/mng-spd-cmd", srsSPD);
}
} else if ((phase == 2 or phase == 3) and altitude <= 10050) {
if (mngktsmach) {
- setprop("/FMGC/internal/mng-kts-mach", 0);
+ setprop("FMGC/internal/mng-kts-mach", 0);
}
if (mng_spd_cmd != 250 and !decel) {
- setprop("/FMGC/internal/mng-spd-cmd", 250);
+ setprop("FMGC/internal/mng-spd-cmd", 250);
} else if (mng_spd_cmd != minspeed and decel) {
- setprop("/FMGC/internal/mng-spd-cmd", minspeed);
+ setprop("FMGC/internal/mng-spd-cmd", minspeed);
}
} else if ((phase == 2 or phase == 3) and altitude > 10070 and !mach_switchover) {
if (mngktsmach) {
- setprop("/FMGC/internal/mng-kts-mach", 0);
+ setprop("FMGC/internal/mng-kts-mach", 0);
}
if (mng_spd_cmd != mng_alt_spd) {
- setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
+ setprop("FMGC/internal/mng-spd-cmd", mng_alt_spd);
}
} else if ((phase == 2 or phase == 3) and altitude > 10070 and mach_switchover) {
if (!mngktsmach) {
- setprop("/FMGC/internal/mng-kts-mach", 1);
+ setprop("FMGC/internal/mng-kts-mach", 1);
}
if (mng_spd_cmd != mng_alt_mach) {
- setprop("/FMGC/internal/mng-spd-cmd", mng_alt_mach);
+ setprop("FMGC/internal/mng-spd-cmd", mng_alt_mach);
}
} else if (phase == 4 and altitude > 11000 and !mach_switchover) {
if (mngktsmach) {
- setprop("/FMGC/internal/mng-kts-mach", 0);
+ setprop("FMGC/internal/mng-kts-mach", 0);
}
if (mng_spd_cmd != mng_alt_spd) {
- setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
+ setprop("FMGC/internal/mng-spd-cmd", mng_alt_spd);
}
} else if (phase == 4 and altitude > 11000 and mach_switchover) {
if (!mngktsmach) {
- setprop("/FMGC/internal/mng-kts-mach", 1);
+ setprop("FMGC/internal/mng-kts-mach", 1);
}
if (mng_spd_cmd != mng_alt_mach) {
- setprop("/FMGC/internal/mng-spd-cmd", mng_alt_mach);
+ setprop("FMGC/internal/mng-spd-cmd", mng_alt_mach);
}
} else if ((phase == 4 or phase == 5 or phase == 6) and altitude > 11000 and !mach_switchover) {
if (mngktsmach) {
- setprop("/FMGC/internal/mng-kts-mach", 0);
+ setprop("FMGC/internal/mng-kts-mach", 0);
}
if (mng_spd_cmd != mng_alt_spd and !decel) {
- setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
+ setprop("FMGC/internal/mng-spd-cmd", mng_alt_spd);
} else if (mng_spd_cmd != minspeed and decel) {
- setprop("/FMGC/internal/mng-spd-cmd", minspeed);
+ setprop("FMGC/internal/mng-spd-cmd", minspeed);
}
} else if ((phase == 4 or phase == 5 or phase == 6) and altitude <= 10980) {
if (mngktsmach) {
- setprop("/FMGC/internal/mng-kts-mach", 0);
+ setprop("FMGC/internal/mng-kts-mach", 0);
}
if (mng_spd_cmd != 250 and !decel) {
- setprop("/FMGC/internal/mng-spd-cmd", 250);
+ setprop("FMGC/internal/mng-spd-cmd", 250);
} else if (mng_spd_cmd != minspeed and decel) {
- setprop("/FMGC/internal/mng-spd-cmd", minspeed);
+ setprop("FMGC/internal/mng-spd-cmd", minspeed);
}
}
- mng_spd_cmd = getprop("/FMGC/internal/mng-spd-cmd");
+ mng_spd_cmd = getprop("FMGC/internal/mng-spd-cmd");
if (mng_spd_cmd > maxspeed -5) {
- setprop("/FMGC/internal/mng-spd", maxspeed -5);
+ setprop("FMGC/internal/mng-spd", maxspeed -5);
} else {
- setprop("/FMGC/internal/mng-spd", mng_spd_cmd);
+ setprop("FMGC/internal/mng-spd", mng_spd_cmd);
}
if (ktsmach and !mngktsmach) {
- setprop("/it-autoflight/input/kts-mach", 0);
+ setprop("it-autoflight/input/kts-mach", 0);
} else if (!ktsmach and mngktsmach) {
- setprop("/it-autoflight/input/kts-mach", 1);
+ setprop("it-autoflight/input/kts-mach", 1);
}
- mng_spd = getprop("/FMGC/internal/mng-spd");
+ mng_spd = getprop("FMGC/internal/mng-spd");
if (kts_sel != mng_spd and !ktsmach) {
- setprop("/it-autoflight/input/spd-kts", mng_spd);
+ setprop("it-autoflight/input/spd-kts", mng_spd);
} else if (mach_sel != mng_spd and ktsmach) {
- setprop("/it-autoflight/input/spd-mach", mng_spd);
+ setprop("it-autoflight/input/spd-mach", mng_spd);
}
} else {
ManagedSPD.stop();
@@ -569,12 +569,12 @@ var ManagedSPD = maketimer(0.25, func {
});
var switchDatabase = func {
- database1 = getprop("/FMGC/internal/navdatabase");
- database2 = getprop("/FMGC/internal/navdatabase2");
- code1 = getprop("/FMGC/internal/navdatabasecode");
- code2 = getprop("/FMGC/internal/navdatabasecode2");
- setprop("/FMGC/internal/navdatabase", database2);
- setprop("/FMGC/internal/navdatabase2", database1);
- setprop("/FMGC/internal/navdatabasecode", code2);
- setprop("/FMGC/internal/navdatabasecode2", code1);
+ database1 = getprop("FMGC/internal/navdatabase");
+ database2 = getprop("FMGC/internal/navdatabase2");
+ code1 = getprop("FMGC/internal/navdatabasecode");
+ code2 = getprop("FMGC/internal/navdatabasecode2");
+ setprop("FMGC/internal/navdatabase", database2);
+ setprop("FMGC/internal/navdatabase2", database1);
+ setprop("FMGC/internal/navdatabasecode", code2);
+ setprop("FMGC/internal/navdatabasecode2", code1);
}
\ No newline at end of file
diff --git a/Nasal/MCDU/DATA.nas b/Nasal/MCDU/DATA.nas
index 7731a3a6..b6a31f9d 100644
--- a/Nasal/MCDU/DATA.nas
+++ b/Nasal/MCDU/DATA.nas
@@ -4,66 +4,66 @@
var dataInput = func(key, i) {
if (key == "L1") {
- setprop("/MCDU[" ~ i ~ "]/page", "POSMON");
+ setprop("MCDU[" ~ i ~ "]/page", "POSMON");
}
if (key == "L2") {
- setprop("/MCDU[" ~ i ~ "]/page", "IRSMON");
+ setprop("MCDU[" ~ i ~ "]/page", "IRSMON");
}
if (key == "R5") {
- setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC");
+ setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC");
}
}
var printInput = func(key, i) {
if (key == "L1") {
- setprop("/FMGC/print/mcdu/page1/L1auto", 1);
+ setprop("FMGC/print/mcdu/page1/L1auto", 1);
}
if (key == "L2") {
- setprop("/FMGC/print/mcdu/page1/L2auto", 1);
+ setprop("FMGC/print/mcdu/page1/L2auto", 1);
}
if (key == "L3") {
- setprop("/FMGC/print/mcdu/page1/L3auto", 1);
+ setprop("FMGC/print/mcdu/page1/L3auto", 1);
}
if (key == "L5") {
- setprop("/MCDU[" ~ i ~ "]/page", "DATA");
+ setprop("MCDU[" ~ i ~ "]/page", "DATA");
}
if (key == "R1") {
- setprop("/FMGC/print/mcdu/page1/R1req", 1);
+ setprop("FMGC/print/mcdu/page1/R1req", 1);
}
if (key == "R2") {
- setprop("/FMGC/print/mcdu/page1/R2req", 1);
+ setprop("FMGC/print/mcdu/page1/R2req", 1);
}
if (key == "R3") {
- setprop("/FMGC/print/mcdu/page1/R3req", 1);
+ setprop("FMGC/print/mcdu/page1/R3req", 1);
}
}
var printInput2 = func(key, i) {
if (key == "L1") {
- setprop("/FMGC/print/mcdu/page2/L1auto", 1);
+ setprop("FMGC/print/mcdu/page2/L1auto", 1);
}
if (key == "L2") {
- setprop("/FMGC/print/mcdu/page2/L2auto", 1);
+ setprop("FMGC/print/mcdu/page2/L2auto", 1);
}
if (key == "L3") {
- setprop("/FMGC/print/mcdu/page2/L3auto", 1);
+ setprop("FMGC/print/mcdu/page2/L3auto", 1);
}
if (key == "L4") {
- setprop("/FMGC/print/mcdu/page2/L4auto", 1);
+ setprop("FMGC/print/mcdu/page2/L4auto", 1);
}
if (key == "L6") {
- setprop("/MCDU[" ~ i ~ "]/page", "DATA");
+ setprop("MCDU[" ~ i ~ "]/page", "DATA");
}
if (key == "R1") {
- setprop("/FMGC/print/mcdu/page2/R1req", 1);
+ setprop("FMGC/print/mcdu/page2/R1req", 1);
}
if (key == "R2") {
- setprop("/FMGC/print/mcdu/page2/R2req", 1);
+ setprop("FMGC/print/mcdu/page2/R2req", 1);
}
if (key == "R3") {
- setprop("/FMGC/print/mcdu/page2/R3req", 1);
+ setprop("FMGC/print/mcdu/page2/R3req", 1);
}
if (key == "R4") {
- setprop("/FMGC/print/mcdu/page2/R4req", 1);
+ setprop("FMGC/print/mcdu/page2/R4req", 1);
}
}
diff --git a/Nasal/MCDU/INITA.nas b/Nasal/MCDU/INITA.nas
index 82aed56b..5c0e4bf1 100644
--- a/Nasal/MCDU/INITA.nas
+++ b/Nasal/MCDU/INITA.nas
@@ -3,29 +3,29 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
var initInputA = func(key, i) {
- var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
if (key == "L3") {
if (scratchpad == "CLR") {
- setprop("/MCDUC/flight-num", "");
- setprop("/MCDUC/flight-num-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDUC/flight-num", "");
+ setprop("MCDUC/flight-num-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var flts = size(scratchpad);
if (flts >= 1 and flts <= 8) {
- setprop("/MCDUC/flight-num", scratchpad);
- setprop("/MCDUC/flight-num-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDUC/flight-num", scratchpad);
+ setprop("MCDUC/flight-num-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/cost-index", 0);
- setprop("/FMGC/internal/cost-index-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/cost-index", 0);
+ setprop("FMGC/internal/cost-index-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var ci = int(scratchpad);
var cis = size(scratchpad);
@@ -33,9 +33,9 @@ var initInputA = func(key, i) {
if (ci == nil) {
notAllowed(i);
} else if (ci >= 0 and ci <= 999) {
- setprop("/FMGC/internal/cost-index", ci);
- setprop("/FMGC/internal/cost-index-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/cost-index", ci);
+ setprop("FMGC/internal/cost-index-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -45,11 +45,11 @@ var initInputA = func(key, i) {
}
} else if (key == "L6") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/cruise-ft", 10000);
- setprop("/FMGC/internal/cruise-fl", 100);
- setprop("/FMGC/internal/cruise-lvl-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/cruise-ft", 10000);
+ setprop("FMGC/internal/cruise-fl", 100);
+ setprop("FMGC/internal/cruise-lvl-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var crz = int(scratchpad);
var crzs = size(scratchpad);
@@ -57,10 +57,10 @@ var initInputA = func(key, i) {
if (crz == nil) {
notAllowed(i);
} else if (crz > 0 and crz <= 430) {
- setprop("/FMGC/internal/cruise-ft", crz * 100);
- setprop("/FMGC/internal/cruise-fl", crz);
- setprop("/FMGC/internal/cruise-lvl-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/cruise-ft", crz * 100);
+ setprop("FMGC/internal/cruise-fl", crz);
+ setprop("FMGC/internal/cruise-lvl-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -70,12 +70,12 @@ var initInputA = func(key, i) {
}
} else if (key == "R1") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/dep-arpt", "");
- setprop("/FMGC/internal/arr-arpt", "");
- setprop("/FMGC/internal/tofrom-set", 0);
+ setprop("FMGC/internal/dep-arpt", "");
+ setprop("FMGC/internal/arr-arpt", "");
+ setprop("FMGC/internal/tofrom-set", 0);
fmgc.updateARPT();
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 9 and find("/", scratchpad) != -1) {
@@ -83,10 +83,10 @@ var initInputA = func(key, i) {
var froms = size(fromto[0]);
var tos = size(fromto[1]);
if (froms == 4 and tos == 4) {
- setprop("/FMGC/internal/dep-arpt", fromto[0]);
- setprop("/FMGC/internal/arr-arpt", fromto[1]);
- setprop("/FMGC/internal/tofrom-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/dep-arpt", fromto[0]);
+ setprop("FMGC/internal/arr-arpt", fromto[1]);
+ setprop("FMGC/internal/tofrom-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
fmgc.updateARPT();
} else {
notAllowed(i);
@@ -96,21 +96,21 @@ var initInputA = func(key, i) {
}
}
} else if (key == "R3") {
- #if (getprop("/controls/adirs/mcducbtn") == 0) {
- # setprop("/controls/adirs/mcducbtn", 1);
+ #if (getprop("controls/adirs/mcducbtn") == 0) {
+ # setprop("controls/adirs/mcducbtn", 1);
#}
} else if (key == "R6") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/tropo", 36090);
- setprop("/FMGC/internal/tropo-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/tropo", 36090);
+ setprop("FMGC/internal/tropo-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tropo = size(scratchpad);
if (tropo == 5) {
- setprop("/FMGC/internal/tropo-set", 1);
- setprop("/FMGC/internal/tropo", scratchpad);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/tropo-set", 1);
+ setprop("FMGC/internal/tropo", scratchpad);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
diff --git a/Nasal/MCDU/INITB.nas b/Nasal/MCDU/INITB.nas
index 2c6b546c..dadba163 100644
--- a/Nasal/MCDU/INITB.nas
+++ b/Nasal/MCDU/INITB.nas
@@ -3,38 +3,38 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
var initInputB = func(key, i) {
- var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
if (key == "R1") {
if (scratchpad == "CLR") {
notAllowed(i);
} else {
var tfs = size(scratchpad);
if (tfs == 0) {
- var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "/" ~ sprintf("%3.1f", math.round(zfw / 1000, 0.1)));
+ var zfw = getprop("fdm/jsbsim/inertia/weight-lbs") - getprop("consumables/fuel/total-fuel-lbs");
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "/" ~ sprintf("%3.1f", math.round(zfw / 1000, 0.1)));
} else if (tfs >= 2 and tfs <= 11 and find("/", scratchpad) != -1) {
var zfwi = split("/", scratchpad);
var zfwcg = size(zfwi[0]);
var zfw = size(zfwi[1]);
if (zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) {
- setprop("/FMGC/internal/zfwcg", zfwi[0]);
- setprop("/FMGC/internal/zfwcg-set", 1);
+ setprop("FMGC/internal/zfwcg", zfwi[0]);
+ setprop("FMGC/internal/zfwcg-set", 1);
}
if (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9) {
- setprop("/FMGC/internal/zfw", zfwi[1]);
- setprop("/FMGC/internal/zfw-set", 1);
+ setprop("FMGC/internal/zfw", zfwi[1]);
+ setprop("FMGC/internal/zfw-set", 1);
}
if ((zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) or (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9)) {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else if (tfs >= 1 and tfs <= 5) {
var zfwcg = size(scratchpad);
if (zfwcg >= 1 and zfwcg <= 5 and scratchpad > 0 and scratchpad <= 99.9) {
- setprop("/FMGC/internal/zfwcg", scratchpad);
- setprop("/FMGC/internal/zfwcg-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/zfwcg", scratchpad);
+ setprop("FMGC/internal/zfwcg-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -44,20 +44,20 @@ var initInputB = func(key, i) {
}
} else if (key == "R2") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/block", 0.0);
- setprop("/FMGC/internal/block-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/block", 0.0);
+ setprop("FMGC/internal/block-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
- var maxblock = getprop("/options/maxblock");
+ var maxblock = getprop("options/maxblock");
if (tfs == 0) {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", sprintf("%3.1f", math.round(getprop("/consumables/fuel/total-fuel-lbs") / 1000, 0.1)));
+ setprop("MCDU[" ~ i ~ "]/scratchpad", sprintf("%3.1f", math.round(getprop("consumables/fuel/total-fuel-lbs") / 1000, 0.1)));
} else if (tfs >= 1 and tfs <= 5) {
if (scratchpad >= 1.0 and scratchpad <= maxblock) {
- setprop("/FMGC/internal/block", scratchpad);
- setprop("/FMGC/internal/block-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/block", scratchpad);
+ setprop("FMGC/internal/block-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas
index 134eaea8..f9cbf9a1 100644
--- a/Nasal/MCDU/MCDU.nas
+++ b/Nasal/MCDU/MCDU.nas
@@ -7,187 +7,187 @@ var MCDU_init = func(i) {
}
var MCDU_reset = func(i) {
- setprop("/MCDU[" ~ i ~ "]/active", 0);
- setprop("/it-autoflight/settings/togaspd", 157);
- setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
- setprop("/MCDU[" ~ i ~ "]/last-page", "NONE");
- setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", "STATUS");
- setprop("/MCDU[" ~ i ~ "]/page", "MCDU");
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDUC/flight-num", "");
- setprop("/MCDUC/thracc-set", 0);
- setprop("/MCDUC/reducacc-set", 0);
- setprop("/MCDUC/flight-num-set", 0);
- setprop("/FMGC/internal/flex", 0);
- setprop("/FMGC/internal/dep-arpt", "");
- setprop("/FMGC/internal/arr-arpt", "");
- setprop("/FMGC/internal/cruise-ft", 10000);
- setprop("/FMGC/internal/cruise-fl", 100);
- setprop("/FMGC/internal/cost-index", "0");
- setprop("/FMGC/internal/trans-alt", 18000);
- setprop("/FMGC/internal/reduc-agl-ft", "3000");
- setprop("/FMGC/internal/eng-out-reduc", "3500");
- setprop("/FMGC/internal/v1", 0);
- setprop("/FMGC/internal/vr", 0);
- setprop("/FMGC/internal/v2", 0);
- setprop("/FMGC/internal/block", 0.0);
- setprop("/FMGC/internal/zfw", 0);
- setprop("/FMGC/internal/zfwcg", 55.1); # 25KG default
- setprop("/FMGC/internal/v1-set", 0);
- setprop("/FMGC/internal/vr-set", 0);
- setprop("/FMGC/internal/v2-set", 0);
- setprop("/FMGC/internal/block-set", 0);
- setprop("/FMGC/internal/zfw-set", 0);
- setprop("/FMGC/internal/zfwcg-set", 0);
- setprop("/FMGC/internal/to-flap", 0);
- setprop("/FMGC/internal/to-ths", "0.0");
- setprop("/FMGC/internal/tofrom-set", 0);
- setprop("/FMGC/internal/cost-index-set", 0);
- setprop("/FMGC/internal/cruise-lvl-set", 0);
- setprop("/FMGC/internal/flap-ths-set", 0);
- setprop("/FMGC/internal/flex-set", 0);
- setprop("/FMGC/internal/ils1freq-set", 0);
- setprop("/FMGC/internal/ils1crs-set", 0);
- setprop("/FMGC/internal/vor1freq-set", 0);
- setprop("/FMGC/internal/vor1crs-set", 0);
- setprop("/FMGC/internal/vor2freq-set", 0);
- setprop("/FMGC/internal/vor2crs-set", 0);
- setprop("/FMGC/internal/adf1freq-set", 0);
- setprop("/FMGC/internal/adf2freq-set", 0);
- setprop("/FMGC/internal/navdatabase", "01JAN-28JAN");
- setprop("/FMGC/internal/navdatabase2", "29JAN-26FEB");
- setprop("/FMGC/internal/navdatabasecode", "AB20170101");
- setprop("/FMGC/internal/navdatabasecode2", "AB20170102");
- setprop("/FMGC/print/mcdu/page1/L1auto", 0);
- setprop("/FMGC/print/mcdu/page1/L2auto", 0);
- setprop("/FMGC/print/mcdu/page1/L3auto", 0);
- setprop("/FMGC/print/mcdu/page1/R1req", 0);
- setprop("/FMGC/print/mcdu/page1/R2req", 0);
- setprop("/FMGC/print/mcdu/page1/R3req", 0);
- setprop("/FMGC/print/mcdu/page2/L1auto", 0);
- setprop("/FMGC/print/mcdu/page2/L2auto", 0);
- setprop("/FMGC/print/mcdu/page2/L3auto", 0);
- setprop("/FMGC/print/mcdu/page2/L4auto", 0);
- setprop("/FMGC/print/mcdu/page2/R1req", 0);
- setprop("/FMGC/print/mcdu/page2/R2req", 0);
- setprop("/FMGC/print/mcdu/page2/R3req", 0);
- setprop("/FMGC/print/mcdu/page2/R4req", 0);
- setprop("/FMGC/internal/tropo", 36090);
- setprop("/FMGC/internal/tropo-set", 0);
+ setprop("MCDU[" ~ i ~ "]/active", 0);
+ setprop("it-autoflight/settings/togaspd", 157);
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/last-page", "NONE");
+ setprop("MCDU[" ~ i ~ "]/last-fmgc-page", "STATUS");
+ setprop("MCDU[" ~ i ~ "]/page", "MCDU");
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDUC/flight-num", "");
+ setprop("MCDUC/thracc-set", 0);
+ setprop("MCDUC/reducacc-set", 0);
+ setprop("MCDUC/flight-num-set", 0);
+ setprop("FMGC/internal/flex", 0);
+ setprop("FMGC/internal/dep-arpt", "");
+ setprop("FMGC/internal/arr-arpt", "");
+ setprop("FMGC/internal/cruise-ft", 10000);
+ setprop("FMGC/internal/cruise-fl", 100);
+ setprop("FMGC/internal/cost-index", "0");
+ setprop("FMGC/internal/trans-alt", 18000);
+ setprop("FMGC/internal/reduc-agl-ft", "3000");
+ setprop("FMGC/internal/eng-out-reduc", "3500");
+ setprop("FMGC/internal/v1", 0);
+ setprop("FMGC/internal/vr", 0);
+ setprop("FMGC/internal/v2", 0);
+ setprop("FMGC/internal/block", 0.0);
+ setprop("FMGC/internal/zfw", 0);
+ setprop("FMGC/internal/zfwcg", 55.1); # 25KG default
+ setprop("FMGC/internal/v1-set", 0);
+ setprop("FMGC/internal/vr-set", 0);
+ setprop("FMGC/internal/v2-set", 0);
+ setprop("FMGC/internal/block-set", 0);
+ setprop("FMGC/internal/zfw-set", 0);
+ setprop("FMGC/internal/zfwcg-set", 0);
+ setprop("FMGC/internal/to-flap", 0);
+ setprop("FMGC/internal/to-ths", "0.0");
+ setprop("FMGC/internal/tofrom-set", 0);
+ setprop("FMGC/internal/cost-index-set", 0);
+ setprop("FMGC/internal/cruise-lvl-set", 0);
+ setprop("FMGC/internal/flap-ths-set", 0);
+ setprop("FMGC/internal/flex-set", 0);
+ setprop("FMGC/internal/ils1freq-set", 0);
+ setprop("FMGC/internal/ils1crs-set", 0);
+ setprop("FMGC/internal/vor1freq-set", 0);
+ setprop("FMGC/internal/vor1crs-set", 0);
+ setprop("FMGC/internal/vor2freq-set", 0);
+ setprop("FMGC/internal/vor2crs-set", 0);
+ setprop("FMGC/internal/adf1freq-set", 0);
+ setprop("FMGC/internal/adf2freq-set", 0);
+ setprop("FMGC/internal/navdatabase", "01JAN-28JAN");
+ setprop("FMGC/internal/navdatabase2", "29JAN-26FEB");
+ setprop("FMGC/internal/navdatabasecode", "AB20170101");
+ setprop("FMGC/internal/navdatabasecode2", "AB20170102");
+ setprop("FMGC/print/mcdu/page1/L1auto", 0);
+ setprop("FMGC/print/mcdu/page1/L2auto", 0);
+ setprop("FMGC/print/mcdu/page1/L3auto", 0);
+ setprop("FMGC/print/mcdu/page1/R1req", 0);
+ setprop("FMGC/print/mcdu/page1/R2req", 0);
+ setprop("FMGC/print/mcdu/page1/R3req", 0);
+ setprop("FMGC/print/mcdu/page2/L1auto", 0);
+ setprop("FMGC/print/mcdu/page2/L2auto", 0);
+ setprop("FMGC/print/mcdu/page2/L3auto", 0);
+ setprop("FMGC/print/mcdu/page2/L4auto", 0);
+ setprop("FMGC/print/mcdu/page2/R1req", 0);
+ setprop("FMGC/print/mcdu/page2/R2req", 0);
+ setprop("FMGC/print/mcdu/page2/R3req", 0);
+ setprop("FMGC/print/mcdu/page2/R4req", 0);
+ setprop("FMGC/internal/tropo", 36090);
+ setprop("FMGC/internal/tropo-set", 0);
}
var lskbutton = func(btn, i) {
if (btn == "1") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "MCDU") {
- if (getprop("/MCDU[" ~ i ~ "]/active") != 2) {
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "WAIT FOR SYSTEM RESPONSE");
- setprop("/MCDU[" ~ i ~ "]/active", 1);
+ if (getprop("MCDU[" ~ i ~ "]/page") == "MCDU") {
+ if (getprop("MCDU[" ~ i ~ "]/active") != 2) {
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "WAIT FOR SYSTEM RESPONSE");
+ setprop("MCDU[" ~ i ~ "]/active", 1);
settimer(func(){
- setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/active", 2);
+ setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-fmgc-page"));
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/active", 2);
}, 2);
} else {
- setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-fmgc-page"));
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
}
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("L1",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("L1",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
dataInput("L1",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("L1",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L1",i);
} else {
notAllowed(i);
}
} else if (btn == "2") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
PerfInput("L2",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("L2",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("L2",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
initInputA("L5",i); # Does the same thing as on the INIT page
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
initInputA("L5",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "DES") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
initInputA("L5",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
dataInput("L2",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("L2",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L2",i);
} else {
notAllowed(i);
}
} else if (btn == "3") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("L3",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("L3",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "STATUS") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "STATUS") {
statusInput("L3",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("L3",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("L3",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L3",i);
} else {
notAllowed(i);
}
} else if (btn == "4") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
- setprop("/MCDU[" ~ i ~ "]/page", "STATUS");
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
+ setprop("MCDU[" ~ i ~ "]/page", "STATUS");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("L4",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("L4",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L4",i);
} else {
notAllowed(i);
}
} else if (btn == "5") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("L5",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("L5",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
perfCLBInput("L5",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
perfCRZInput("L5",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "DES") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
perfDESInput("L5",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("L5",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("L5",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L5",i);
} else {
notAllowed(i);
}
} else if (btn == "6") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("L6",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
perfCLBInput("L6",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
perfCRZInput("L6",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "DES") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
perfDESInput("L6",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L6",i);
} else {
notAllowed(i);
@@ -201,89 +201,89 @@ var lskbutton_b = func(btn, i) {
var rskbutton = func(btn, i) {
if (btn == "1") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("R1",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
initInputB("R1",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("R1",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("R1",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("R1",i);
} else {
notAllowed(i);
}
} else if (btn == "2") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
initInputB("R2",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("R2",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("R2",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("R2",i);
} else {
notAllowed(i);
}
} else if (btn == "3") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("R3",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("R3",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("R3",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("R3",i);
} else {
notAllowed(i);
}
} else if (btn == "4") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("R4",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("R4",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("R4",i);
} else {
notAllowed(i);
}
} else if (btn == "5") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
+ if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("R5",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("R5",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
dataInput("R5",i);
} else {
notAllowed(i);
}
} else if (btn == "6") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "MCDU") {
- if (getprop("/MCDU[" ~ i ~ "]/last-page") != "NONE") {
- setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-page"));
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ if (getprop("MCDU[" ~ i ~ "]/page") == "MCDU") {
+ if (getprop("MCDU[" ~ i ~ "]/last-page") != "NONE") {
+ setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-page"));
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else {
notAllowed(i);
}
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("R6",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
perfCLBInput("R6",i);
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
perfCRZInput("R6",i);
- } else if ((getprop("/MCDU[" ~ i ~ "]/page") == "DATA") or (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") or (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2")) {
- if (getprop("/MCDU[" ~ i ~ "]/scratchpad") != "AOC DISABLED") {
- if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
- setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
+ } else if ((getprop("MCDU[" ~ i ~ "]/page") == "DATA") or (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") or (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2")) {
+ if (getprop("MCDU[" ~ i ~ "]/scratchpad") != "AOC DISABLED") {
+ if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
} else {
- setprop("/MCDU[" ~ i ~ "]/last-scratchpad", getprop("/MCDU[" ~ i ~ "]/scratchpad"));
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", getprop("MCDU[" ~ i ~ "]/scratchpad"));
}
}
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "AOC DISABLED");
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "AOC DISABLED");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("R6",i);
} else {
notAllowed(i);
@@ -297,40 +297,40 @@ var rskbutton_b = func(btn, i) {
var arrowbutton = func(btn, i) {
if (btn == "left") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
- setprop("/MCDU[" ~ i ~ "]/page", "DATA2");
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA2") {
- setprop("/MCDU[" ~ i ~ "]/page", "DATA");
+ if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
+ setprop("MCDU[" ~ i ~ "]/page", "DATA2");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA2") {
+ setprop("MCDU[" ~ i ~ "]/page", "DATA");
}
- if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
- if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
- setprop("/MCDU[" ~ i ~ "]/page", "INITB");
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("engines/engine[0]/state") != 3 and getprop("engines/engine[1]/state") != 3) {
+ setprop("MCDU[" ~ i ~ "]/page", "INITB");
}
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
- setprop("/MCDU[" ~ i ~ "]/page", "INITA");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
+ setprop("MCDU[" ~ i ~ "]/page", "INITA");
}
- if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
- setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC");
+ if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC");
}
} else if (btn == "right") {
- if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
- setprop("/MCDU[" ~ i ~ "]/page", "DATA2");
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA2") {
- setprop("/MCDU[" ~ i ~ "]/page", "DATA");
+ if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
+ setprop("MCDU[" ~ i ~ "]/page", "DATA2");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA2") {
+ setprop("MCDU[" ~ i ~ "]/page", "DATA");
}
- if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
- if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
- setprop("/MCDU[" ~ i ~ "]/page", "INITB");
+ if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
+ if (getprop("engines/engine[0]/state") != 3 and getprop("engines/engine[1]/state") != 3) {
+ setprop("MCDU[" ~ i ~ "]/page", "INITB");
}
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
- setprop("/MCDU[" ~ i ~ "]/page", "INITA");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
+ setprop("MCDU[" ~ i ~ "]/page", "INITA");
}
- if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
- setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
- } else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
- setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC");
+ if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
+ setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
+ } else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
+ setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC");
}
} else if (btn == "up") {
# Nothing for now
@@ -340,204 +340,204 @@ var arrowbutton = func(btn, i) {
}
var pagebutton = func(btn, i) {
- if (getprop("/MCDU[" ~ i ~ "]/page") != "MCDU") {
+ if (getprop("MCDU[" ~ i ~ "]/page") != "MCDU") {
if (btn == "radnav") {
- setprop("/MCDU[" ~ i ~ "]/page", "RADNAV");
+ setprop("MCDU[" ~ i ~ "]/page", "RADNAV");
} else if (btn == "perf") {
- if (getprop("/FMGC/status/phase") == 0 or getprop("/FMGC/status/phase") == 1) {
- setprop("/MCDU[" ~ i ~ "]/page", "TO");
- } else if (getprop("/FMGC/status/phase") == 2) {
- setprop("/MCDU[" ~ i ~ "]/page", "CLB");
- } else if (getprop("/FMGC/status/phase") == 3) {
- setprop("/MCDU[" ~ i ~ "]/page", "CRZ");
- } else if (getprop("/FMGC/status/phase") == 4) {
- setprop("/MCDU[" ~ i ~ "]/page", "DES");
+ if (getprop("FMGC/status/phase") == 0 or getprop("FMGC/status/phase") == 1) {
+ setprop("MCDU[" ~ i ~ "]/page", "TO");
+ } else if (getprop("FMGC/status/phase") == 2) {
+ setprop("MCDU[" ~ i ~ "]/page", "CLB");
+ } else if (getprop("FMGC/status/phase") == 3) {
+ setprop("MCDU[" ~ i ~ "]/page", "CRZ");
+ } else if (getprop("FMGC/status/phase") == 4) {
+ setprop("MCDU[" ~ i ~ "]/page", "DES");
}
} else if (btn == "init") {
- setprop("/MCDU[" ~ i ~ "]/page", "INITA");
+ setprop("MCDU[" ~ i ~ "]/page", "INITA");
} else if (btn == "data") {
- setprop("/MCDU[" ~ i ~ "]/page", "DATA");
+ setprop("MCDU[" ~ i ~ "]/page", "DATA");
} else if (btn == "mcdu") {
- setprop("/MCDU[" ~ i ~ "]/last-page", getprop("/MCDU[" ~ i ~ "]/page"));
- setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", getprop("/MCDU[" ~ i ~ "]/page"));
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
- setprop("/MCDU[" ~ i ~ "]/page", "MCDU");
+ setprop("MCDU[" ~ i ~ "]/last-page", getprop("MCDU[" ~ i ~ "]/page"));
+ setprop("MCDU[" ~ i ~ "]/last-fmgc-page", getprop("MCDU[" ~ i ~ "]/page"));
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
+ setprop("MCDU[" ~ i ~ "]/page", "MCDU");
} else if (btn == "f-pln") {
- setprop("/MCDU[" ~ i ~ "]/page", "F-PLNA");
+ setprop("MCDU[" ~ i ~ "]/page", "F-PLNA");
} else if (btn == "fuel-pred") {
- setprop("/MCDU[" ~ i ~ "]/page", "FUELPRED");
+ setprop("MCDU[" ~ i ~ "]/page", "FUELPRED");
}
}
}
var button = func(btn, i) {
- if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 0 and getprop("/MCDU[" ~ i ~ "]/page") != "MCDU") {
- var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
+ if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 0 and getprop("MCDU[" ~ i ~ "]/page") != "MCDU") {
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
if (btn == "A") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "A");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "A");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "B") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "B");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "B");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "C") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "C");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "C");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "D") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "D");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "D");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "E") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "E");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "E");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "F") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "F");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "F");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "G") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "G");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "G");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "H") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "H");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "H");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "I") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "I");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "I");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "J") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "J");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "J");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "K") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "K");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "K");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "L") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "L");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "L");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "M") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "M");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "M");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "N") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "N");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "N");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "O") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "O");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "O");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "P") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "P");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "P");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "Q") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Q");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Q");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "R") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "R");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "R");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "S") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "S");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "S");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "T") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "T");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "T");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "U") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "U");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "U");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "V") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "V");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "V");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "W") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "W");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "W");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "X") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "X");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "X");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "Y") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Y");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Y");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "Z") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Z");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Z");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "SLASH") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "/");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "/");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "SP") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ " ");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ " ");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "CLR") {
- var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
if (size(scratchpad) == 0) {
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "CLR");
- } else if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "CLR");
+ } else if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (size(scratchpad) > 0) {
- setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
- setprop("/MCDU[" ~ i ~ "]/scratchpad", left(scratchpad, size(scratchpad) - 1));
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad", left(scratchpad, size(scratchpad) - 1));
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
}
} else if (btn == "0") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "0");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "0");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "1") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "1");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "1");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "2") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "2");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "2");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "3") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "3");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "3");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "4") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "4");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "4");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "5") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "5");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "5");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "6") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "6");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "6");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "7") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "7");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "7");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "8") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "8");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "8");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "9") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "9");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "9");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "DOT") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ ".");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ ".");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
} else if (btn == "PLUSMINUS") {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "-");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "-");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
}
} else {
if (btn == "CLR") {
- var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
if (size(scratchpad) == 0) {
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "CLR");
- } else if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
- setprop("/MCDU[" ~ i ~ "]/scratchpad", getprop("/MCDU[" ~ i ~ "]/last-scratchpad"));
- setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "CLR");
+ } else if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
+ setprop("MCDU[" ~ i ~ "]/scratchpad", getprop("MCDU[" ~ i ~ "]/last-scratchpad"));
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
}
}
}
}
var notAllowed = func(i) {
- if (getprop("/MCDU[" ~ i ~ "]/scratchpad") != "NOT ALLOWED") {
- if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
- setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
+ if (getprop("MCDU[" ~ i ~ "]/scratchpad") != "NOT ALLOWED") {
+ if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
} else {
- setprop("/MCDU[" ~ i ~ "]/last-scratchpad", getprop("/MCDU[" ~ i ~ "]/scratchpad"));
+ setprop("MCDU[" ~ i ~ "]/last-scratchpad", getprop("MCDU[" ~ i ~ "]/scratchpad"));
}
}
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "NOT ALLOWED");
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "NOT ALLOWED");
}
var screenFlash = func(time, i) {
- var page = getprop("/MCDU[" ~ i ~ "]/page");
- setprop("/MCDU[" ~ i ~ "]/page", "NONE");
+ var page = getprop("MCDU[" ~ i ~ "]/page");
+ setprop("MCDU[" ~ i ~ "]/page", "NONE");
settimer(func {
- setprop("/MCDU[" ~ i ~ "]/page", page);
+ setprop("MCDU[" ~ i ~ "]/page", page);
}, time);
}
diff --git a/Nasal/MCDU/PERFCLB.nas b/Nasal/MCDU/PERFCLB.nas
index 9407da30..dea435c8 100644
--- a/Nasal/MCDU/PERFCLB.nas
+++ b/Nasal/MCDU/PERFCLB.nas
@@ -3,13 +3,13 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
var perfCLBInput = func(key, i) {
- var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
if (key == "L5") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/cost-index", 0);
- setprop("/FMGC/internal/cost-index-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/cost-index", 0);
+ setprop("FMGC/internal/cost-index-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var ci = int(scratchpad);
var cis = size(scratchpad);
@@ -17,9 +17,9 @@ var perfCLBInput = func(key, i) {
if (ci == nil) {
notAllowed(i);
} else if (ci >= 0 and ci <= 999) {
- setprop("/FMGC/internal/cost-index", ci);
- setprop("/FMGC/internal/cost-index-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/cost-index", ci);
+ setprop("FMGC/internal/cost-index-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -28,8 +28,8 @@ var perfCLBInput = func(key, i) {
}
}
} else if (key == "L6") {
- setprop("/MCDU[" ~ i ~ "]/page", "TO");
+ setprop("MCDU[" ~ i ~ "]/page", "TO");
} else if (key == "R6") {
- setprop("/MCDU[" ~ i ~ "]/page", "CRZ");
+ setprop("MCDU[" ~ i ~ "]/page", "CRZ");
}
}
diff --git a/Nasal/MCDU/PERFCRZ.nas b/Nasal/MCDU/PERFCRZ.nas
index f0d13070..a9ecbff0 100644
--- a/Nasal/MCDU/PERFCRZ.nas
+++ b/Nasal/MCDU/PERFCRZ.nas
@@ -4,9 +4,9 @@
var perfCRZInput = func(key, i) {
if (key == "L6") {
- setprop("/MCDU[" ~ i ~ "]/page", "CLB");
+ setprop("MCDU[" ~ i ~ "]/page", "CLB");
}
if (key == "R6") {
- setprop("/MCDU[" ~ i ~ "]/page", "DES");
+ setprop("MCDU[" ~ i ~ "]/page", "DES");
}
}
diff --git a/Nasal/MCDU/PERFDES.nas b/Nasal/MCDU/PERFDES.nas
index b65a9474..d4fccb80 100644
--- a/Nasal/MCDU/PERFDES.nas
+++ b/Nasal/MCDU/PERFDES.nas
@@ -4,6 +4,6 @@
var perfDESInput = func(key, i) {
if (key == "L6") {
- setprop("/MCDU[" ~ i ~ "]/page", "CRZ");
+ setprop("MCDU[" ~ i ~ "]/page", "CRZ");
}
}
diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas
index ead955ad..42a25bea 100644
--- a/Nasal/MCDU/PERFTO.nas
+++ b/Nasal/MCDU/PERFTO.nas
@@ -3,20 +3,20 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
var perfTOInput = func(key, i) {
- var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
if (key == "L1") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/v1", 0);
- setprop("/FMGC/internal/v1-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/v1", 0);
+ setprop("FMGC/internal/v1-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
- setprop("/FMGC/internal/v1", scratchpad);
- setprop("/FMGC/internal/v1-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/v1", scratchpad);
+ setprop("FMGC/internal/v1-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -26,17 +26,17 @@ var perfTOInput = func(key, i) {
}
} else if (key == "L2") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/vr", 0);
- setprop("/FMGC/internal/vr-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/vr", 0);
+ setprop("FMGC/internal/vr-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
- setprop("/FMGC/internal/vr", scratchpad);
- setprop("/FMGC/internal/vr-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/vr", scratchpad);
+ setprop("FMGC/internal/vr-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -46,19 +46,19 @@ var perfTOInput = func(key, i) {
}
} else if (key == "L3") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/v2", 0);
- setprop("/FMGC/internal/v2-set", 0);
- setprop("/it-autoflight/settings/togaspd", 157);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/v2", 0);
+ setprop("FMGC/internal/v2-set", 0);
+ setprop("it-autoflight/settings/togaspd", 157);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
- setprop("/FMGC/internal/v2", scratchpad);
- setprop("/FMGC/internal/v2-set", 1);
- setprop("/it-autoflight/settings/togaspd", scratchpad + 10);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/v2", scratchpad);
+ setprop("FMGC/internal/v2-set", 1);
+ setprop("it-autoflight/settings/togaspd", scratchpad + 10);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -73,8 +73,8 @@ var perfTOInput = func(key, i) {
var tfs = size(scratchpad);
if (tfs == 4 or tfs == 5) {
if (scratchpad >= 1000 and scratchpad <= 18000) {
- setprop("/FMGC/internal/trans-alt", scratchpad);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/trans-alt", scratchpad);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -84,11 +84,11 @@ var perfTOInput = func(key, i) {
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
- setprop("/systems/thrust/clbreduc-ft", "1500");
- setprop("/FMGC/internal/reduc-agl-ft", "3000");
- setprop("/MCDUC/thracc-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("systems/thrust/clbreduc-ft", "1500");
+ setprop("FMGC/internal/reduc-agl-ft", "3000");
+ setprop("MCDUC/thracc-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 7 and tfs <= 9 and find("/", scratchpad) != -1) {
@@ -96,10 +96,10 @@ var perfTOInput = func(key, i) {
var thrred = size(thracc[0]);
var acc = size(thracc[1]);
if ((thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) {
- setprop("/systems/thrust/clbreduc-ft", thracc[0]);
- setprop("/FMGC/internal/reduc-agl-ft", thracc[1]);
- setprop("/MCDUC/thracc-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("systems/thrust/clbreduc-ft", thracc[0]);
+ setprop("FMGC/internal/reduc-agl-ft", thracc[1]);
+ setprop("MCDUC/thracc-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -109,20 +109,20 @@ var perfTOInput = func(key, i) {
}
} else if (key == "R3") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/to-flap", 0);
- setprop("/FMGC/internal/to-ths", "0.0");
- setprop("/FMGC/internal/flap-ths-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/to-flap", 0);
+ setprop("FMGC/internal/to-ths", "0.0");
+ setprop("FMGC/internal/flap-ths-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 7 and find("/", scratchpad) != -1) {
var flapths = split("/UP", scratchpad);
if ((flapths[0] >= 1 and flapths[0] <= 4) and (flapths[1] >= 0.0 and flapths[1] <= 2.5)) {
- setprop("/FMGC/internal/to-flap", flapths[0]);
- setprop("/FMGC/internal/to-ths", flapths[1]);
- setprop("/FMGC/internal/flap-ths-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/to-flap", flapths[0]);
+ setprop("FMGC/internal/to-ths", flapths[1]);
+ setprop("FMGC/internal/flap-ths-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -132,19 +132,19 @@ var perfTOInput = func(key, i) {
}
} else if (key == "R4") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/flex", 0);
- setprop("/FMGC/internal/flex-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/flex", 0);
+ setprop("FMGC/internal/flex-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 1 or tfs == 2) {
if (scratchpad >= 0 and scratchpad <= 70) {
- setprop("/FMGC/internal/flex", scratchpad);
- setprop("/FMGC/internal/flex-set", 1);
- var flex_calc = getprop("/FMGC/internal/flex") - getprop("/environment/temperature-degc");
- setprop("/FMGC/internal/flex-cmd", flex_calc);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/flex", scratchpad);
+ setprop("FMGC/internal/flex-set", 1);
+ var flex_calc = getprop("FMGC/internal/flex") - getprop("environment/temperature-degc");
+ setprop("FMGC/internal/flex-cmd", flex_calc);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -154,21 +154,21 @@ var perfTOInput = func(key, i) {
}
} else if (key == "R5") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/eng-out-reduc", "3500");
- setprop("/MCDUC/reducacc-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/eng-out-reduc", "3500");
+ setprop("MCDUC/reducacc-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 5) {
- setprop("/FMGC/internal/eng-out-reduc", scratchpad);
- setprop("/MCDUC/reducacc-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/eng-out-reduc", scratchpad);
+ setprop("MCDUC/reducacc-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
}
} else if (key == "R6") {
- setprop("/MCDU[" ~ i ~ "]/page", "CLB");
+ setprop("MCDU[" ~ i ~ "]/page", "CLB");
}
}
diff --git a/Nasal/MCDU/RADNAV.nas b/Nasal/MCDU/RADNAV.nas
index c6a91cee..8391ee7f 100644
--- a/Nasal/MCDU/RADNAV.nas
+++ b/Nasal/MCDU/RADNAV.nas
@@ -3,12 +3,12 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
var radnavInput = func(key, i) {
- var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
+ var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
if (key == "L1") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/vor1freq-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/vor1freq-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
@@ -19,14 +19,14 @@ var radnavInput = func(key, i) {
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
notAllowed(i);
} else {
- setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
- setprop("/FMGC/internal/vor1freq-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
+ setprop("FMGC/internal/vor1freq-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
}
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
- setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
- setprop("/FMGC/internal/vor1freq-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
+ setprop("FMGC/internal/vor1freq-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -36,16 +36,16 @@ var radnavInput = func(key, i) {
}
} else if (key == "L2") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/vor1crs-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/vor1crs-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
- setprop("/instrumentation/nav[2]/radials/selected-deg", scratchpad);
- setprop("/FMGC/internal/vor1crs-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("instrumentation/nav[2]/radials/selected-deg", scratchpad);
+ setprop("FMGC/internal/vor1crs-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -55,9 +55,9 @@ var radnavInput = func(key, i) {
}
} else if (key == "L3") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/ils1freq-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/ils1freq-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
@@ -66,9 +66,9 @@ var radnavInput = func(key, i) {
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
- setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
- setprop("/FMGC/internal/ils1freq-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
+ setprop("FMGC/internal/ils1freq-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -81,16 +81,16 @@ var radnavInput = func(key, i) {
}
} else if (key == "L4") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/ils1crs-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/ils1crs-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
- setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad);
- setprop("/FMGC/internal/ils1crs-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("instrumentation/nav[0]/radials/selected-deg", scratchpad);
+ setprop("FMGC/internal/ils1crs-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -100,16 +100,16 @@ var radnavInput = func(key, i) {
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/adf1freq-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/adf1freq-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 4) {
if (scratchpad >= 190 and scratchpad <= 1750) {
- setprop("/instrumentation/adf[0]/frequencies/selected-khz", scratchpad);
- setprop("/FMGC/internal/adf1freq-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("instrumentation/adf[0]/frequencies/selected-khz", scratchpad);
+ setprop("FMGC/internal/adf1freq-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -119,9 +119,9 @@ var radnavInput = func(key, i) {
}
} else if (key == "R1") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/vor2freq-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/vor2freq-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
@@ -132,14 +132,14 @@ var radnavInput = func(key, i) {
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
notAllowed(i);
} else {
- setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
- setprop("/FMGC/internal/vor2freq-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
+ setprop("FMGC/internal/vor2freq-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
}
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
- setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
- setprop("/FMGC/internal/vor2freq-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
+ setprop("FMGC/internal/vor2freq-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -149,16 +149,16 @@ var radnavInput = func(key, i) {
}
} else if (key == "R2") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/vor2crs-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/vor2crs-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
- setprop("/instrumentation/nav[3]/radials/selected-deg", scratchpad);
- setprop("/FMGC/internal/vor2crs-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("instrumentation/nav[3]/radials/selected-deg", scratchpad);
+ setprop("FMGC/internal/vor2crs-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
@@ -168,16 +168,16 @@ var radnavInput = func(key, i) {
}
} else if (key == "R5") {
if (scratchpad == "CLR") {
- setprop("/FMGC/internal/adf2freq-set", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("FMGC/internal/adf2freq-set", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 4) {
if (scratchpad >= 190 and scratchpad <= 1750) {
- setprop("/instrumentation/adf[1]/frequencies/selected-khz", scratchpad);
- setprop("/FMGC/internal/adf2freq-set", 1);
- setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
+ setprop("instrumentation/adf[1]/frequencies/selected-khz", scratchpad);
+ setprop("FMGC/internal/adf2freq-set", 1);
+ setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
diff --git a/Nasal/Panels/acp.nas b/Nasal/Panels/acp.nas
index 6b44ca14..4c04531e 100644
--- a/Nasal/Panels/acp.nas
+++ b/Nasal/Panels/acp.nas
@@ -13,8 +13,8 @@ var vhf2_recive = props.globals.initNode("/controls/audio/acp[0]/vhf2-recive", 1
var vhf1_volume = props.globals.initNode("/controls/audio/acp[0]/vhf1-volume", 1, "DOUBLE");
var vhf2_volume = props.globals.initNode("/controls/audio/acp[0]/vhf2-volume", 1, "DOUBLE");
-var com1_volume = props.globals.getNode("/instrumentation/comm[0]/volume");
-var com2_volume = props.globals.getNode("/instrumentation/comm[1]/volume");
+var com1_volume = props.globals.getNode("instrumentation/comm[0]/volume");
+var com2_volume = props.globals.getNode("instrumentation/comm[1]/volume");
var init = func() {
vhf1_recive.setValue(1);
diff --git a/Nasal/Panels/atc.nas b/Nasal/Panels/atc.nas
index dbbb3114..216cf0a8 100644
--- a/Nasal/Panels/atc.nas
+++ b/Nasal/Panels/atc.nas
@@ -3,10 +3,10 @@
# Copyright (c) 2019 Jonathan Redpath
-var idCode = props.globals.getNode("/instrumentation/transponder/id-code", 1);
+var idCode = props.globals.getNode("instrumentation/transponder/id-code", 1);
var guiModes = ['OFF', 'STANDBY', 'TEST', 'GROUND', 'ON', 'ALTITUDE'];
-var guiNode = props.globals.getNode("/sim/gui/dialogs/radios/transponder-mode", 1);
+var guiNode = props.globals.getNode("sim/gui/dialogs/radios/transponder-mode", 1);
var forLoopFlag = 0;
var altimeter = props.globals.initNode("/instrumentation/transponder/altimeter-input-src", 0, "INT");
@@ -20,15 +20,15 @@ var Transponder = {
activeADIRS: 0,
condition: 0,
failed: 0,
- codeDigitsNodes: [props.globals.getNode("/instrumentation/transponder/inputs/digit[0]", 1), props.globals.getNode("/instrumentation/transponder/inputs/digit[1]", 1), props.globals.getNode("/instrumentation/transponder/inputs/digit[2]", 1), props.globals.getNode("/instrumentation/transponder/inputs/digit[3]", 1)],
- serviceableNode: props.globals.getNode("/instrumentation/transponder/serviceable", 1),
+ codeDigitsNodes: [props.globals.getNode("instrumentation/transponder/inputs/digit[0]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[1]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[2]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[3]", 1)],
+ serviceableNode: props.globals.getNode("instrumentation/transponder/serviceable", 1),
knobNode: props.globals.getNode("instrumentation/transponder/inputs/knob-mode", 1),
- identNode: props.globals.getNode("/instrumentation/transponder/inputs/ident-btn", 1),
- wowNode: props.globals.getNode("/fdm/jsbsim/position/wow"),
- ac1Node: props.globals.getNode("/systems/electrical/bus/ac-1", 1),
- tcasNode: props.globals.getNode("/instrumentation/tcas/inputs/mode"),
- aglNode: props.globals.getNode("/position/gear-agl-ft", 1),
- electricNode: props.globals.getNode("/systems/electrical/outputs/transponder", 1), # communicate to generic systems
+ identNode: props.globals.getNode("instrumentation/transponder/inputs/ident-btn", 1),
+ wowNode: props.globals.getNode("fdm/jsbsim/position/wow"),
+ ac1Node: props.globals.getNode("systems/electrical/bus/ac-1", 1),
+ tcasNode: props.globals.getNode("instrumentation/tcas/inputs/mode"),
+ aglNode: props.globals.getNode("position/gear-agl-ft", 1),
+ electricNode: props.globals.getNode("systems/electrical/outputs/transponder", 1), # communicate to generic systems
new: func(elecSrc, ADIRS) {
var t = {parents:[Transponder]};
t.mode = 1;
@@ -146,7 +146,7 @@ var transponderPanel = {
failLight: 0,
clearFlag: 0,
keypad: func(keyNum) {
- if (props.globals.getNode("/controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("/systems/electrical/bus/dc-ess", 1).getValue() < 25) {
+ if (props.globals.getNode("controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("systems/electrical/bus/dc-ess", 1).getValue() < 25) {
return;
}
if (keyNum < 0 or keyNum > 7) {
@@ -164,7 +164,7 @@ var transponderPanel = {
}
},
clearKey: func() {
- if (props.globals.getNode("/controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("/systems/electrical/bus/dc-ess", 1).getValue() < 25) {
+ if (props.globals.getNode("controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("systems/electrical/bus/dc-ess", 1).getValue() < 25) {
return;
}
if (me.codeDisp != "") {
@@ -216,7 +216,7 @@ var transponderPanel = {
return;
}
me.failLight = newFail;
- props.globals.getNode("/systems/atc/failed").setBoolValue(me.failLight);
+ props.globals.getNode("systems/atc/failed").setBoolValue(me.failLight);
},
identSwitch: func() {
Transponders.vector[me.atcSel - 1].ident();
diff --git a/Nasal/Panels/rmp.nas b/Nasal/Panels/rmp.nas
index e9f7370e..d76aa4bc 100644
--- a/Nasal/Panels/rmp.nas
+++ b/Nasal/Panels/rmp.nas
@@ -11,9 +11,9 @@ var chan_rmp1_v = "vhr1";
var chan_rmp2_v = "vhr2";
var chan_rmp3_v = "vhr3";
-var act_vhf1 = props.globals.getNode("/instrumentation/comm[0]/frequencies/selected-mhz");
-var act_vhf2 = props.globals.getNode("/instrumentation/comm[1]/frequencies/selected-mhz");
-var act_vhf3 = props.globals.getNode("/instrumentation/comm[2]/frequencies/selected-mhz");
+var act_vhf1 = props.globals.getNode("instrumentation/comm[0]/frequencies/selected-mhz");
+var act_vhf2 = props.globals.getNode("instrumentation/comm[1]/frequencies/selected-mhz");
+var act_vhf3 = props.globals.getNode("instrumentation/comm[2]/frequencies/selected-mhz");
var act_display_rmp1 = props.globals.initNode("/controls/radio/rmp[0]/active-display", "118.700", "STRING");
var stby_display_rmp1 = props.globals.initNode("/controls/radio/rmp[0]/standby-display", "121.400", "STRING");
@@ -51,8 +51,8 @@ var am_mode_rmp3 = props.globals.initNode("/systems/radio/rmp[2]/am-active", 0,
var init = func() {
for(var i = 0; i < 3; i += 1) {
- setprop("/systems/radio/rmp[" ~ i ~ "]/hf1-standby", 510);
- setprop("/systems/radio/rmp[" ~ i ~ "]/hf2-standby", 891);
+ setprop("systems/radio/rmp[" ~ i ~ "]/hf1-standby", 510);
+ setprop("systems/radio/rmp[" ~ i ~ "]/hf2-standby", 891);
}
chan_rmp1.setValue("vhf1");
@@ -250,15 +250,15 @@ var update_chan_sel = func(rmp_no) {
var transfer = func(rmp_no) {
rmp_no = rmp_no - 1;
- var sel_chan = getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/sel_chan");
+ var sel_chan = getprop("systems/radio/rmp[" ~ rmp_no ~ "]/sel_chan");
if (string.match(sel_chan, "vhf[1-3]")) {
var mod1 = int(string.replace(sel_chan, "vhf", ""));
var mod = mod1 - 1;
- var mem = getprop("/instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz");
- setprop("/instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz", getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby"));
- setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby", mem);
+ var mem = getprop("instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz");
+ setprop("instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz", getprop("systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby"));
+ setprop("systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby", mem);
}
}
diff --git a/Nasal/Sim/buttons.nas b/Nasal/Sim/buttons.nas
index 8f344514..4a29c247 100644
--- a/Nasal/Sim/buttons.nas
+++ b/Nasal/Sim/buttons.nas
@@ -5,78 +5,78 @@
# Resets buttons to the default values
var variousReset = func {
- setprop("/modes/cpt-du-xfr", 0);
- setprop("/modes/fo-du-xfr", 0);
- setprop("/controls/fadec/n1mode1", 0);
- setprop("/controls/fadec/n1mode2", 0);
- setprop("/instrumentation/mk-viii/serviceable", 1);
- setprop("/instrumentation/mk-viii/inputs/discretes/terr-inhibit", 0);
- setprop("/instrumentation/mk-viii/inputs/discretes/gpws-inhibit", 0);
- setprop("/instrumentation/mk-viii/inputs/discretes/glideslope-cancel", 0);
- setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override", 0);
- setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 0);
- setprop("/controls/switches/cabinCall", 0);
- setprop("/controls/switches/mechCall", 0);
- setprop("/controls/switches/emer-lights", 0.5);
+ setprop("modes/cpt-du-xfr", 0);
+ setprop("modes/fo-du-xfr", 0);
+ setprop("controls/fadec/n1mode1", 0);
+ setprop("controls/fadec/n1mode2", 0);
+ setprop("instrumentation/mk-viii/serviceable", 1);
+ setprop("instrumentation/mk-viii/inputs/discretes/terr-inhibit", 0);
+ setprop("instrumentation/mk-viii/inputs/discretes/gpws-inhibit", 0);
+ setprop("instrumentation/mk-viii/inputs/discretes/glideslope-cancel", 0);
+ setprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override", 0);
+ setprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 0);
+ setprop("controls/switches/cabinCall", 0);
+ setprop("controls/switches/mechCall", 0);
+ setprop("controls/switches/emer-lights", 0.5);
# cockpit voice recorder stuff
- setprop("/controls/CVR/power", 0);
- setprop("/controls/CVR/test", 0);
- setprop("/controls/CVR/tone", 0);
- setprop("/controls/CVR/gndctl", 0);
- setprop("/controls/CVR/erase", 0);
- setprop("/controls/switches/cabinfan", 1);
- setprop("/controls/oxygen/crewOxyPB", 1); # 0 = OFF 1 = AUTO
- setprop("/controls/switches/emerCallLtO", 0); # ON light, flashes white for 10s
- setprop("/controls/switches/emerCallLtC", 0); # CALL light, flashes amber for 10s
- setprop("/controls/switches/emerCall", 0);
- setprop("/controls/switches/LrainRpt", 0);
- setprop("/controls/switches/RrainRpt", 0);
- setprop("/controls/switches/wiperLspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI
- setprop("/controls/switches/wiperRspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI
- setprop("/controls/lighting/strobe", 0);
- setprop("/controls/lighting/beacon", 0);
- setprop("/controls/switches/beacon", 0);
- setprop("/controls/switches/wing-lights", 0);
- setprop("/controls/switches/landing-lights-l", 0);
- setprop("/controls/switches/landing-lights-r", 0);
- setprop("/controls/lighting/wing-lights", 0);
- setprop("/controls/lighting/nav-lights-switch", 0);
- setprop("/controls/lighting/landing-lights[1]", 0);
- setprop("/controls/lighting/landing-lights[2]", 0);
- setprop("/controls/lighting/taxi-light-switch", 0);
- setprop("/controls/lighting/DU/du1", 1);
- setprop("/controls/lighting/DU/du2", 1);
- setprop("/controls/lighting/DU/du3", 1);
- setprop("/controls/lighting/DU/du4", 1);
- setprop("/controls/lighting/DU/du5", 1);
- setprop("/controls/lighting/DU/du6", 1);
- setprop("/controls/lighting/DU/mcdu1", 1);
- setprop("/controls/lighting/DU/mcdu2", 1);
- setprop("/modes/fcu/hdg-time", -45);
- setprop("/controls/switching/ATTHDG", 0);
- setprop("/controls/switching/AIRDATA", 0);
- setprop("/controls/switches/no-smoking-sign", 1);
- setprop("/controls/switches/seatbelt-sign", 1);
+ setprop("controls/CVR/power", 0);
+ setprop("controls/CVR/test", 0);
+ setprop("controls/CVR/tone", 0);
+ setprop("controls/CVR/gndctl", 0);
+ setprop("controls/CVR/erase", 0);
+ setprop("controls/switches/cabinfan", 1);
+ setprop("controls/oxygen/crewOxyPB", 1); # 0 = OFF 1 = AUTO
+ setprop("controls/switches/emerCallLtO", 0); # ON light, flashes white for 10s
+ setprop("controls/switches/emerCallLtC", 0); # CALL light, flashes amber for 10s
+ setprop("controls/switches/emerCall", 0);
+ setprop("controls/switches/LrainRpt", 0);
+ setprop("controls/switches/RrainRpt", 0);
+ setprop("controls/switches/wiperLspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI
+ setprop("controls/switches/wiperRspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI
+ setprop("controls/lighting/strobe", 0);
+ setprop("controls/lighting/beacon", 0);
+ setprop("controls/switches/beacon", 0);
+ setprop("controls/switches/wing-lights", 0);
+ setprop("controls/switches/landing-lights-l", 0);
+ setprop("controls/switches/landing-lights-r", 0);
+ setprop("controls/lighting/wing-lights", 0);
+ setprop("controls/lighting/nav-lights-switch", 0);
+ setprop("controls/lighting/landing-lights[1]", 0);
+ setprop("controls/lighting/landing-lights[2]", 0);
+ setprop("controls/lighting/taxi-light-switch", 0);
+ setprop("controls/lighting/DU/du1", 1);
+ setprop("controls/lighting/DU/du2", 1);
+ setprop("controls/lighting/DU/du3", 1);
+ setprop("controls/lighting/DU/du4", 1);
+ setprop("controls/lighting/DU/du5", 1);
+ setprop("controls/lighting/DU/du6", 1);
+ setprop("controls/lighting/DU/mcdu1", 1);
+ setprop("controls/lighting/DU/mcdu2", 1);
+ setprop("modes/fcu/hdg-time", -45);
+ setprop("controls/switching/ATTHDG", 0);
+ setprop("controls/switching/AIRDATA", 0);
+ setprop("controls/switches/no-smoking-sign", 1);
+ setprop("controls/switches/seatbelt-sign", 1);
}
var BUTTONS = {
init: func() {
- var stateL = getprop("/engines/engine[0]/state");
- var stateR = getprop("/engines/engine[1]/state");
- var Lrain = getprop("/controls/switches/LrainRpt");
- var Rrain = getprop("/controls/switches/RrainRpt");
- var OnLt = getprop("/controls/switches/emerCallLtO");
- var CallLt = getprop("/controls/switches/emerCallLtC");
- var EmerCall = getprop("/controls/switches/emerCall");
- var wow = getprop("/gear/gear[1]/wow");
- var wowr = getprop("/gear/gear[2]/wow");
- var gndCtl = getprop("/systems/CVR/gndctl");
- var acPwr = getprop("/systems/electrical/bus/ac-ess");
+ var stateL = getprop("engines/engine[0]/state");
+ var stateR = getprop("engines/engine[1]/state");
+ var Lrain = getprop("controls/switches/LrainRpt");
+ var Rrain = getprop("controls/switches/RrainRpt");
+ var OnLt = getprop("controls/switches/emerCallLtO");
+ var CallLt = getprop("controls/switches/emerCallLtC");
+ var EmerCall = getprop("controls/switches/emerCall");
+ var wow = getprop("gear/gear[1]/wow");
+ var wowr = getprop("gear/gear[2]/wow");
+ var gndCtl = getprop("systems/CVR/gndctl");
+ var acPwr = getprop("systems/electrical/bus/ac-ess");
},
update: func() {
rainRepel();
CVR_master();
- if (getprop("/controls/switches/emerCall")) {
+ if (getprop("controls/switches/emerCall")) {
EmerCallOnLight();
EmerCallLight();
}
@@ -84,78 +84,78 @@ var BUTTONS = {
};
var rainRepel = func() {
- Lrain = getprop("/controls/switches/LrainRpt");
- Rrain = getprop("/controls/switches/RrainRpt");
- wow = getprop("/gear/gear[1]/wow");
- stateL = getprop("/engines/engine[0]/state");
- stateR = getprop("/engines/engine[1]/state");
+ Lrain = getprop("controls/switches/LrainRpt");
+ Rrain = getprop("controls/switches/RrainRpt");
+ wow = getprop("gear/gear[1]/wow");
+ stateL = getprop("engines/engine[0]/state");
+ stateR = getprop("engines/engine[1]/state");
if (Lrain and (stateL != 3 and stateR != 3 and wow)) {
- setprop("/controls/switches/LrainRpt", 0);
+ setprop("controls/switches/LrainRpt", 0);
}
if (Rrain and (stateL != 3 and stateR != 3 and wow)) {
- setprop("/controls/switches/RrainRpt", 0);
+ setprop("controls/switches/RrainRpt", 0);
}
}
var EmerCallOnLight = func() {
- OnLt = getprop("/controls/switches/emerCallLtO");
- EmerCall = getprop("/controls/switches/emerCall");
+ OnLt = getprop("controls/switches/emerCallLtO");
+ EmerCall = getprop("controls/switches/emerCall");
if ((OnLt and EmerCall) or !EmerCall) {
- setprop("/controls/switches/emerCallLtO", 0);
+ setprop("controls/switches/emerCallLtO", 0);
} else if (!OnLt and EmerCall) {
- setprop("/controls/switches/emerCallLtO", 1);
+ setprop("controls/switches/emerCallLtO", 1);
}
}
var EmerCallLight = func() {
- CallLt = getprop("/controls/switches/emerCallLtC");
- EmerCall = getprop("/controls/switches/emerCall");
+ CallLt = getprop("controls/switches/emerCallLtC");
+ EmerCall = getprop("controls/switches/emerCall");
if ((CallLt and EmerCall) or !EmerCall) {
- setprop("/controls/switches/emerCallLtC", 0);
+ setprop("controls/switches/emerCallLtC", 0);
} else if (!CallLt and EmerCall) {
- setprop("/controls/switches/emerCallLtC", 1);
+ setprop("controls/switches/emerCallLtC", 1);
}
}
var CVR_master = func() {
- stateL = getprop("/engines/engine[0]/state");
- stateR = getprop("/engines/engine[1]/state");
- wow = getprop("/gear/gear[1]/wow");
- wowr = getprop("/gear/gear[2]/wow");
- gndCtl = getprop("/systems/CVR/gndctl");
- acPwr = getprop("/systems/electrical/bus/ac-ess");
+ stateL = getprop("engines/engine[0]/state");
+ stateR = getprop("engines/engine[1]/state");
+ wow = getprop("gear/gear[1]/wow");
+ wowr = getprop("gear/gear[2]/wow");
+ gndCtl = getprop("systems/CVR/gndctl");
+ acPwr = getprop("systems/electrical/bus/ac-ess");
if (acPwr > 0 and wow and wowr and (gndCtl or (stateL == 3 or stateR == 3))) {
- setprop("/controls/CVR/power", 1);
+ setprop("controls/CVR/power", 1);
} else if (!wow and !wowr and acPwr > 0) {
- setprop("/controls/CVR/power", 1);
+ setprop("controls/CVR/power", 1);
} else {
- setprop("/controls/CVR/power", 0);
+ setprop("controls/CVR/power", 0);
}
}
var EmerCall = func {
- setprop("/controls/switches/emerCall", 1);
+ setprop("controls/switches/emerCall", 1);
settimer(func() {
- setprop("/controls/switches/emerCall", 0);
+ setprop("controls/switches/emerCall", 0);
}, 10);
}
var CabinCall = func {
- setprop("/controls/switches/cabinCall", 0);
+ setprop("controls/switches/cabinCall", 0);
settimer(func() {
- setprop("/controls/switches/cabinCall", 0);
+ setprop("controls/switches/cabinCall", 0);
}, 15);
}
var MechCall = func {
- setprop("/controls/switches/mechCall", 1);
+ setprop("controls/switches/mechCall", 1);
settimer(func() {
- setprop("/controls/switches/mechCall", 0);
+ setprop("controls/switches/mechCall", 0);
}, 15);
}
var CVR_test = func {
- var parkBrake = getprop("/controls/gear/brake-parking");
+ var parkBrake = getprop("controls/gear/brake-parking");
if (parkBrake) {
setprop("controls/CVR/tone", 1);
settimer(func() {
@@ -165,7 +165,7 @@ var CVR_test = func {
}
setlistener("/controls/APU/master", func() {
- if (!getprop("/controls/APU/master") and systems.apuEmerShutdown.getBoolValue()) {
+ if (!getprop("controls/APU/master") and systems.apuEmerShutdown.getBoolValue()) {
systems.apuEmerShutdown.setBoolValue(0);
}
}, 0, 0);
\ No newline at end of file
diff --git a/Nasal/Sim/libraries.nas b/Nasal/Sim/libraries.nas
index b301d605..6995097d 100644
--- a/Nasal/Sim/libraries.nas
+++ b/Nasal/Sim/libraries.nas
@@ -7,64 +7,64 @@ print("-------------------------------------------------------------------------
print("Copyright (c) 2016-2019 Joshua Davidson (Octal450)");
print("-----------------------------------------------------------------------------");
-setprop("/sim/replay/was-active", 0);
+setprop("sim/replay/was-active", 0);
-setprop("/sim/menubar/default/menu[0]/item[0]/enabled", 0);
-setprop("/sim/menubar/default/menu[2]/item[0]/enabled", 0);
-setprop("/sim/menubar/default/menu[2]/item[2]/enabled", 0);
-setprop("/sim/menubar/default/menu[3]/enabled", 0);
-setprop("/sim/menubar/default/menu[5]/item[9]/enabled", 0);
-setprop("/sim/menubar/default/menu[5]/item[10]/enabled", 0);
-setprop("/sim/menubar/default/menu[5]/item[11]/enabled", 0);
+setprop("sim/menubar/default/menu[0]/item[0]/enabled", 0);
+setprop("sim/menubar/default/menu[2]/item[0]/enabled", 0);
+setprop("sim/menubar/default/menu[2]/item[2]/enabled", 0);
+setprop("sim/menubar/default/menu[3]/enabled", 0);
+setprop("sim/menubar/default/menu[5]/item[9]/enabled", 0);
+setprop("sim/menubar/default/menu[5]/item[10]/enabled", 0);
+setprop("sim/menubar/default/menu[5]/item[11]/enabled", 0);
# Dimmers
-setprop("/controls/lighting/ndl-norm", 1);
-setprop("/controls/lighting/ndr-norm", 1);
-setprop("/controls/lighting/upper-norm", 1);
+setprop("controls/lighting/ndl-norm", 1);
+setprop("controls/lighting/ndr-norm", 1);
+setprop("controls/lighting/upper-norm", 1);
# Lights
-setprop("/sim/model/lights/nose-lights", 0);
-setprop("/sim/model/lights/turnoffsw", 0);
-setprop("/controls/lighting/turnoff-light-switch", 0);
-setprop("/controls/lighting/leftturnoff", 0);
-setprop("/controls/lighting/rightturnoff", 0);
+setprop("sim/model/lights/nose-lights", 0);
+setprop("sim/model/lights/turnoffsw", 0);
+setprop("controls/lighting/turnoff-light-switch", 0);
+setprop("controls/lighting/leftturnoff", 0);
+setprop("controls/lighting/rightturnoff", 0);
# Oil Qty
var qty1 = math.round((rand() * 5 ) + 20, 0.1);
var qty2 = math.round((rand() * 5 ) + 20, 0.1);
-setprop("/engines/engine[0]/oil-qt-actual", qty1);
-setprop("/engines/engine[1]/oil-qt-actual", qty2);
+setprop("engines/engine[0]/oil-qt-actual", qty1);
+setprop("engines/engine[1]/oil-qt-actual", qty2);
##########
# Lights #
##########
-var beacon_switch = props.globals.getNode("/controls/switches/beacon", 1);
-var beacon_ctl = props.globals.getNode("/controls/lighting/beacon", 1);
+var beacon_switch = props.globals.getNode("controls/switches/beacon", 1);
+var beacon_ctl = props.globals.getNode("controls/lighting/beacon", 1);
var beacon = aircraft.light.new("/sim/model/lights/beacon", [0.1, 1], "/controls/lighting/beacon");
-var strobe_switch = props.globals.getNode("/controls/switches/strobe", 1);
-var strobe_light = props.globals.getNode("/controls/lighting/strobe", 1);
+var strobe_switch = props.globals.getNode("controls/switches/strobe", 1);
+var strobe_light = props.globals.getNode("controls/lighting/strobe", 1);
var strobe = aircraft.light.new("/sim/model/lights/strobe", [0.05, 0.06, 0.05, 1], "/controls/lighting/strobe");
var tail_strobe = aircraft.light.new("/sim/model/lights/tailstrobe", [0.1, 1], "/controls/lighting/strobe");
-var logo_lights = getprop("/sim/model/lights/logo-lights");
-var nav_lights = props.globals.getNode("/sim/model/lights/nav-lights");
-var wing_switch = props.globals.getNode("/controls/switches/wing-lights", 1);
-var wing_ctl = props.globals.getNode("/controls/lighting/wing-lights", 1);
+var logo_lights = getprop("sim/model/lights/logo-lights");
+var nav_lights = props.globals.getNode("sim/model/lights/nav-lights");
+var wing_switch = props.globals.getNode("controls/switches/wing-lights", 1);
+var wing_ctl = props.globals.getNode("controls/lighting/wing-lights", 1);
var dome_light = props.globals.initNode("/sim/model/lights/dome-light", 0.0, "DOUBLE");
-var wow = getprop("/gear/gear[2]/wow");
-var slats = getprop("/controls/flight/slats");
-var gear = getprop("/gear/gear[0]/position-norm");
-var nose_lights = getprop("/sim/model/lights/nose-lights");
-var left_turnoff_light = props.globals.getNode("/controls/lighting/leftturnoff");
-var right_turnoff_light = props.globals.getNode("/controls/lighting/rightturnoff");
-var settingT = getprop("/controls/lighting/taxi-light-switch");
-var settingTurnoff = getprop("/controls/lighting/turnoff-light-switch");
-var setting = getprop("/controls/lighting/nav-lights-switch");
-var domeSetting = getprop("/controls/lighting/dome-norm");
+var wow = getprop("gear/gear[2]/wow");
+var slats = getprop("controls/flight/slats");
+var gear = getprop("gear/gear[0]/position-norm");
+var nose_lights = getprop("sim/model/lights/nose-lights");
+var left_turnoff_light = props.globals.getNode("controls/lighting/leftturnoff");
+var right_turnoff_light = props.globals.getNode("controls/lighting/rightturnoff");
+var settingT = getprop("controls/lighting/taxi-light-switch");
+var settingTurnoff = getprop("controls/lighting/turnoff-light-switch");
+var setting = getprop("controls/lighting/nav-lights-switch");
+var domeSetting = getprop("controls/lighting/dome-norm");
var landL = props.globals.getNode("controls/lighting/landing-lights[1]", 1);
var landR = props.globals.getNode("controls/lighting/landing-lights[2]", 1);
-var landlSw = props.globals.getNode("/controls/switches/landing-lights-l", 1);
-var landrSw = props.globals.getNode("/controls/switches/landing-lights-r", 1);
+var landlSw = props.globals.getNode("controls/switches/landing-lights-l", 1);
+var landrSw = props.globals.getNode("controls/switches/landing-lights-r", 1);
###################
# Tire Smoke/Rain #
@@ -78,74 +78,74 @@ aircraft.rain.init();
##########
setlistener("/sim/sounde/btn1", func {
- if (!getprop("/sim/sounde/btn1")) {
+ if (!getprop("sim/sounde/btn1")) {
return;
}
settimer(func {
- props.globals.getNode("/sim/sounde/btn1").setBoolValue(0);
+ props.globals.getNode("sim/sounde/btn1").setBoolValue(0);
}, 0.05);
});
setlistener("/sim/sounde/oh-btn", func {
- if (!getprop("/sim/sounde/oh-btn")) {
+ if (!getprop("sim/sounde/oh-btn")) {
return;
}
settimer(func {
- props.globals.getNode("/sim/sounde/oh-btn").setBoolValue(0);
+ props.globals.getNode("sim/sounde/oh-btn").setBoolValue(0);
}, 0.05);
});
setlistener("/sim/sounde/btn3", func {
- if (!getprop("/sim/sounde/btn3")) {
+ if (!getprop("sim/sounde/btn3")) {
return;
}
settimer(func {
- props.globals.getNode("/sim/sounde/btn3").setBoolValue(0);
+ props.globals.getNode("sim/sounde/btn3").setBoolValue(0);
}, 0.05);
});
setlistener("/sim/sounde/knb1", func {
- if (!getprop("/sim/sounde/knb1")) {
+ if (!getprop("sim/sounde/knb1")) {
return;
}
settimer(func {
- props.globals.getNode("/sim/sounde/knb1").setBoolValue(0);
+ props.globals.getNode("sim/sounde/knb1").setBoolValue(0);
}, 0.05);
});
setlistener("/sim/sounde/switch1", func {
- if (!getprop("/sim/sounde/switch1")) {
+ if (!getprop("sim/sounde/switch1")) {
return;
}
settimer(func {
- props.globals.getNode("/sim/sounde/switch1").setBoolValue(0);
+ props.globals.getNode("sim/sounde/switch1").setBoolValue(0);
}, 0.05);
});
setlistener("/controls/lighting/seatbelt-sign", func {
- props.globals.getNode("/sim/sounde/seatbelt-sign").setBoolValue(1);
+ props.globals.getNode("sim/sounde/seatbelt-sign").setBoolValue(1);
settimer(func {
- props.globals.getNode("/sim/sounde/seatbelt-sign").setBoolValue(0);
+ props.globals.getNode("sim/sounde/seatbelt-sign").setBoolValue(0);
}, 2);
}, 0, 0);
setlistener("/controls/lighting/no-smoking-sign", func {
- props.globals.getNode("/sim/sounde/no-smoking-sign").setBoolValue(1);
+ props.globals.getNode("sim/sounde/no-smoking-sign").setBoolValue(1);
settimer(func {
- props.globals.getNode("/sim/sounde/no-smoking-sign").setBoolValue(0);
+ props.globals.getNode("sim/sounde/no-smoking-sign").setBoolValue(0);
}, 1);
}, 0, 0);
setlistener("/controls/flight/flap-lever", func {
- props.globals.getNode("/sim/sounde/flaps-click").setBoolValue(1);
+ props.globals.getNode("sim/sounde/flaps-click").setBoolValue(1);
}, 0, 0);
setlistener("/sim/sounde/flaps-click", func {
- if (!getprop("/sim/sounde/flaps-click")) {
+ if (!getprop("sim/sounde/flaps-click")) {
return;
}
settimer(func {
- props.globals.getNode("/sim/sounde/flaps-click").setBoolValue(0);
+ props.globals.getNode("sim/sounde/flaps-click").setBoolValue(0);
}, 0.4);
});
#########
@@ -176,11 +176,11 @@ var armrests = aircraft.door.new("/sim/model/door-positions/armrests", 2);
# door opener/closer
var triggerDoor = func(door, doorName, doorDesc) {
- if (getprop("/sim/model/door-positions/" ~ doorName ~ "/position-norm") > 0) {
+ if (getprop("sim/model/door-positions/" ~ doorName ~ "/position-norm") > 0) {
gui.popupTip("Closing " ~ doorDesc ~ " door");
door.toggle();
} else {
- if (getprop("/velocities/groundspeed-kt") > 5) {
+ if (getprop("velocities/groundspeed-kt") > 5) {
gui.popupTip("You cannot open the doors while the aircraft is moving!");
} else {
gui.popupTip("Opening " ~ doorDesc ~ " door");
@@ -241,56 +241,56 @@ var systemsLoop = maketimer(0.1, func {
fcu.FCUController.loop();
dmc.DMController.loop();
- if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/electrical/ground-cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or (getprop("/controls/gear/brake-parking") == 0 and getprop("/services/chocks/nose") == 0 and getprop("/services/chocks/left") == 0 and getprop("/services/chocks/right") == 0))) {
- setprop("/controls/electrical/ground-cart", 0);
- setprop("/controls/pneumatic/switches/groundair", 0);
+ if ((getprop("controls/pneumatic/switches/groundair") or getprop("controls/electrical/ground-cart")) and ((getprop("velocities/groundspeed-kt") > 2) or (getprop("controls/gear/brake-parking") == 0 and getprop("services/chocks/nose") == 0 and getprop("services/chocks/left") == 0 and getprop("services/chocks/right") == 0))) {
+ setprop("controls/electrical/ground-cart", 0);
+ setprop("controls/pneumatic/switches/groundair", 0);
}
- if (getprop("/velocities/groundspeed-kt") > 15) {
- setprop("/systems/shake/effect", 1);
+ if (getprop("velocities/groundspeed-kt") > 15) {
+ setprop("systems/shake/effect", 1);
} else {
- setprop("/systems/shake/effect", 0);
+ setprop("systems/shake/effect", 0);
}
- if (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 or (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1 and getprop("/controls/flight/flap-pos") >= 4)) {
- setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 1);
+ if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 or (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1 and getprop("controls/flight/flap-pos") >= 4)) {
+ setprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 1);
} else {
- setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 0);
+ setprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 0);
}
- if (getprop("/instrumentation/mk-viii/inputs/discretes/gpws-inhibit") == 1) {
- setprop("/instrumentation/mk-viii/speaker/volume", 0);
+ if (getprop("instrumentation/mk-viii/inputs/discretes/gpws-inhibit") == 1) {
+ setprop("instrumentation/mk-viii/speaker/volume", 0);
} else {
- setprop("/instrumentation/mk-viii/speaker/volume", 2);
+ setprop("instrumentation/mk-viii/speaker/volume", 2);
}
- if (getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") == 3) {
- setprop("/engines/ready", 1);
+ if (getprop("engines/engine[0]/state") == 3 and getprop("engines/engine[1]/state") == 3) {
+ setprop("engines/ready", 1);
} else {
- setprop("/engines/ready", 0);
+ setprop("engines/ready", 0);
}
- if ((getprop("/engines/engine[0]/state") == 2 or getprop("/engines/engine[0]/state") == 3) and getprop("/fdm/jsbsim/propulsion/tank[5]/contents-lbs") < 1) {
+ if ((getprop("engines/engine[0]/state") == 2 or getprop("engines/engine[0]/state") == 3) and getprop("fdm/jsbsim/propulsion/tank[5]/contents-lbs") < 1) {
systems.cutoff_one();
}
- if ((getprop("/engines/engine[1]/state") == 2 or getprop("/engines/engine[1]/state") == 3) and getprop("/fdm/jsbsim/propulsion/tank[6]/contents-lbs") < 1) {
+ if ((getprop("engines/engine[1]/state") == 2 or getprop("engines/engine[1]/state") == 3) and getprop("fdm/jsbsim/propulsion/tank[6]/contents-lbs") < 1) {
systems.cutoff_two();
}
- if (getprop("/sim/replay/replay-state") == 1) {
- setprop("/sim/replay/was-active", 1);
- } else if (getprop("/sim/replay/replay-state") == 0 and getprop("/sim/replay/was-active") == 1) {
- setprop("/sim/replay/was-active", 0);
+ if (getprop("sim/replay/replay-state") == 1) {
+ setprop("sim/replay/was-active", 1);
+ } else if (getprop("sim/replay/replay-state") == 0 and getprop("sim/replay/was-active") == 1) {
+ setprop("sim/replay/was-active", 0);
acconfig.colddark();
gui.popupTip("Replay Ended: Setting Cold and Dark state...");
}
});
setlistener("/options/steep-ils", func {
- if (getprop("/options/steep-ils") == 1) {
- setprop("/instrumentation/mk-viii/inputs/discretes/steep-approach", 1);
+ if (getprop("options/steep-ils") == 1) {
+ setprop("instrumentation/mk-viii/inputs/discretes/steep-approach", 1);
} else {
- setprop("/instrumentation/mk-viii/inputs/discretes/steep-approach", 0);
+ setprop("instrumentation/mk-viii/inputs/discretes/steep-approach", 0);
}
});
@@ -320,96 +320,96 @@ canvas.Element.setVisible = func(vis) {
# In air, flaps 1 is slats only. On ground, it is slats and flaps.
-setprop("/controls/flight/flap-lever", 0);
-setprop("/controls/flight/flap-pos", 0);
-setprop("/controls/flight/flap-txt", " ");
+setprop("controls/flight/flap-lever", 0);
+setprop("controls/flight/flap-pos", 0);
+setprop("controls/flight/flap-txt", " ");
controls.flapsDown = func(step) {
if (step == 1) {
- if (getprop("/controls/flight/flap-lever") == 0) {
- if (getprop("/velocities/airspeed-kt") <= 100) {
- setprop("/controls/flight/flaps", 0.2857);
- setprop("/controls/flight/slats", 0.6666);
- setprop("/controls/flight/flap-lever", 1);
- setprop("/controls/flight/flap-pos", 2);
- setprop("/controls/flight/flap-txt", "1+F");
+ if (getprop("controls/flight/flap-lever") == 0) {
+ if (getprop("velocities/airspeed-kt") <= 100) {
+ setprop("controls/flight/flaps", 0.2857);
+ setprop("controls/flight/slats", 0.6666);
+ setprop("controls/flight/flap-lever", 1);
+ setprop("controls/flight/flap-pos", 2);
+ setprop("controls/flight/flap-txt", "1+F");
flaptimer.start();
return;
} else {
- setprop("/controls/flight/flaps", 0.000);
- setprop("/controls/flight/slats", 0.6666);
- setprop("/controls/flight/flap-lever", 1);
- setprop("/controls/flight/flap-pos", 1);
- setprop("/controls/flight/flap-txt", "1");
+ setprop("controls/flight/flaps", 0.000);
+ setprop("controls/flight/slats", 0.6666);
+ setprop("controls/flight/flap-lever", 1);
+ setprop("controls/flight/flap-pos", 1);
+ setprop("controls/flight/flap-txt", "1");
flaptimer.stop();
return;
}
- } else if (getprop("/controls/flight/flap-lever") == 1) {
- setprop("/controls/flight/flaps", 0.4286);
- setprop("/controls/flight/slats", 0.8148);
- setprop("/controls/flight/flap-lever", 2);
- setprop("/controls/flight/flap-pos", 3);
- setprop("/controls/flight/flap-txt", "2");
+ } else if (getprop("controls/flight/flap-lever") == 1) {
+ setprop("controls/flight/flaps", 0.4286);
+ setprop("controls/flight/slats", 0.8148);
+ setprop("controls/flight/flap-lever", 2);
+ setprop("controls/flight/flap-pos", 3);
+ setprop("controls/flight/flap-txt", "2");
flaptimer.stop();
return;
- } else if (getprop("/controls/flight/flap-lever") == 2) {
- setprop("/controls/flight/flaps", 0.5714);
- setprop("/controls/flight/slats", 0.8148);
- setprop("/controls/flight/flap-lever", 3);
- setprop("/controls/flight/flap-pos", 4);
- setprop("/controls/flight/flap-txt", "3");
+ } else if (getprop("controls/flight/flap-lever") == 2) {
+ setprop("controls/flight/flaps", 0.5714);
+ setprop("controls/flight/slats", 0.8148);
+ setprop("controls/flight/flap-lever", 3);
+ setprop("controls/flight/flap-pos", 4);
+ setprop("controls/flight/flap-txt", "3");
flaptimer.stop();
return;
- } else if (getprop("/controls/flight/flap-lever") == 3) {
- setprop("/controls/flight/flaps", 1.000);
- setprop("/controls/flight/slats", 1.000);
- setprop("/controls/flight/flap-lever", 4);
- setprop("/controls/flight/flap-pos", 5);
- setprop("/controls/flight/flap-txt", "FULL");
+ } else if (getprop("controls/flight/flap-lever") == 3) {
+ setprop("controls/flight/flaps", 1.000);
+ setprop("controls/flight/slats", 1.000);
+ setprop("controls/flight/flap-lever", 4);
+ setprop("controls/flight/flap-pos", 5);
+ setprop("controls/flight/flap-txt", "FULL");
flaptimer.stop();
return;
}
} else if (step == -1) {
- if (getprop("/controls/flight/flap-lever") == 4) {
- setprop("/controls/flight/flaps", 0.5714);
- setprop("/controls/flight/slats", 0.8148);
- setprop("/controls/flight/flap-lever", 3);
- setprop("/controls/flight/flap-pos", 4);
- setprop("/controls/flight/flap-txt", "3");
+ if (getprop("controls/flight/flap-lever") == 4) {
+ setprop("controls/flight/flaps", 0.5714);
+ setprop("controls/flight/slats", 0.8148);
+ setprop("controls/flight/flap-lever", 3);
+ setprop("controls/flight/flap-pos", 4);
+ setprop("controls/flight/flap-txt", "3");
flaptimer.stop();
return;
- } else if (getprop("/controls/flight/flap-lever") == 3) {
- setprop("/controls/flight/flaps", 0.4286);
- setprop("/controls/flight/slats", 0.8148);
- setprop("/controls/flight/flap-lever", 2);
- setprop("/controls/flight/flap-pos", 3);
- setprop("/controls/flight/flap-txt", "2");
+ } else if (getprop("controls/flight/flap-lever") == 3) {
+ setprop("controls/flight/flaps", 0.4286);
+ setprop("controls/flight/slats", 0.8148);
+ setprop("controls/flight/flap-lever", 2);
+ setprop("controls/flight/flap-pos", 3);
+ setprop("controls/flight/flap-txt", "2");
flaptimer.stop();
return;
- } else if (getprop("/controls/flight/flap-lever") == 2) {
- if (getprop("/velocities/airspeed-kt") <= 100) {
- setprop("/controls/flight/flaps", 0.2857);
- setprop("/controls/flight/slats", 0.6666);
- setprop("/controls/flight/flap-lever", 1);
- setprop("/controls/flight/flap-pos", 2);
- setprop("/controls/flight/flap-txt", "1+F");
+ } else if (getprop("controls/flight/flap-lever") == 2) {
+ if (getprop("velocities/airspeed-kt") <= 100) {
+ setprop("controls/flight/flaps", 0.2857);
+ setprop("controls/flight/slats", 0.6666);
+ setprop("controls/flight/flap-lever", 1);
+ setprop("controls/flight/flap-pos", 2);
+ setprop("controls/flight/flap-txt", "1+F");
flaptimer.start();
return;
} else {
- setprop("/controls/flight/flaps", 0.000);
- setprop("/controls/flight/slats", 0.6666);
- setprop("/controls/flight/flap-lever", 1);
- setprop("/controls/flight/flap-pos", 1);
- setprop("/controls/flight/flap-txt", "1");
+ setprop("controls/flight/flaps", 0.000);
+ setprop("controls/flight/slats", 0.6666);
+ setprop("controls/flight/flap-lever", 1);
+ setprop("controls/flight/flap-pos", 1);
+ setprop("controls/flight/flap-txt", "1");
flaptimer.stop();
return;
}
- } else if (getprop("/controls/flight/flap-lever") == 1) {
- setprop("/controls/flight/flaps", 0.000);
- setprop("/controls/flight/slats", 0.000);
- setprop("/controls/flight/flap-lever", 0);
- setprop("/controls/flight/flap-pos", 0);
- setprop("/controls/flight/flap-txt", " ");
+ } else if (getprop("controls/flight/flap-lever") == 1) {
+ setprop("controls/flight/flaps", 0.000);
+ setprop("controls/flight/slats", 0.000);
+ setprop("controls/flight/flap-lever", 0);
+ setprop("controls/flight/flap-pos", 0);
+ setprop("controls/flight/flap-txt", " ");
flaptimer.stop();
return;
}
@@ -419,18 +419,18 @@ controls.flapsDown = func(step) {
}
var flaptimer = maketimer(0.5, func {
- if (getprop("/controls/flight/flap-pos") == 2 and getprop("/velocities/airspeed-kt") >= 208) {
- setprop("/controls/flight/flaps", 0.000);
- setprop("/controls/flight/slats", 0.666);
- setprop("/controls/flight/flap-lever", 1);
- setprop("/controls/flight/flap-pos", 1);
- setprop("/controls/flight/flap-txt", "1");
+ if (getprop("controls/flight/flap-pos") == 2 and getprop("velocities/airspeed-kt") >= 208) {
+ setprop("controls/flight/flaps", 0.000);
+ setprop("controls/flight/slats", 0.666);
+ setprop("controls/flight/flap-lever", 1);
+ setprop("controls/flight/flap-pos", 1);
+ setprop("controls/flight/flap-txt", "1");
flaptimer.stop();
}
});
controls.stepSpoilers = func(step) {
- setprop("/controls/flight/speedbrake-arm", 0);
+ setprop("controls/flight/speedbrake-arm", 0);
if (step == 1) {
deploySpeedbrake();
} else if (step == -1) {
@@ -439,100 +439,100 @@ controls.stepSpoilers = func(step) {
}
var deploySpeedbrake = func {
- if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
- if (getprop("/controls/flight/speedbrake") < 1.0) {
- setprop("/controls/flight/speedbrake", 1.0);
+ if (getprop("gear/gear[1]/wow") == 1 or getprop("gear/gear[2]/wow") == 1) {
+ if (getprop("controls/flight/speedbrake") < 1.0) {
+ setprop("controls/flight/speedbrake", 1.0);
}
} else {
- if (getprop("/controls/flight/speedbrake") < 0.5) {
- setprop("/controls/flight/speedbrake", 0.5);
- } else if (getprop("/controls/flight/speedbrake") < 1.0) {
- setprop("/controls/flight/speedbrake", 1.0);
+ if (getprop("controls/flight/speedbrake") < 0.5) {
+ setprop("controls/flight/speedbrake", 0.5);
+ } else if (getprop("controls/flight/speedbrake") < 1.0) {
+ setprop("controls/flight/speedbrake", 1.0);
}
}
}
var retractSpeedbrake = func {
- if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
- if (getprop("/controls/flight/speedbrake") > 0.0) {
- setprop("/controls/flight/speedbrake", 0.0);
+ if (getprop("gear/gear[1]/wow") == 1 or getprop("gear/gear[2]/wow") == 1) {
+ if (getprop("controls/flight/speedbrake") > 0.0) {
+ setprop("controls/flight/speedbrake", 0.0);
}
} else {
- if (getprop("/controls/flight/speedbrake") > 0.5) {
- setprop("/controls/flight/speedbrake", 0.5);
- } else if (getprop("/controls/flight/speedbrake") > 0.0) {
- setprop("/controls/flight/speedbrake", 0.0);
+ if (getprop("controls/flight/speedbrake") > 0.5) {
+ setprop("controls/flight/speedbrake", 0.5);
+ } else if (getprop("controls/flight/speedbrake") > 0.0) {
+ setprop("controls/flight/speedbrake", 0.0);
}
}
}
var slewProp = func(prop, delta) {
- delta *= getprop("/sim/time/delta-realtime-sec");
+ delta *= getprop("sim/time/delta-realtime-sec");
setprop(prop, getprop(prop) + delta);
return getprop(prop);
}
controls.elevatorTrim = func(speed) {
- if (getprop("/systems/hydraulic/green-psi") >= 1500) {
+ if (getprop("systems/hydraulic/green-psi") >= 1500) {
slewProp("/controls/flight/elevator-trim", speed * 0.045);
}
}
setlistener("/controls/flight/elevator-trim", func {
- if (getprop("/controls/flight/elevator-trim") > 0.32) {
- setprop("/controls/flight/elevator-trim", 0.32);
+ if (getprop("controls/flight/elevator-trim") > 0.32) {
+ setprop("controls/flight/elevator-trim", 0.32);
}
});
var lightsLoop = maketimer(0.2, func {
- gear = getprop("/gear/gear[0]/position-norm");
- nose_lights = getprop("/sim/model/lights/nose-lights");
- settingT = getprop("/controls/lighting/taxi-light-switch");
- domeSetting = getprop("/controls/lighting/dome-norm");
+ gear = getprop("gear/gear[0]/position-norm");
+ nose_lights = getprop("sim/model/lights/nose-lights");
+ settingT = getprop("controls/lighting/taxi-light-switch");
+ domeSetting = getprop("controls/lighting/dome-norm");
# nose lights
- if (settingT == 0.5 and gear > 0.9 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) {
- setprop("/sim/model/lights/nose-lights", 0.85);
- } else if (settingT == 1 and gear > 0.9 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) {
- setprop("/sim/model/lights/nose-lights", 1);
+ if (settingT == 0.5 and gear > 0.9 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) {
+ setprop("sim/model/lights/nose-lights", 0.85);
+ } else if (settingT == 1 and gear > 0.9 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) {
+ setprop("sim/model/lights/nose-lights", 1);
} else {
- setprop("/sim/model/lights/nose-lights", 0);
+ setprop("sim/model/lights/nose-lights", 0);
}
# turnoff lights
- settingTurnoff = getprop("/controls/lighting/turnoff-light-switch");
- left_turnoff_light = props.globals.getNode("/controls/lighting/leftturnoff");
- right_turnoff_light = props.globals.getNode("/controls/lighting/rightturnoff");
+ settingTurnoff = getprop("controls/lighting/turnoff-light-switch");
+ left_turnoff_light = props.globals.getNode("controls/lighting/leftturnoff");
+ right_turnoff_light = props.globals.getNode("controls/lighting/rightturnoff");
- if (settingTurnoff == 1 and gear > 0.9 and getprop("/systems/electrical/bus/ac-1") > 0) {
+ if (settingTurnoff == 1 and gear > 0.9 and getprop("systems/electrical/bus/ac-1") > 0) {
left_turnoff_light.setBoolValue(1);
} else {
left_turnoff_light.setBoolValue(0);
}
- if (settingTurnoff == 1 and gear > 0.9 and getprop("/systems/electrical/bus/ac-2") > 0) {
+ if (settingTurnoff == 1 and gear > 0.9 and getprop("systems/electrical/bus/ac-2") > 0) {
right_turnoff_light.setBoolValue(1);
} else {
right_turnoff_light.setBoolValue(0);
}
# logo and navigation lights
- setting = getprop("/controls/lighting/nav-lights-switch");
- nav_lights = props.globals.getNode("/sim/model/lights/nav-lights");
- logo_lights = props.globals.getNode("/sim/model/lights/logo-lights");
- wow = getprop("/gear/gear[2]/wow");
- slats = getprop("/controls/flight/slats");
+ setting = getprop("controls/lighting/nav-lights-switch");
+ nav_lights = props.globals.getNode("sim/model/lights/nav-lights");
+ logo_lights = props.globals.getNode("sim/model/lights/logo-lights");
+ wow = getprop("gear/gear[2]/wow");
+ slats = getprop("controls/flight/slats");
- if (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0 or getprop("/systems/electrical/bus/dc-1") > 0 or getprop("/systems/electrical/bus/dc-2") > 0) {
- setprop("/systems/electrical/nav-lights-power", 1);
+ if (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0 or getprop("systems/electrical/bus/dc-1") > 0 or getprop("systems/electrical/bus/dc-2") > 0) {
+ setprop("systems/electrical/nav-lights-power", 1);
} else {
- setprop("/systems/electrical/nav-lights-power", 0);
+ setprop("systems/electrical/nav-lights-power", 0);
}
if (setting == 0 and logo_lights == 1) {
logo_lights.setBoolValue(0);
- } else if (setting == 1 or setting == 2 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) {
+ } else if (setting == 1 or setting == 2 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) {
if ((wow) or (!wow and slats > 0)) {
logo_lights.setBoolValue(1);
} else {
@@ -542,15 +542,15 @@ var lightsLoop = maketimer(0.2, func {
logo_lights.setBoolValue(0);
}
- if (setting == 1 or setting == 2 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0 or getprop("/systems/electrical/bus/dc-1") > 0 or getprop("/systems/electrical/bus/dc-2") > 0)) {
+ if (setting == 1 or setting == 2 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0 or getprop("systems/electrical/bus/dc-1") > 0 or getprop("systems/electrical/bus/dc-2") > 0)) {
nav_lights.setBoolValue(1);
} else {
nav_lights.setBoolValue(0);
}
- if (domeSetting == 0.5 and getprop("/systems/electrical/bus/dc-ess") > 0) {
+ if (domeSetting == 0.5 and getprop("systems/electrical/bus/dc-ess") > 0) {
dome_light.setValue(0.5);
- } elsif (domeSetting == 1 and getprop("/systems/electrical/bus/dc-ess") > 0) {
+ } elsif (domeSetting == 1 and getprop("systems/electrical/bus/dc-ess") > 0) {
dome_light.setValue(1);
} else {
dome_light.setValue(0);
@@ -559,9 +559,9 @@ var lightsLoop = maketimer(0.2, func {
# strobe
strobe_sw = strobe_switch.getValue();
- if (strobe_sw == 1 and getprop("/systems/electrical/bus/ac-2") > 0) {
+ if (strobe_sw == 1 and getprop("systems/electrical/bus/ac-2") > 0) {
strobe_light.setValue(1);
- } elsif (strobe_sw == 0.5 and getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and getprop("/systems/electrical/bus/ac-2") > 0) {
+ } elsif (strobe_sw == 0.5 and getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0 and getprop("systems/electrical/bus/ac-2") > 0) {
# todo: use lgciu output 5
strobe_light.setValue(1);
} else {
@@ -570,7 +570,7 @@ var lightsLoop = maketimer(0.2, func {
# beacon
- if (beacon_switch.getValue() == 1 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) {
+ if (beacon_switch.getValue() == 1 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) {
beacon_ctl.setValue(1);
} else {
beacon_ctl.setValue(0);
@@ -578,7 +578,7 @@ var lightsLoop = maketimer(0.2, func {
# wing
- if (wing_switch.getValue() == 1 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) {
+ if (wing_switch.getValue() == 1 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) {
wing_ctl.setValue(1);
} else {
wing_ctl.setValue(0);
@@ -586,13 +586,13 @@ var lightsLoop = maketimer(0.2, func {
# landL
- if (landlSw.getValue() == 1 and getprop("/systems/electrical/bus/ac-1") > 0) {
+ if (landlSw.getValue() == 1 and getprop("systems/electrical/bus/ac-1") > 0) {
landL.setValue(1);
} else {
landL.setValue(0);
}
- if (landrSw.getValue() == 1 and getprop("/systems/electrical/bus/ac-2") > 0) {
+ if (landrSw.getValue() == 1 and getprop("systems/electrical/bus/ac-2") > 0) {
landR.setValue(1);
} else {
landR.setValue(0);
@@ -600,48 +600,48 @@ var lightsLoop = maketimer(0.2, func {
# signs
- if (getprop("/systems/pressurization/cabinalt-norm") > 11300) {
- setprop("/controls/lighting/seatbelt-sign", 1);
- setprop("/controls/lighting/no-smoking-sign", 1);
+ if (getprop("systems/pressurization/cabinalt-norm") > 11300) {
+ setprop("controls/lighting/seatbelt-sign", 1);
+ setprop("controls/lighting/no-smoking-sign", 1);
} else {
if (getprop("controls/switches/seatbelt-sign") == 1) {
- if (getprop("/controls/lighting/seatbelt-sign") == 0) {
- setprop("/controls/lighting/seatbelt-sign", 1);
+ if (getprop("controls/lighting/seatbelt-sign") == 0) {
+ setprop("controls/lighting/seatbelt-sign", 1);
}
} elsif (getprop("controls/switches/seatbelt-sign") == 0) {
- if (getprop("/controls/lighting/seatbelt-sign") == 1) {
- setprop("/controls/lighting/seatbelt-sign", 0);
+ if (getprop("controls/lighting/seatbelt-sign") == 1) {
+ setprop("controls/lighting/seatbelt-sign", 0);
}
}
if (getprop("controls/switches/no-smoking-sign") == 1) {
- if (getprop("/controls/lighting/no-smoking-sign") == 0) {
- setprop("/controls/lighting/no-smoking-sign", 1);
+ if (getprop("controls/lighting/no-smoking-sign") == 0) {
+ setprop("controls/lighting/no-smoking-sign", 1);
}
} elsif (getprop("controls/switches/no-smoking-sign") == 0.5 and getprop("gear/gear[0]/position-norm") != 0) { # todo: should be when uplocks not engaged
- if (getprop("/controls/lighting/no-smoking-sign") == 0) {
- setprop("/controls/lighting/no-smoking-sign", 1);
+ if (getprop("controls/lighting/no-smoking-sign") == 0) {
+ setprop("controls/lighting/no-smoking-sign", 1);
}
} else {
- setprop("/controls/lighting/no-smoking-sign", 0); # sign stays on in cabin but sound still occurs
+ setprop("controls/lighting/no-smoking-sign", 0); # sign stays on in cabin but sound still occurs
}
}
if (getprop("controls/lighting/landing-lights[1]") >= 0.5) {
- setprop("/fdm/jsbsim/rubbish/landL", 1);
+ setprop("fdm/jsbsim/rubbish/landL", 1);
} else {
- setprop("/fdm/jsbsim/rubbish/landL", 0);
+ setprop("fdm/jsbsim/rubbish/landL", 0);
}
if (getprop("controls/lighting/landing-lights[2]") >= 0.5) {
- setprop("/fdm/jsbsim/rubbish/landR", 1);
+ setprop("fdm/jsbsim/rubbish/landR", 1);
} else {
- setprop("/fdm/jsbsim/rubbish/landR", 0);
+ setprop("fdm/jsbsim/rubbish/landR", 0);
}
});
var lTray = func {
- var lTrayCMD = getprop("/controls/tray/lefttrayext");
+ var lTrayCMD = getprop("controls/tray/lefttrayext");
if (lTrayCMD < 0.5) {
interpolate("/controls/tray/lefttrayext", 0.5, 0.5);
} else if (lTrayCMD == 0.5) {
@@ -652,7 +652,7 @@ var lTray = func {
}
var rTray = func {
- var rTrayCMD = getprop("/controls/tray/righttrayext");
+ var rTrayCMD = getprop("controls/tray/righttrayext");
if (rTrayCMD < 0.5) {
interpolate("/controls/tray/righttrayext", 0.5, 0.5);
} else if (rTrayCMD == 0.5) {
@@ -663,7 +663,7 @@ var rTray = func {
}
var l1Pedal = func {
- var lPedalCMD = getprop("/controls/footrest-cpt[0]");
+ var lPedalCMD = getprop("controls/footrest-cpt[0]");
if (lPedalCMD < 1.0) {
interpolate("/controls/footrest-cpt[0]", 1.0, 0.5);
} else {
@@ -672,7 +672,7 @@ var l1Pedal = func {
}
var l2Pedal = func {
- var l2PedalCMD = getprop("/controls/footrest-cpt[1]");
+ var l2PedalCMD = getprop("controls/footrest-cpt[1]");
if (l2PedalCMD < 1.0) {
interpolate("/controls/footrest-cpt[1]", 1.0, 0.5);
} else {
@@ -681,7 +681,7 @@ var l2Pedal = func {
}
var r1Pedal = func {
- var rPedalCMD = getprop("/controls/footrest-fo[0]");
+ var rPedalCMD = getprop("controls/footrest-fo[0]");
if (rPedalCMD < 1.0) {
interpolate("/controls/footrest-fo[0]", 1.0, 0.5);
} else {
@@ -690,7 +690,7 @@ var r1Pedal = func {
}
var r2Pedal = func {
- var r2PedalCMD = getprop("/controls/footrest-fo[1]");
+ var r2PedalCMD = getprop("controls/footrest-fo[1]");
if (r2PedalCMD < 1.0) {
interpolate("/controls/footrest-fo[1]", 1.0, 0.5);
} else {
@@ -698,13 +698,13 @@ var r2Pedal = func {
}
}
-if (getprop("/controls/flight/auto-coordination") == 1) {
- setprop("/controls/flight/auto-coordination", 0);
+if (getprop("controls/flight/auto-coordination") == 1) {
+ setprop("controls/flight/auto-coordination", 0);
print("System: Auto Coordination has been turned off as it is not compatible with the fly-by-wire of this aircraft.");
screen.log.write("Auto Coordination has been disabled as it is not compatible with the fly-by-wire of this aircraft", 1, 0, 0);
}
-setprop("/controls/flight/aileron-drives-tiller", 0);
+setprop("controls/flight/aileron-drives-tiller", 0);
var APPanel = {
APDisc: func() {
@@ -717,9 +717,9 @@ var APPanel = {
var resetView = func() {
if (getprop("sim/current-view/view-number") == 0) {
- if (getprop("/sim/rendering/headshake/enabled")) {
+ if (getprop("sim/rendering/headshake/enabled")) {
var _shakeFlag = 1;
- setprop("/sim/rendering/headshake/enabled", 0);
+ setprop("sim/rendering/headshake/enabled", 0);
} else {
var _shakeFlag = 0;
}
@@ -739,9 +739,9 @@ var resetView = func() {
interpolate("sim/current-view/z-offset-m", -13.75, 0.66);
if (_shakeFlag) {
- setprop("/sim/rendering/headshake/enabled", 1);
+ setprop("sim/rendering/headshake/enabled", 1);
}
}
}
-setprop("/systems/acconfig/libraries-loaded", 1);
+setprop("systems/acconfig/libraries-loaded", 1);
diff --git a/Nasal/Sim/property-tree-setup.nas b/Nasal/Sim/property-tree-setup.nas
index 741dd6cf..e99a1800 100644
--- a/Nasal/Sim/property-tree-setup.nas
+++ b/Nasal/Sim/property-tree-setup.nas
@@ -6,35 +6,35 @@
# Usage Example: pts.Class.SubClass.node.getValue()
var APU = {
- masterSw: props.globals.getNode("/controls/APU/master"),
- rpm: props.globals.getNode("/systems/apu/rpm"),
+ masterSw: props.globals.getNode("controls/APU/master"),
+ rpm: props.globals.getNode("systems/apu/rpm"),
};
var Consumables = {
Fuel: {
- totalFuelLbs: props.globals.getNode("/consumables/fuel/total-fuel-lbs"),
+ totalFuelLbs: props.globals.getNode("consumables/fuel/total-fuel-lbs"),
},
};
var Controls = {
Engines: {
- startSw: props.globals.getNode("/controls/engines/engine-start-switch"),
+ startSw: props.globals.getNode("controls/engines/engine-start-switch"),
Engine1: {
- cutoffSw: props.globals.getNode("/controls/engines/engine[0]/cutoff-switch"),
- firePb: props.globals.getNode("/controls/engines/engine[0]/fire-btn"),
- throttle: props.globals.getNode("/controls/engines/engine[0]/throttle"),
+ cutoffSw: props.globals.getNode("controls/engines/engine[0]/cutoff-switch"),
+ firePb: props.globals.getNode("controls/engines/engine[0]/fire-btn"),
+ throttle: props.globals.getNode("controls/engines/engine[0]/throttle"),
},
Engine2: {
- cutoffSw: props.globals.getNode("/controls/engines/engine[1]/cutoff-switch"),
- firePb: props.globals.getNode("/controls/engines/engine[1]/fire-btn"),
- throttle: props.globals.getNode("/controls/engines/engine[1]/throttle"),
+ cutoffSw: props.globals.getNode("controls/engines/engine[1]/cutoff-switch"),
+ firePb: props.globals.getNode("controls/engines/engine[1]/fire-btn"),
+ throttle: props.globals.getNode("controls/engines/engine[1]/throttle"),
},
},
Flight: {
- aileron: props.globals.getNode("/controls/flight/aileron"),
+ aileron: props.globals.getNode("controls/flight/aileron"),
},
Gear: {
- gearDown: props.globals.getNode("/controls/gear/gear-down"),
+ gearDown: props.globals.getNode("controls/gear/gear-down"),
},
};
@@ -44,98 +44,98 @@ var ECAM = {
var Engines = {
Engine1: {
- epractual: props.globals.getNode("/engines/engine[0]/epr-actual"),
- n1actual: props.globals.getNode("/engines/engine[0]/n1-actual"),
- n2actual: props.globals.getNode("/engines/engine[0]/n2-actual"),
- state: props.globals.getNode("/engines/engine[0]/state"),
+ epractual: props.globals.getNode("engines/engine[0]/epr-actual"),
+ n1actual: props.globals.getNode("engines/engine[0]/n1-actual"),
+ n2actual: props.globals.getNode("engines/engine[0]/n2-actual"),
+ state: props.globals.getNode("engines/engine[0]/state"),
},
Engine2: {
- epractual: props.globals.getNode("/engines/engine[1]/epr-actual"),
- n1actual: props.globals.getNode("/engines/engine[1]/n1-actual"),
- n2actual: props.globals.getNode("/engines/engine[1]/n2-actual"),
- state: props.globals.getNode("/engines/engine[1]/state"),
+ epractual: props.globals.getNode("engines/engine[1]/epr-actual"),
+ n1actual: props.globals.getNode("engines/engine[1]/n1-actual"),
+ n2actual: props.globals.getNode("engines/engine[1]/n2-actual"),
+ state: props.globals.getNode("engines/engine[1]/state"),
},
};
var FMGC = {
CasCompare: {
- rejectAll: props.globals.getNode("/systems/fmgc/cas-compare/cas-reject-all"),
+ rejectAll: props.globals.getNode("systems/fmgc/cas-compare/cas-reject-all"),
},
};
var Gear = {
- compression: [props.globals.getNode("/gear/gear[0]/compression-norm"),props.globals.getNode("/gear/gear[1]/compression-norm"),props.globals.getNode("/gear/gear[2]/compression-norm")],
- wow: [props.globals.getNode("/gear/gear[0]/wow"),props.globals.getNode("/gear/gear[1]/wow"),props.globals.getNode("/gear/gear[2]/wow")],
- position: [props.globals.getNode("/gear/gear[0]/position-norm"),props.globals.getNode("/gear/gear[1]/position-norm"),props.globals.getNode("/gear/gear[2]/position-norm")],
+ compression: [props.globals.getNode("gear/gear[0]/compression-norm"),props.globals.getNode("gear/gear[1]/compression-norm"),props.globals.getNode("gear/gear[2]/compression-norm")],
+ wow: [props.globals.getNode("gear/gear[0]/wow"),props.globals.getNode("gear/gear[1]/wow"),props.globals.getNode("gear/gear[2]/wow")],
+ position: [props.globals.getNode("gear/gear[0]/position-norm"),props.globals.getNode("gear/gear[1]/position-norm"),props.globals.getNode("gear/gear[2]/position-norm")],
};
var Instrumentation = {
AirspeedIndicator: {
- indicatedSpdKt: props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt"),
+ indicatedSpdKt: props.globals.getNode("instrumentation/airspeed-indicator/indicated-speed-kt"),
},
TCAS: {
Inputs: {
- mode: props.globals.getNode("/instrumentation/tcas/inputs/mode"),
+ mode: props.globals.getNode("instrumentation/tcas/inputs/mode"),
},
},
};
var JSBSIM = {
FCS: {
- flapDeg: props.globals.getNode("/fdm/jsbsim/fcs/flap-pos-deg"),
- slatDeg: props.globals.getNode("/fdm/jsbsim/fcs/slat-pos-deg"),
+ 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"),
+ 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"),
+ 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"),
+ fuelUsed: props.globals.getNode("fdm/jsbsim/propulsion/engine[1]/fuel-used-lbs"),
},
},
};
var Options = {
- eng: props.globals.getNode("/options/eng"),
+ eng: props.globals.getNode("options/eng"),
};
var Orientation = {
- pitch: props.globals.getNode("/orientation/pitch-deg"),
- roll: props.globals.getNode("/orientation/roll-deg"),
- yaw: props.globals.getNode("/orientation/yaw-deg"),
+ pitch: props.globals.getNode("orientation/pitch-deg"),
+ roll: props.globals.getNode("orientation/roll-deg"),
+ yaw: props.globals.getNode("orientation/yaw-deg"),
};
var Position = {
- gearAglFt: props.globals.getNode("/position/gear-agl-ft"),
- latitude: props.globals.getNode("/position/latitude-deg"),
- longitude: props.globals.getNode("/position/longitude-deg"),
+ gearAglFt: props.globals.getNode("position/gear-agl-ft"),
+ latitude: props.globals.getNode("position/latitude-deg"),
+ longitude: props.globals.getNode("position/longitude-deg"),
};
var Sim = {
- aero: props.globals.getNode("/sim/aero"),
+ aero: props.globals.getNode("sim/aero"),
Replay: {
- replayActive: props.globals.getNode("/sim/replay/replay-state"),
+ replayActive: props.globals.getNode("sim/replay/replay-state"),
},
Time: {
- elapsedSec: props.globals.getNode("/sim/time/elapsed-sec"),
+ elapsedSec: props.globals.getNode("sim/time/elapsed-sec"),
},
};
var PTSSystems = {
Thrust: {
- flex: props.globals.getNode("/systems/thrust/lim-flex"),
+ flex: props.globals.getNode("systems/thrust/lim-flex"),
},
};
var Velocities = {
- groundspeed: props.globals.getNode("/velocities/groundspeed-kt"),
+ groundspeed: props.globals.getNode("velocities/groundspeed-kt"),
};
-setprop("/systems/acconfig/property-tree-setup-loaded", 1);
+setprop("systems/acconfig/property-tree-setup-loaded", 1);
diff --git a/Nasal/Sim/shake.nas b/Nasal/Sim/shake.nas
index abf01fcb..d87bac7c 100644
--- a/Nasal/Sim/shake.nas
+++ b/Nasal/Sim/shake.nas
@@ -11,10 +11,10 @@ var n_g_l = 0;
var n_g_r = 0;
var theShakeEffect = func {
- n_g_c = getprop("/gear/gear[0]/compression-norm") or 0;
- n_g_l = getprop("/gear/gear[1]/compression-norm") or 0;
- n_g_r = getprop("/gear/gear[2]/compression-norm") or 0;
- rSpeed = getprop("/gear/gear[0]/rollspeed-ms") or 0;
+ n_g_c = getprop("gear/gear[0]/compression-norm") or 0;
+ n_g_l = getprop("gear/gear[1]/compression-norm") or 0;
+ n_g_r = getprop("gear/gear[2]/compression-norm") or 0;
+ rSpeed = getprop("gear/gear[0]/rollspeed-ms") or 0;
sf = rSpeed / 94000;
if (shakeEffectA3XX.getBoolValue() and (n_g_c > 0 or n_g_l > 0 or n_g_r > 0)) {
@@ -27,8 +27,8 @@ var theShakeEffect = func {
}, 0.12);
settimer(theShakeEffect, 0.09);
} else {
- setprop("/systems/shake/shaking", 0);
- setprop("/systems/shake/effect", 0);
+ setprop("systems/shake/shaking", 0);
+ setprop("systems/shake/effect", 0);
}
}
diff --git a/Nasal/Sim/zoom-views.nas b/Nasal/Sim/zoom-views.nas
index fa3545cf..75018598 100644
--- a/Nasal/Sim/zoom-views.nas
+++ b/Nasal/Sim/zoom-views.nas
@@ -6,33 +6,33 @@ var distance = 0;
var min_dist = 0;
var max_dist = 0;
var canChangeZOffset = 0;
-var decStep = -5;
-var incStep = 5;
+var decStep = -0.5;
+var incStep = 0.5;
var viewName = "XX";
var fovZoom = func(d) {
- viewName = getprop("/sim/current-view/name");
- canChangeZOffset = getprop("/sim/current-view/type") == "lookat" and viewName != "Tower View" and viewName != "Fly-By View" and viewName != "Chase View" and viewName != "Chase View Without Yaw" and viewName != "Walk View";
+ viewName = getprop("sim/current-view/name");
+ canChangeZOffset = getprop("sim/current-view/type") == "lookat" and viewName != "Tower View" and viewName != "Tower View AGL" and viewName != "Fly-By View" and viewName != "Chase View" and viewName != "Chase View Without Yaw" and viewName != "Walk View";
- if (getprop("/sim/current-view/z-offset-m") <= -50) {
- decStep = -10;
+ if (getprop("sim/current-view/z-offset-m") <= -20) {
+ decStep = -2;
} else {
- decStep = -5;
+ decStep = -1;
}
- if (getprop("/sim/current-view/z-offset-m") < -50) { # Not a typo, the conditions are different
- incStep = 10;
+ if (getprop("sim/current-view/z-offset-m") < -20) { # Not a typo, the conditions are different
+ incStep = 2;
} else {
- incStep = 5;
+ incStep = 1;
}
if (d == -1) {
if (canChangeZOffset) {
- distance = getprop("/sim/current-view/z-offset-m");
- min_dist = getprop("/sim/current-view/z-offset-min-m");
+ distance = getprop("sim/current-view/z-offset-m");
+ min_dist = getprop("sim/current-view/z-offset-min-m");
distance = math.round(std.min(-min_dist, distance + incStep) / incStep, 0.1) * incStep;
- setprop("/sim/current-view/z-offset-m", distance);
+ setprop("sim/current-view/z-offset-m", distance);
gui.popupTip(sprintf("%d meters", abs(distance)));
} else {
@@ -40,11 +40,11 @@ var fovZoom = func(d) {
}
} else if (d == 1) {
if (canChangeZOffset) {
- distance = getprop("/sim/current-view/z-offset-m");
- max_dist = getprop("/sim/current-view/z-offset-max-m");
+ distance = getprop("sim/current-view/z-offset-m");
+ max_dist = getprop("sim/current-view/z-offset-max-m");
distance = math.round(std.max(-max_dist, distance + decStep) / decStep, 0.1) * decStep;
- setprop("/sim/current-view/z-offset-m", distance);
+ setprop("sim/current-view/z-offset-m", distance);
gui.popupTip(sprintf("%d meters", abs(distance)));
} else {
@@ -52,11 +52,11 @@ var fovZoom = func(d) {
}
} else if (d == 0) {
if (canChangeZOffset) {
- setprop("/sim/current-view/z-offset-m", getprop("/sim/current-view/z-offset-default") * -1);
- gui.popupTip(sprintf("%d meters", getprop("/sim/current-view/z-offset-default")));
+ setprop("sim/current-view/z-offset-m", getprop("sim/current-view/z-offset-default") * -1);
+ gui.popupTip(sprintf("%d meters", getprop("sim/current-view/z-offset-default")));
} else {
- setprop("/sim/current-view/field-of-view", getprop("/sim/view/config/default-field-of-view-deg"));
- gui.popupTip(sprintf("FOV: %.1f", getprop("/sim/current-view/field-of-view")))
+ setprop("sim/current-view/field-of-view", getprop("sim/view/config/default-field-of-view-deg"));
+ gui.popupTip(sprintf("FOV: %.1f", getprop("sim/current-view/field-of-view")))
}
}
}
diff --git a/Nasal/Systems/ADIRS/ADIRS.nas b/Nasal/Systems/ADIRS/ADIRS.nas
index 63483834..be0bd84a 100644
--- a/Nasal/Systems/ADIRS/ADIRS.nas
+++ b/Nasal/Systems/ADIRS/ADIRS.nas
@@ -4,16 +4,16 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
var ADIRS = {
init: func() {
- setprop("/controls/adirs/mcdu/mode1", ""); # INVAL ALIGN NAV ATT or off (blank)
- setprop("/controls/adirs/mcdu/mode2", "");
- setprop("/controls/adirs/mcdu/mode3", "");
- setprop("/controls/adirs/mcdu/status1", ""); # see smith thales p487
- setprop("/controls/adirs/mcdu/status2", "");
- setprop("/controls/adirs/mcdu/status3", "");
- setprop("/controls/adirs/mcdu/hdg", ""); # only shown if in ATT mode
- setprop("/controls/adirs/mcdu/avgdrift1", "");
- setprop("/controls/adirs/mcdu/avgdrift2", "");
- setprop("/controls/adirs/mcdu/avgdrift3", "");
- setprop("/controls/adirs/mcducbtn", 0);
+ setprop("controls/adirs/mcdu/mode1", ""); # INVAL ALIGN NAV ATT or off (blank)
+ setprop("controls/adirs/mcdu/mode2", "");
+ setprop("controls/adirs/mcdu/mode3", "");
+ setprop("controls/adirs/mcdu/status1", ""); # see smith thales p487
+ setprop("controls/adirs/mcdu/status2", "");
+ setprop("controls/adirs/mcdu/status3", "");
+ setprop("controls/adirs/mcdu/hdg", ""); # only shown if in ATT mode
+ setprop("controls/adirs/mcdu/avgdrift1", "");
+ setprop("controls/adirs/mcdu/avgdrift2", "");
+ setprop("controls/adirs/mcdu/avgdrift3", "");
+ setprop("controls/adirs/mcducbtn", 0);
},
};
\ No newline at end of file
diff --git a/Nasal/Systems/ADIRS/ADR.nas b/Nasal/Systems/ADIRS/ADR.nas
index b995b2ed..69b6e442 100644
--- a/Nasal/Systems/ADIRS/ADR.nas
+++ b/Nasal/Systems/ADIRS/ADR.nas
@@ -240,19 +240,19 @@ var ADIRSnew = {
# PTS
Lights: {
- adrFault: [props.globals.getNode("/controls/navigation/adirscp/lights/adr-1-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-2-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-3-fault")],
- adrOff: [props.globals.getNode("/controls/navigation/adirscp/lights/adr-1-off"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-2-off"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-3-off")],
- irFault: [props.globals.getNode("/controls/navigation/adirscp/lights/ir-1-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-2-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-3-fault")],
- irOff: [props.globals.getNode("/controls/navigation/adirscp/lights/ir-1-off"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-2-off"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-3-off")],
- onBat: props.globals.getNode("/controls/navigation/adirscp/lights/on-bat"),
+ adrFault: [props.globals.getNode("controls/navigation/adirscp/lights/adr-1-fault"), props.globals.getNode("controls/navigation/adirscp/lights/adr-2-fault"), props.globals.getNode("controls/navigation/adirscp/lights/adr-3-fault")],
+ adrOff: [props.globals.getNode("controls/navigation/adirscp/lights/adr-1-off"), props.globals.getNode("controls/navigation/adirscp/lights/adr-2-off"), props.globals.getNode("controls/navigation/adirscp/lights/adr-3-off")],
+ irFault: [props.globals.getNode("controls/navigation/adirscp/lights/ir-1-fault"), props.globals.getNode("controls/navigation/adirscp/lights/ir-2-fault"), props.globals.getNode("controls/navigation/adirscp/lights/ir-3-fault")],
+ irOff: [props.globals.getNode("controls/navigation/adirscp/lights/ir-1-off"), props.globals.getNode("controls/navigation/adirscp/lights/ir-2-off"), props.globals.getNode("controls/navigation/adirscp/lights/ir-3-off")],
+ onBat: props.globals.getNode("controls/navigation/adirscp/lights/on-bat"),
},
Switches: {
- adrSw: [props.globals.getNode("/controls/navigation/adirscp/switches/adr-1"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-2"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-3")],
- irModeSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3-mode")],
- irSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3")],
+ adrSw: [props.globals.getNode("controls/navigation/adirscp/switches/adr-1"), props.globals.getNode("controls/navigation/adirscp/switches/adr-2"), props.globals.getNode("controls/navigation/adirscp/switches/adr-3")],
+ irModeSw: [props.globals.getNode("controls/navigation/adirscp/switches/ir-1-mode"), props.globals.getNode("controls/navigation/adirscp/switches/ir-2-mode"), props.globals.getNode("controls/navigation/adirscp/switches/ir-3-mode")],
+ irSw: [props.globals.getNode("controls/navigation/adirscp/switches/ir-1"), props.globals.getNode("controls/navigation/adirscp/switches/ir-2"), props.globals.getNode("controls/navigation/adirscp/switches/ir-3")],
},
Operating: {
- adr: [props.globals.getNode("/systems/navigation/adr/operating-1"), props.globals.getNode("/systems/navigation/adr/operating-2"), props.globals.getNode("/systems/navigation/adr/operating-3")],
+ adr: [props.globals.getNode("systems/navigation/adr/operating-1"), props.globals.getNode("systems/navigation/adr/operating-2"), props.globals.getNode("systems/navigation/adr/operating-3")],
},
# Nodes
diff --git a/Nasal/Systems/ADIRS/SwitchingPanel.nas b/Nasal/Systems/ADIRS/SwitchingPanel.nas
index 96066a20..aafe4e01 100644
--- a/Nasal/Systems/ADIRS/SwitchingPanel.nas
+++ b/Nasal/Systems/ADIRS/SwitchingPanel.nas
@@ -5,9 +5,9 @@
var SwitchingPanel = {
Switches: {
- attHdg: props.globals.getNode("/controls/navigation/switching/att-hdg"),
- airData: props.globals.getNode("/controls/navigation/switching/air-data"),
- eisDmc: props.globals.getNode("/controls/navigation/switching/eis-dmc"),
+ attHdg: props.globals.getNode("controls/navigation/switching/att-hdg"),
+ airData: props.globals.getNode("controls/navigation/switching/air-data"),
+ eisDmc: props.globals.getNode("controls/navigation/switching/eis-dmc"),
},
doAirData: func(newAirData) {
diff --git a/Nasal/Systems/FADEC/engines-cfm.nas b/Nasal/Systems/FADEC/engines-cfm.nas
index e26535dc..7c12082a 100644
--- a/Nasal/Systems/FADEC/engines-cfm.nas
+++ b/Nasal/Systems/FADEC/engines-cfm.nas
@@ -7,7 +7,7 @@
# Initializing Vars #
#####################
-var engines = props.globals.getNode("/engines").getChildren("engine");
+var engines = props.globals.getNode("engines").getChildren("engine");
var egt_min = 434;
var egt_start = 587;
var egt_max = 712;
@@ -17,34 +17,34 @@ var egt_lightdn_time = 10;
var shutdown_time = 20;
var egt_shutdown_time = 20;
-setprop("/controls/engines/engine[0]/reverser", 0);
-setprop("/controls/engines/engine[1]/reverser", 0);
-setprop("/controls/engines/engine[0]/igniter-a", 0);
-setprop("/controls/engines/engine[1]/igniter-a", 0);
-setprop("/controls/engines/engine[0]/igniter-b", 0);
-setprop("/controls/engines/engine[1]/igniter-b", 0);
-setprop("/controls/engines/engine[0]/last-igniter", "B");
-setprop("/controls/engines/engine[1]/last-igniter", "B");
+setprop("controls/engines/engine[0]/reverser", 0);
+setprop("controls/engines/engine[1]/reverser", 0);
+setprop("controls/engines/engine[0]/igniter-a", 0);
+setprop("controls/engines/engine[1]/igniter-a", 0);
+setprop("controls/engines/engine[0]/igniter-b", 0);
+setprop("controls/engines/engine[1]/igniter-b", 0);
+setprop("controls/engines/engine[0]/last-igniter", "B");
+setprop("controls/engines/engine[1]/last-igniter", "B");
var eng_init = func {
- setprop("/controls/engines/engine[0]/man-start", 0);
- setprop("/controls/engines/engine[1]/man-start", 0);
+ setprop("controls/engines/engine[0]/man-start", 0);
+ setprop("controls/engines/engine[1]/man-start", 0);
eng_common_init();
}
# Trigger Startups and Stops
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
- if (getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
- if (getprop("/systems/acconfig/autoconfig-running") == 1) {
+ if (getprop("controls/engines/engine[0]/cutoff-switch") == 0) {
+ if (getprop("systems/acconfig/autoconfig-running") == 1) {
fast_start_one();
} else {
- if (getprop("/controls/engines/engine[0]/man-start") == 0) {
+ if (getprop("controls/engines/engine[0]/man-start") == 0) {
start_one_check();
- } else if (getprop("/controls/engines/engine[0]/man-start") == 1) {
+ } else if (getprop("controls/engines/engine[0]/man-start") == 1) {
eng_one_man_start.start();
}
}
- } else if (getprop("/controls/engines/engine[0]/cutoff-switch") == 1) {
+ } else if (getprop("controls/engines/engine[0]/cutoff-switch") == 1) {
cutoff_one();
}
});
@@ -53,29 +53,29 @@ var cutoff_one = func {
eng_one_auto_start.stop();
eng_one_man_start.stop();
eng_one_n2_check.stop();
- setprop("/controls/engines/engine[0]/igniter-a", 0);
- setprop("/controls/engines/engine[0]/igniter-b", 0);
- setprop("/controls/engines/engine[0]/man-start", 0);
- setprop("/systems/pneumatic/eng1-starter", 0);
- setprop("/controls/engines/engine[0]/starter", 0);
- setprop("/controls/engines/engine[0]/cutoff", 1);
- setprop("/engines/engine[0]/state", 0);
+ setprop("controls/engines/engine[0]/igniter-a", 0);
+ setprop("controls/engines/engine[0]/igniter-b", 0);
+ setprop("controls/engines/engine[0]/man-start", 0);
+ setprop("systems/pneumatic/eng1-starter", 0);
+ setprop("controls/engines/engine[0]/starter", 0);
+ setprop("controls/engines/engine[0]/cutoff", 1);
+ setprop("engines/engine[0]/state", 0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
eng_one_n2_check.stop();
}
var fast_start_one = func {
- setprop("/controls/engines/engine[0]/cutoff", 0);
- setprop("/engines/engine[0]/out-of-fuel", 0);
- setprop("/engines/engine[0]/run", 1);
+ setprop("controls/engines/engine[0]/cutoff", 0);
+ setprop("engines/engine[0]/out-of-fuel", 0);
+ setprop("engines/engine[0]/run", 1);
- setprop("/engines/engine[0]/cutoff", 0);
- setprop("/engines/engine[0]/starter", 0);
+ setprop("engines/engine[0]/cutoff", 0);
+ setprop("engines/engine[0]/starter", 0);
- setprop("/fdm/jsbsim/propulsion/set-running", 0);
+ setprop("fdm/jsbsim/propulsion/set-running", 0);
- setprop("/engines/engine[0]/state", 3);
- setprop("/systems/pneumatic/eng1-starter", 0);
+ setprop("engines/engine[0]/state", 3);
+ setprop("systems/pneumatic/eng1-starter", 0);
}
setlistener("/controls/engines/engine[0]/man-start", func {
@@ -83,52 +83,52 @@ setlistener("/controls/engines/engine[0]/man-start", func {
});
var start_one_mancheck = func {
- if (getprop("/controls/engines/engine[0]/man-start") == 1) {
- if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[0]/cutoff-switch") == 1)) {
- setprop("/systems/pneumatic/eng1-starter", 1);
+ if (getprop("controls/engines/engine[0]/man-start") == 1) {
+ if (getprop("controls/engines/engine-start-switch") == 2 and (getprop("controls/engines/engine[0]/cutoff-switch") == 1)) {
+ setprop("systems/pneumatic/eng1-starter", 1);
settimer(start_one_mancheck_b, 0.5);
}
} else {
- if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
- setprop("/systems/pneumatic/eng1-starter", 0);
- setprop("/engines/engine[0]/state", 0);
- setprop("/controls/engines/engine[0]/starter", 0);
+ if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
+ setprop("systems/pneumatic/eng1-starter", 0);
+ setprop("engines/engine[0]/state", 0);
+ setprop("controls/engines/engine[0]/starter", 0);
}
}
}
var start_one_mancheck_b = func {
- if (getprop("/systems/pneumatic/total-psi") >= 28) {
- setprop("/engines/engine[0]/state", 1);
- setprop("/controls/engines/engine[0]/starter", 1);
+ if (getprop("systems/pneumatic/total-psi") >= 28) {
+ setprop("engines/engine[0]/state", 1);
+ setprop("controls/engines/engine[0]/starter", 1);
}
}
var start_one_check = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
- setprop("/systems/pneumatic/eng1-starter", 1);
+ if (getprop("controls/engines/engine-start-switch") == 2 and getprop("controls/engines/engine[0]/cutoff-switch") == 0) {
+ setprop("systems/pneumatic/eng1-starter", 1);
settimer(start_one_check_b, 0.5);
}
}
var start_one_check_b = func {
- if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/systems/pneumatic/total-psi") >= 28) and (getprop("/controls/engines/engine[0]/cutoff-switch") == 0)) {
+ if ((getprop("controls/engines/engine-start-switch") == 2) and (getprop("systems/pneumatic/total-psi") >= 28) and (getprop("controls/engines/engine[0]/cutoff-switch") == 0)) {
auto_start_one();
}
}
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
- if (getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
- if (getprop("/systems/acconfig/autoconfig-running") == 1) {
+ if (getprop("controls/engines/engine[1]/cutoff-switch") == 0) {
+ if (getprop("systems/acconfig/autoconfig-running") == 1) {
fast_start_two();
} else {
- if (getprop("/controls/engines/engine[1]/man-start") == 0) {
+ if (getprop("controls/engines/engine[1]/man-start") == 0) {
start_two_check();
- } else if (getprop("/controls/engines/engine[1]/man-start") == 1) {
+ } else if (getprop("controls/engines/engine[1]/man-start") == 1) {
eng_two_man_start.start();
}
}
- } else if (getprop("/controls/engines/engine[1]/cutoff-switch") == 1) {
+ } else if (getprop("controls/engines/engine[1]/cutoff-switch") == 1) {
cutoff_two();
}
});
@@ -137,28 +137,28 @@ var cutoff_two = func {
eng_two_auto_start.stop();
eng_two_man_start.stop();
eng_two_n2_check.stop();
- setprop("/controls/engines/engine[1]/igniter-a", 0);
- setprop("/controls/engines/engine[1]/igniter-b", 0);
- setprop("/controls/engines/engine[1]/man-start", 0);
- setprop("/systems/pneumatic/eng2-starter", 0);
- setprop("/controls/engines/engine[1]/starter", 0);
- setprop("/controls/engines/engine[1]/cutoff", 1);
- setprop("/engines/engine[1]/state", 0);
+ setprop("controls/engines/engine[1]/igniter-a", 0);
+ setprop("controls/engines/engine[1]/igniter-b", 0);
+ setprop("controls/engines/engine[1]/man-start", 0);
+ setprop("systems/pneumatic/eng2-starter", 0);
+ setprop("controls/engines/engine[1]/starter", 0);
+ setprop("controls/engines/engine[1]/cutoff", 1);
+ setprop("engines/engine[1]/state", 0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
var fast_start_two = func {
- setprop("/controls/engines/engine[1]/cutoff", 0);
- setprop("/engines/engine[1]/out-of-fuel", 0);
- setprop("/engines/engine[1]/run", 1);
+ setprop("controls/engines/engine[1]/cutoff", 0);
+ setprop("engines/engine[1]/out-of-fuel", 0);
+ setprop("engines/engine[1]/run", 1);
- setprop("/engines/engine[1]/cutoff", 0);
- setprop("/engines/engine[1]/starter", 0);
+ setprop("engines/engine[1]/cutoff", 0);
+ setprop("engines/engine[1]/starter", 0);
- setprop("/fdm/jsbsim/propulsion/set-running", 1);
+ setprop("fdm/jsbsim/propulsion/set-running", 1);
- setprop("/engines/engine[1]/state", 3);
- setprop("/systems/pneumatic/eng2-starter", 0);
+ setprop("engines/engine[1]/state", 3);
+ setprop("systems/pneumatic/eng2-starter", 0);
}
setlistener("/controls/engines/engine[1]/man-start", func {
@@ -166,60 +166,60 @@ setlistener("/controls/engines/engine[1]/man-start", func {
});
var start_two_mancheck = func {
- if (getprop("/controls/engines/engine[1]/man-start") == 1) {
- if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[1]/cutoff-switch") == 1)) {
- setprop("/systems/pneumatic/eng2-starter", 1);
+ if (getprop("controls/engines/engine[1]/man-start") == 1) {
+ if (getprop("controls/engines/engine-start-switch") == 2 and (getprop("controls/engines/engine[1]/cutoff-switch") == 1)) {
+ setprop("systems/pneumatic/eng2-starter", 1);
settimer(start_two_mancheck_b, 0.5);
}
} else {
- if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
- setprop("/systems/pneumatic/eng2-starter", 0);
- setprop("/engines/engine[1]/state", 0);
- setprop("/controls/engines/engine[1]/starter", 0);
+ if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
+ setprop("systems/pneumatic/eng2-starter", 0);
+ setprop("engines/engine[1]/state", 0);
+ setprop("controls/engines/engine[1]/starter", 0);
}
}
}
var start_two_mancheck_b = func {
- if (getprop("/systems/pneumatic/total-psi") >= 28) {
- setprop("/engines/engine[1]/state", 1);
- setprop("/controls/engines/engine[1]/starter", 1);
+ if (getprop("systems/pneumatic/total-psi") >= 28) {
+ setprop("engines/engine[1]/state", 1);
+ setprop("controls/engines/engine[1]/starter", 1);
}
}
var start_two_check = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
- setprop("/systems/pneumatic/eng2-starter", 1);
+ if (getprop("controls/engines/engine-start-switch") == 2 and getprop("controls/engines/engine[1]/cutoff-switch") == 0) {
+ setprop("systems/pneumatic/eng2-starter", 1);
settimer(start_two_check_b, 0.5);
}
}
var start_two_check_b = func {
- if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/systems/pneumatic/total-psi") >= 28) and (getprop("/controls/engines/engine[1]/cutoff-switch") == 0)) {
+ if ((getprop("controls/engines/engine-start-switch") == 2) and (getprop("systems/pneumatic/total-psi") >= 28) and (getprop("controls/engines/engine[1]/cutoff-switch") == 0)) {
auto_start_two();
}
}
# Start Engine One
var auto_start_one = func {
- setprop("/engines/engine[0]/state", 1);
- setprop("/controls/engines/engine[0]/starter", 1);
+ setprop("engines/engine[0]/state", 1);
+ setprop("controls/engines/engine[0]/starter", 1);
eng_one_auto_start.start();
}
var eng_one_auto_start = maketimer(0.5, func {
- if (getprop("/engines/engine[0]/n2-actual") >= 22) {
+ if (getprop("engines/engine[0]/n2-actual") >= 22) {
eng_one_auto_start.stop();
- setprop("/engines/engine[0]/state", 2);
- setprop("/controls/engines/engine[0]/cutoff", 0);
- if (getprop("/controls/engines/engine[0]/last-igniter") == "B") {
- setprop("/controls/engines/engine[0]/igniter-a", 1);
- setprop("/controls/engines/engine[0]/igniter-b", 0);
- setprop("/controls/engines/engine[0]/last-igniter", "A");
- } else if (getprop("/controls/engines/engine[0]/last-igniter") == "A") {
- setprop("/controls/engines/engine[0]/igniter-a", 0);
- setprop("/controls/engines/engine[0]/igniter-b", 1);
- setprop("/controls/engines/engine[0]/last-igniter", "B");
+ setprop("engines/engine[0]/state", 2);
+ setprop("controls/engines/engine[0]/cutoff", 0);
+ if (getprop("controls/engines/engine[0]/last-igniter") == "B") {
+ setprop("controls/engines/engine[0]/igniter-a", 1);
+ setprop("controls/engines/engine[0]/igniter-b", 0);
+ setprop("controls/engines/engine[0]/last-igniter", "A");
+ } else if (getprop("controls/engines/engine[0]/last-igniter") == "A") {
+ setprop("controls/engines/engine[0]/igniter-a", 0);
+ setprop("controls/engines/engine[0]/igniter-b", 1);
+ setprop("controls/engines/engine[0]/last-igniter", "B");
}
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_one_egt_check.start();
@@ -228,12 +228,12 @@ var eng_one_auto_start = maketimer(0.5, func {
});
var eng_one_man_start = maketimer(0.5, func {
- if (getprop("/engines/engine[0]/n2-actual") >= 16.7) {
+ if (getprop("engines/engine[0]/n2-actual") >= 16.7) {
eng_one_man_start.stop();
- setprop("/engines/engine[0]/state", 2);
- setprop("/controls/engines/engine[0]/cutoff", 0);
- setprop("/controls/engines/engine[0]/igniter-a", 1);
- setprop("/controls/engines/engine[0]/igniter-b", 1);
+ setprop("engines/engine[0]/state", 2);
+ setprop("controls/engines/engine[0]/cutoff", 0);
+ setprop("controls/engines/engine[0]/igniter-a", 1);
+ setprop("controls/engines/engine[0]/igniter-b", 1);
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_one_egt_check.start();
eng_one_n2_check.start();
@@ -241,48 +241,48 @@ var eng_one_man_start = maketimer(0.5, func {
});
var eng_one_egt_check = maketimer(0.5, func {
- if (getprop("/engines/engine[0]/egt-actual") >= egt_start) {
+ if (getprop("engines/engine[0]/egt-actual") >= egt_start) {
eng_one_egt_check.stop();
interpolate(engines[0].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
});
var eng_one_n2_check = maketimer(0.5, func {
- if (getprop("/engines/engine[0]/n2-actual") >= 43.0) {
- if (getprop("/controls/engines/engine[0]/igniter-a") != 0) {
- setprop("/controls/engines/engine[0]/igniter-a", 0);
+ if (getprop("engines/engine[0]/n2-actual") >= 43.0) {
+ if (getprop("controls/engines/engine[0]/igniter-a") != 0) {
+ setprop("controls/engines/engine[0]/igniter-a", 0);
}
- if (getprop("/controls/engines/engine[0]/igniter-b") != 0) {
- setprop("/controls/engines/engine[0]/igniter-b", 0);
+ if (getprop("controls/engines/engine[0]/igniter-b") != 0) {
+ setprop("controls/engines/engine[0]/igniter-b", 0);
}
}
- if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
+ if (getprop("engines/engine[0]/n2-actual") >= 57.0) {
eng_one_n2_check.stop();
- setprop("/systems/pneumatic/eng1-starter", 0);
- setprop("/engines/engine[0]/state", 3);
+ setprop("systems/pneumatic/eng1-starter", 0);
+ setprop("engines/engine[0]/state", 3);
}
});
# Start Engine Two
var auto_start_two = func {
- setprop("/engines/engine[1]/state", 1);
- setprop("/controls/engines/engine[1]/starter", 1);
+ setprop("engines/engine[1]/state", 1);
+ setprop("controls/engines/engine[1]/starter", 1);
eng_two_auto_start.start();
}
var eng_two_auto_start = maketimer(0.5, func {
- if (getprop("/engines/engine[1]/n2-actual") >= 22) {
+ if (getprop("engines/engine[1]/n2-actual") >= 22) {
eng_two_auto_start.stop();
- setprop("/engines/engine[1]/state", 2);
- setprop("/controls/engines/engine[1]/cutoff", 0);
- if (getprop("/controls/engines/engine[1]/last-igniter") == "B") {
- setprop("/controls/engines/engine[1]/igniter-a", 1);
- setprop("/controls/engines/engine[1]/igniter-b", 0);
- setprop("/controls/engines/engine[1]/last-igniter", "A");
- } else if (getprop("/controls/engines/engine[1]/last-igniter") == "A") {
- setprop("/controls/engines/engine[1]/igniter-a", 0);
- setprop("/controls/engines/engine[1]/igniter-b", 1);
- setprop("/controls/engines/engine[1]/last-igniter", "B");
+ setprop("engines/engine[1]/state", 2);
+ setprop("controls/engines/engine[1]/cutoff", 0);
+ if (getprop("controls/engines/engine[1]/last-igniter") == "B") {
+ setprop("controls/engines/engine[1]/igniter-a", 1);
+ setprop("controls/engines/engine[1]/igniter-b", 0);
+ setprop("controls/engines/engine[1]/last-igniter", "A");
+ } else if (getprop("controls/engines/engine[1]/last-igniter") == "A") {
+ setprop("controls/engines/engine[1]/igniter-a", 0);
+ setprop("controls/engines/engine[1]/igniter-b", 1);
+ setprop("controls/engines/engine[1]/last-igniter", "B");
}
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_two_egt_check.start();
@@ -291,12 +291,12 @@ var eng_two_auto_start = maketimer(0.5, func {
});
var eng_two_man_start = maketimer(0.5, func {
- if (getprop("/engines/engine[1]/n2-actual") >= 16.7) {
+ if (getprop("engines/engine[1]/n2-actual") >= 16.7) {
eng_two_man_start.stop();
- setprop("/engines/engine[1]/state", 2);
- setprop("/controls/engines/engine[1]/cutoff", 0);
- setprop("/controls/engines/engine[1]/igniter-a", 1);
- setprop("/controls/engines/engine[1]/igniter-b", 1);
+ setprop("engines/engine[1]/state", 2);
+ setprop("controls/engines/engine[1]/cutoff", 0);
+ setprop("controls/engines/engine[1]/igniter-a", 1);
+ setprop("controls/engines/engine[1]/igniter-b", 1);
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_two_egt_check.start();
eng_two_n2_check.start();
@@ -304,70 +304,70 @@ var eng_two_man_start = maketimer(0.5, func {
});
var eng_two_egt_check = maketimer(0.5, func {
- if (getprop("/engines/engine[1]/egt-actual") >= egt_start) {
+ if (getprop("engines/engine[1]/egt-actual") >= egt_start) {
eng_two_egt_check.stop();
interpolate(engines[1].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
});
var eng_two_n2_check = maketimer(0.5, func {
- if (getprop("/engines/engine[1]/n2-actual") >= 50.0) {
- if (getprop("/controls/engines/engine[1]/igniter-a") != 0) {
- setprop("/controls/engines/engine[1]/igniter-a", 0);
+ if (getprop("engines/engine[1]/n2-actual") >= 50.0) {
+ if (getprop("controls/engines/engine[1]/igniter-a") != 0) {
+ setprop("controls/engines/engine[1]/igniter-a", 0);
}
- if (getprop("/controls/engines/engine[1]/igniter-b") != 0) {
- setprop("/controls/engines/engine[1]/igniter-b", 0);
+ if (getprop("controls/engines/engine[1]/igniter-b") != 0) {
+ setprop("controls/engines/engine[1]/igniter-b", 0);
}
}
- if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
+ if (getprop("engines/engine[1]/n2-actual") >= 57.0) {
eng_two_n2_check.stop();
- setprop("/systems/pneumatic/eng2-starter", 0);
- setprop("/engines/engine[1]/state", 3);
+ setprop("systems/pneumatic/eng2-starter", 0);
+ setprop("engines/engine[1]/state", 3);
}
});
# Various Other Stuff
setlistener("/controls/engines/engine-start-switch", func {
- if (getprop("/engines/engine[0]/state") == 0) {
+ if (getprop("engines/engine[0]/state") == 0) {
start_one_check();
start_one_mancheck();
}
- if (getprop("/engines/engine[1]/state") == 0) {
+ if (getprop("engines/engine[1]/state") == 0) {
start_two_check();
start_two_mancheck();
}
- if ((getprop("/controls/engines/engine-start-switch") == 0) or (getprop("/controls/engines/engine-start-switch") == 1)) {
- if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
- setprop("/controls/engines/engine[0]/starter", 0);
- setprop("/controls/engines/engine[0]/cutoff", 1);
- setprop("/systems/pneumatic/eng1-starter", 0);
- setprop("/engines/engine[0]/state", 0);
+ if ((getprop("controls/engines/engine-start-switch") == 0) or (getprop("controls/engines/engine-start-switch") == 1)) {
+ if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
+ setprop("controls/engines/engine[0]/starter", 0);
+ setprop("controls/engines/engine[0]/cutoff", 1);
+ setprop("systems/pneumatic/eng1-starter", 0);
+ setprop("engines/engine[0]/state", 0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
}
- if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
- setprop("/controls/engines/engine[1]/starter", 0);
- setprop("/controls/engines/engine[1]/cutoff", 1);
- setprop("/systems/pneumatic/eng2-starter", 0);
- setprop("/engines/engine[1]/state", 0);
+ if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
+ setprop("controls/engines/engine[1]/starter", 0);
+ setprop("controls/engines/engine[1]/cutoff", 1);
+ setprop("systems/pneumatic/eng2-starter", 0);
+ setprop("engines/engine[1]/state", 0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
}
});
setlistener("/systems/pneumatic/start-psi", func {
- if (getprop("/systems/pneumatic/total-psi") < 12) {
- if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
- setprop("/controls/engines/engine[0]/starter", 0);
- setprop("/controls/engines/engine[0]/cutoff", 1);
- setprop("/systems/pneumatic/eng1-starter", 0);
- setprop("/engines/engine[0]/state", 0);
+ if (getprop("systems/pneumatic/total-psi") < 12) {
+ if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
+ setprop("controls/engines/engine[0]/starter", 0);
+ setprop("controls/engines/engine[0]/cutoff", 1);
+ setprop("systems/pneumatic/eng1-starter", 0);
+ setprop("engines/engine[0]/state", 0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
}
- if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
- setprop("/controls/engines/engine[1]/starter", 0);
- setprop("/controls/engines/engine[1]/cutoff", 1);
- setprop("/systems/pneumatic/eng2-starter", 0);
- setprop("/engines/engine[1]/state", 0);
+ if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
+ setprop("controls/engines/engine[1]/starter", 0);
+ setprop("controls/engines/engine[1]/cutoff", 1);
+ setprop("systems/pneumatic/eng2-starter", 0);
+ setprop("engines/engine[1]/state", 0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
}
diff --git a/Nasal/Systems/FADEC/engines-common.nas b/Nasal/Systems/FADEC/engines-common.nas
index a824b7a8..b28ceb26 100644
--- a/Nasal/Systems/FADEC/engines-common.nas
+++ b/Nasal/Systems/FADEC/engines-common.nas
@@ -3,7 +3,7 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
-if (getprop("/options/eng") == "IAE") {
+if (getprop("options/eng") == "IAE") {
io.include("engines-iae.nas");
} else {
io.include("engines-cfm.nas");
@@ -13,36 +13,36 @@ var spinup_time = 49;
var apu_max = 100;
var apu_egt_min = 352;
var apu_egt_max = 704;
-setprop("/systems/apu/rpm", 0);
-setprop("/systems/apu/egt", 42);
-setprop("/systems/apu/bleed-used", 0);
-setprop("/systems/apu/bleed-counting", 0);
-setprop("/systems/apu/bleed-time", 0);
+setprop("systems/apu/rpm", 0);
+setprop("systems/apu/egt", 42);
+setprop("systems/apu/bleed-used", 0);
+setprop("systems/apu/bleed-counting", 0);
+setprop("systems/apu/bleed-time", 0);
var eng_common_init = func {
- setprop("/systems/apu/bleed-used", 0);
+ setprop("systems/apu/bleed-used", 0);
}
# Start APU
setlistener("/controls/APU/start", func {
- if (getprop("/controls/APU/master") == 1 and getprop("/controls/APU/start") == 1) {
+ if (getprop("controls/APU/master") == 1 and getprop("controls/APU/start") == 1) {
apuBleedChk.stop();
- setprop("/systems/apu/bleed-counting", 0);
- if (getprop("/systems/acconfig/autoconfig-running") == 0) {
+ setprop("systems/apu/bleed-counting", 0);
+ if (getprop("systems/acconfig/autoconfig-running") == 0) {
interpolate("/systems/apu/rpm", apu_max, spinup_time);
apu_egt_check.start();
- } else if (getprop("/systems/acconfig/autoconfig-running") == 1) {
+ } else if (getprop("systems/acconfig/autoconfig-running") == 1) {
interpolate("/systems/apu/rpm", apu_max, 5);
interpolate("/systems/apu/egt", apu_egt_min, 5);
}
- } else if (getprop("/controls/APU/master") == 0) {
+ } else if (getprop("controls/APU/master") == 0) {
apu_egt_check.stop();
apu_stop();
}
});
var apu_egt_check = maketimer(0.5, func {
- if (getprop("/systems/apu/rpm") >= 28) {
+ if (getprop("systems/apu/rpm") >= 28) {
apu_egt_check.stop();
interpolate("/systems/apu/egt", apu_egt_max, 5);
apu_egt2_check.start();
@@ -50,7 +50,7 @@ var apu_egt_check = maketimer(0.5, func {
});
var apu_egt2_check = maketimer(0.5, func {
- if (getprop("/systems/apu/egt") >= 701) {
+ if (getprop("systems/apu/egt") >= 701) {
apu_egt2_check.stop();
interpolate("/systems/apu/egt", apu_egt_min, 30);
}
@@ -58,128 +58,128 @@ var apu_egt2_check = maketimer(0.5, func {
# Stop APU
setlistener("/controls/APU/master", func {
- if (getprop("/controls/APU/master") == 0) {
- setprop("/controls/APU/start", 0);
+ if (getprop("controls/APU/master") == 0) {
+ setprop("controls/APU/start", 0);
apu_egt_check.stop();
apu_egt2_check.stop();
apu_stop();
- } else if (getprop("/controls/APU/master") == 1) {
+ } else if (getprop("controls/APU/master") == 1) {
apuBleedChk.stop();
- setprop("/systems/apu/bleed-counting", 0);
- setprop("/systems/apu/bleed-used", 0);
+ setprop("systems/apu/bleed-counting", 0);
+ setprop("systems/apu/bleed-used", 0);
}
});
var apu_stop = func {
- if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") != 1 and getprop("/systems/acconfig/autoconfig-running") != 1) {
- setprop("/systems/apu/bleed-counting", 1);
- setprop("/systems/apu/bleed-time", getprop("/sim/time/elapsed-sec"));
+ if (getprop("systems/apu/bleed-used") == 1 and getprop("systems/apu/bleed-counting") != 1 and getprop("systems/acconfig/autoconfig-running") != 1) {
+ setprop("systems/apu/bleed-counting", 1);
+ setprop("systems/apu/bleed-time", getprop("sim/time/elapsed-sec"));
}
- if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") == 1 and getprop("/systems/acconfig/autoconfig-running") != 1) {
+ if (getprop("systems/apu/bleed-used") == 1 and getprop("systems/apu/bleed-counting") == 1 and getprop("systems/acconfig/autoconfig-running") != 1) {
apuBleedChk.start();
} else {
apuBleedChk.stop();
interpolate("/systems/apu/rpm", 0, 30);
interpolate("/systems/apu/egt", 42, 40);
- setprop("/systems/apu/bleed-counting", 0);
- setprop("/systems/apu/bleed-used", 0);
+ setprop("systems/apu/bleed-counting", 0);
+ setprop("systems/apu/bleed-used", 0);
}
}
var apuBleedChk = maketimer(0.1, func {
- if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") == 1) {
- if (getprop("/systems/apu/bleed-time") + 60 <= getprop("/sim/time/elapsed-sec")) {
+ if (getprop("systems/apu/bleed-used") == 1 and getprop("systems/apu/bleed-counting") == 1) {
+ if (getprop("systems/apu/bleed-time") + 60 <= getprop("sim/time/elapsed-sec")) {
apuBleedChk.stop();
interpolate("/systems/apu/rpm", 0, 30);
interpolate("/systems/apu/egt", 42, 40);
- setprop("/systems/apu/bleed-counting", 0);
- setprop("/systems/apu/bleed-used", 0);
+ setprop("systems/apu/bleed-counting", 0);
+ setprop("systems/apu/bleed-used", 0);
}
}
});
# Various Other Stuff
var doIdleThrust = func {
- setprop("/controls/engines/engine[0]/throttle", 0.0);
- setprop("/controls/engines/engine[1]/throttle", 0.0);
+ setprop("controls/engines/engine[0]/throttle", 0.0);
+ setprop("controls/engines/engine[1]/throttle", 0.0);
}
var doCLThrust = func {
- setprop("/controls/engines/engine[0]/throttle", 0.63);
- setprop("/controls/engines/engine[1]/throttle", 0.63);
+ setprop("controls/engines/engine[0]/throttle", 0.63);
+ setprop("controls/engines/engine[1]/throttle", 0.63);
}
var doMCTThrust = func {
- setprop("/controls/engines/engine[0]/throttle", 0.8);
- setprop("/controls/engines/engine[1]/throttle", 0.8);
+ setprop("controls/engines/engine[0]/throttle", 0.8);
+ setprop("controls/engines/engine[1]/throttle", 0.8);
}
var doTOGAThrust = func {
- setprop("/controls/engines/engine[0]/throttle", 1.0);
- setprop("/controls/engines/engine[1]/throttle", 1.0);
+ setprop("controls/engines/engine[0]/throttle", 1.0);
+ setprop("controls/engines/engine[1]/throttle", 1.0);
}
# Reverse Thrust System
var toggleFastRevThrust = func {
- var state1 = getprop("/systems/thrust/state1");
- var state2 = getprop("/systems/thrust/state2");
- if (state1 == "IDLE" and state2 == "IDLE" and getprop("/controls/engines/engine[0]/reverser") == "0" and getprop("/controls/engines/engine[1]/reverser") == "0" and getprop("/gear/gear[1]/wow") == 1 and getprop("/gear/gear[2]/wow") == 1) {
+ var state1 = getprop("systems/thrust/state1");
+ var state2 = getprop("systems/thrust/state2");
+ if (state1 == "IDLE" and state2 == "IDLE" and getprop("controls/engines/engine[0]/reverser") == "0" and getprop("controls/engines/engine[1]/reverser") == "0" and getprop("gear/gear[1]/wow") == 1 and getprop("gear/gear[2]/wow") == 1) {
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
- setprop("/controls/engines/engine[0]/reverser", 1);
- setprop("/controls/engines/engine[1]/reverser", 1);
- setprop("/controls/engines/engine[0]/throttle-rev", 0.65);
- setprop("/controls/engines/engine[1]/throttle-rev", 0.65);
- setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 3.14);
- setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 3.14);
- } else if ((getprop("/controls/engines/engine[0]/reverser") == "1") or (getprop("/controls/engines/engine[1]/reverser") == "1") and (getprop("/gear/gear[1]/wow") == 1) and (getprop("/gear/gear[2]/wow") == 1)) {
- setprop("/controls/engines/engine[0]/throttle-rev", 0);
- setprop("/controls/engines/engine[1]/throttle-rev", 0);
+ setprop("controls/engines/engine[0]/reverser", 1);
+ setprop("controls/engines/engine[1]/reverser", 1);
+ setprop("controls/engines/engine[0]/throttle-rev", 0.65);
+ setprop("controls/engines/engine[1]/throttle-rev", 0.65);
+ setprop("fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 3.14);
+ setprop("fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 3.14);
+ } else if ((getprop("controls/engines/engine[0]/reverser") == "1") or (getprop("controls/engines/engine[1]/reverser") == "1") and (getprop("gear/gear[1]/wow") == 1) and (getprop("gear/gear[2]/wow") == 1)) {
+ setprop("controls/engines/engine[0]/throttle-rev", 0);
+ setprop("controls/engines/engine[1]/throttle-rev", 0);
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
- setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);
- setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 0);
- setprop("/controls/engines/engine[0]/reverser", 0);
- setprop("/controls/engines/engine[1]/reverser", 0);
+ setprop("fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);
+ setprop("fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 0);
+ setprop("controls/engines/engine[0]/reverser", 0);
+ setprop("controls/engines/engine[1]/reverser", 0);
}
}
var doRevThrust = func {
- if (getprop("/controls/engines/engine[0]/reverser") == "1" and getprop("/controls/engines/engine[1]/reverser") == "1" and getprop("/gear/gear[1]/wow") == 1 and getprop("/gear/gear[2]/wow") == 1) {
- var pos1 = getprop("/controls/engines/engine[0]/throttle-rev");
- var pos2 = getprop("/controls/engines/engine[1]/throttle-rev");
+ if (getprop("controls/engines/engine[0]/reverser") == "1" and getprop("controls/engines/engine[1]/reverser") == "1" and getprop("gear/gear[1]/wow") == 1 and getprop("gear/gear[2]/wow") == 1) {
+ var pos1 = getprop("controls/engines/engine[0]/throttle-rev");
+ var pos2 = getprop("controls/engines/engine[1]/throttle-rev");
if (pos1 < 0.649) {
- setprop("/controls/engines/engine[0]/throttle-rev", pos1 + 0.15);
+ setprop("controls/engines/engine[0]/throttle-rev", pos1 + 0.15);
}
if (pos2 < 0.649) {
- setprop("/controls/engines/engine[1]/throttle-rev", pos2 + 0.15);
+ setprop("controls/engines/engine[1]/throttle-rev", pos2 + 0.15);
}
}
- var state1 = getprop("/systems/thrust/state1");
- var state2 = getprop("/systems/thrust/state2");
- if (state1 == "IDLE" and state2 == "IDLE" and getprop("/controls/engines/engine[0]/reverser") == "0" and getprop("/controls/engines/engine[1]/reverser") == "0" and getprop("/gear/gear[1]/wow") == 1 and getprop("/gear/gear[2]/wow") == 1) {
- setprop("/controls/engines/engine[0]/throttle-rev", 0.05);
- setprop("/controls/engines/engine[1]/throttle-rev", 0.05);
+ var state1 = getprop("systems/thrust/state1");
+ var state2 = getprop("systems/thrust/state2");
+ if (state1 == "IDLE" and state2 == "IDLE" and getprop("controls/engines/engine[0]/reverser") == "0" and getprop("controls/engines/engine[1]/reverser") == "0" and getprop("gear/gear[1]/wow") == 1 and getprop("gear/gear[2]/wow") == 1) {
+ setprop("controls/engines/engine[0]/throttle-rev", 0.05);
+ setprop("controls/engines/engine[1]/throttle-rev", 0.05);
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
- setprop("/controls/engines/engine[0]/reverser", 1);
- setprop("/controls/engines/engine[1]/reverser", 1);
- setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 3.14);
- setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 3.14);
+ setprop("controls/engines/engine[0]/reverser", 1);
+ setprop("controls/engines/engine[1]/reverser", 1);
+ setprop("fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 3.14);
+ setprop("fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 3.14);
}
}
var unRevThrust = func {
- if (getprop("/controls/engines/engine[0]/reverser") == "1" or getprop("/controls/engines/engine[1]/reverser") == "1") {
- var pos1 = getprop("/controls/engines/engine[0]/throttle-rev");
- var pos2 = getprop("/controls/engines/engine[1]/throttle-rev");
+ if (getprop("controls/engines/engine[0]/reverser") == "1" or getprop("controls/engines/engine[1]/reverser") == "1") {
+ var pos1 = getprop("controls/engines/engine[0]/throttle-rev");
+ var pos2 = getprop("controls/engines/engine[1]/throttle-rev");
if (pos1 > 0.051) {
- setprop("/controls/engines/engine[0]/throttle-rev", pos1 - 0.15);
+ setprop("controls/engines/engine[0]/throttle-rev", pos1 - 0.15);
} else {
unRevThrust_b();
}
if (pos2 > 0.051) {
- setprop("/controls/engines/engine[1]/throttle-rev", pos2 - 0.15);
+ setprop("controls/engines/engine[1]/throttle-rev", pos2 - 0.15);
} else {
unRevThrust_b();
}
@@ -187,12 +187,12 @@ var unRevThrust = func {
}
var unRevThrust_b = func {
- setprop("/controls/engines/engine[0]/throttle-rev", 0);
- setprop("/controls/engines/engine[1]/throttle-rev", 0);
+ setprop("controls/engines/engine[0]/throttle-rev", 0);
+ setprop("controls/engines/engine[1]/throttle-rev", 0);
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
- setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);
- setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 0);
- setprop("/controls/engines/engine[0]/reverser", 0);
- setprop("/controls/engines/engine[1]/reverser", 0);
+ setprop("fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);
+ setprop("fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 0);
+ setprop("controls/engines/engine[0]/reverser", 0);
+ setprop("controls/engines/engine[1]/reverser", 0);
}
diff --git a/Nasal/Systems/FADEC/engines-iae.nas b/Nasal/Systems/FADEC/engines-iae.nas
index 9be8ef66..1878128b 100644
--- a/Nasal/Systems/FADEC/engines-iae.nas
+++ b/Nasal/Systems/FADEC/engines-iae.nas
@@ -7,7 +7,7 @@
# Initializing Vars #
#####################
-var engines = props.globals.getNode("/engines").getChildren("engine");
+var engines = props.globals.getNode("engines").getChildren("engine");
var egt_min = 434;
var egt_start = 587;
var egt_max = 712;
@@ -17,34 +17,34 @@ var egt_lightdn_time = 10;
var shutdown_time = 20;
var egt_shutdown_time = 20;
-setprop("/controls/engines/engine[0]/reverser", 0);
-setprop("/controls/engines/engine[1]/reverser", 0);
-setprop("/controls/engines/engine[0]/igniter-a", 0);
-setprop("/controls/engines/engine[1]/igniter-a", 0);
-setprop("/controls/engines/engine[0]/igniter-b", 0);
-setprop("/controls/engines/engine[1]/igniter-b", 0);
-setprop("/controls/engines/engine[0]/last-igniter", "B");
-setprop("/controls/engines/engine[1]/last-igniter", "B");
+setprop("controls/engines/engine[0]/reverser", 0);
+setprop("controls/engines/engine[1]/reverser", 0);
+setprop("controls/engines/engine[0]/igniter-a", 0);
+setprop("controls/engines/engine[1]/igniter-a", 0);
+setprop("controls/engines/engine[0]/igniter-b", 0);
+setprop("controls/engines/engine[1]/igniter-b", 0);
+setprop("controls/engines/engine[0]/last-igniter", "B");
+setprop("controls/engines/engine[1]/last-igniter", "B");
var eng_init = func {
- setprop("/controls/engines/engine[0]/man-start", 0);
- setprop("/controls/engines/engine[1]/man-start", 0);
+ setprop("controls/engines/engine[0]/man-start", 0);
+ setprop("controls/engines/engine[1]/man-start", 0);
eng_common_init();
}
# Trigger Startups and Stops
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
- if (getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
- if (getprop("/systems/acconfig/autoconfig-running") == 1) {
+ if (getprop("controls/engines/engine[0]/cutoff-switch") == 0) {
+ if (getprop("systems/acconfig/autoconfig-running") == 1) {
fast_start_one();
} else {
- if (getprop("/controls/engines/engine[0]/man-start") == 0) {
+ if (getprop("controls/engines/engine[0]/man-start") == 0) {
start_one_check();
- } else if (getprop("/controls/engines/engine[0]/man-start") == 1) {
+ } else if (getprop("controls/engines/engine[0]/man-start") == 1) {
eng_one_man_start.start();
}
}
- } else if (getprop("/controls/engines/engine[0]/cutoff-switch") == 1) {
+ } else if (getprop("controls/engines/engine[0]/cutoff-switch") == 1) {
cutoff_one();
}
});
@@ -53,29 +53,29 @@ var cutoff_one = func {
eng_one_auto_start.stop();
eng_one_man_start.stop();
eng_one_n2_check.stop();
- setprop("/controls/engines/engine[0]/igniter-a", 0);
- setprop("/controls/engines/engine[0]/igniter-b", 0);
- setprop("/controls/engines/engine[0]/man-start", 0);
- setprop("/systems/pneumatic/eng1-starter", 0);
- setprop("/controls/engines/engine[0]/starter", 0);
- setprop("/controls/engines/engine[0]/cutoff", 1);
- setprop("/engines/engine[0]/state", 0);
+ setprop("controls/engines/engine[0]/igniter-a", 0);
+ setprop("controls/engines/engine[0]/igniter-b", 0);
+ setprop("controls/engines/engine[0]/man-start", 0);
+ setprop("systems/pneumatic/eng1-starter", 0);
+ setprop("controls/engines/engine[0]/starter", 0);
+ setprop("controls/engines/engine[0]/cutoff", 1);
+ setprop("engines/engine[0]/state", 0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
eng_one_n2_check.stop();
}
var fast_start_one = func {
- setprop("/controls/engines/engine[0]/cutoff", 0);
- setprop("/engines/engine[0]/out-of-fuel", 0);
- setprop("/engines/engine[0]/run", 1);
+ setprop("controls/engines/engine[0]/cutoff", 0);
+ setprop("engines/engine[0]/out-of-fuel", 0);
+ setprop("engines/engine[0]/run", 1);
- setprop("/engines/engine[0]/cutoff", 0);
- setprop("/engines/engine[0]/starter", 0);
+ setprop("engines/engine[0]/cutoff", 0);
+ setprop("engines/engine[0]/starter", 0);
- setprop("/fdm/jsbsim/propulsion/set-running", 0);
+ setprop("fdm/jsbsim/propulsion/set-running", 0);
- setprop("/engines/engine[0]/state", 3);
- setprop("/systems/pneumatic/eng1-starter", 0);
+ setprop("engines/engine[0]/state", 3);
+ setprop("systems/pneumatic/eng1-starter", 0);
}
setlistener("/controls/engines/engine[0]/man-start", func {
@@ -83,52 +83,52 @@ setlistener("/controls/engines/engine[0]/man-start", func {
});
var start_one_mancheck = func {
- if (getprop("/controls/engines/engine[0]/man-start") == 1) {
- if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[0]/cutoff-switch") == 1)) {
- setprop("/systems/pneumatic/eng1-starter", 1);
+ if (getprop("controls/engines/engine[0]/man-start") == 1) {
+ if (getprop("controls/engines/engine-start-switch") == 2 and (getprop("controls/engines/engine[0]/cutoff-switch") == 1)) {
+ setprop("systems/pneumatic/eng1-starter", 1);
settimer(start_one_mancheck_b, 0.5);
}
} else {
- if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
- setprop("/systems/pneumatic/eng1-starter", 0);
- setprop("/engines/engine[0]/state", 0);
- setprop("/controls/engines/engine[0]/starter", 0);
+ if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
+ setprop("systems/pneumatic/eng1-starter", 0);
+ setprop("engines/engine[0]/state", 0);
+ setprop("controls/engines/engine[0]/starter", 0);
}
}
}
var start_one_mancheck_b = func {
- if (getprop("/systems/pneumatic/total-psi") >= 28) {
- setprop("/engines/engine[0]/state", 1);
- setprop("/controls/engines/engine[0]/starter", 1);
+ if (getprop("systems/pneumatic/total-psi") >= 28) {
+ setprop("engines/engine[0]/state", 1);
+ setprop("controls/engines/engine[0]/starter", 1);
}
}
var start_one_check = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
- setprop("/systems/pneumatic/eng1-starter", 1);
+ if (getprop("controls/engines/engine-start-switch") == 2 and getprop("controls/engines/engine[0]/cutoff-switch") == 0) {
+ setprop("systems/pneumatic/eng1-starter", 1);
settimer(start_one_check_b, 0.5);
}
}
var start_one_check_b = func {
- if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/systems/pneumatic/total-psi") >= 28) and (getprop("/controls/engines/engine[0]/cutoff-switch") == 0)) {
+ if ((getprop("controls/engines/engine-start-switch") == 2) and (getprop("systems/pneumatic/total-psi") >= 28) and (getprop("controls/engines/engine[0]/cutoff-switch") == 0)) {
auto_start_one();
}
}
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
- if (getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
- if (getprop("/systems/acconfig/autoconfig-running") == 1) {
+ if (getprop("controls/engines/engine[1]/cutoff-switch") == 0) {
+ if (getprop("systems/acconfig/autoconfig-running") == 1) {
fast_start_two();
} else {
- if (getprop("/controls/engines/engine[1]/man-start") == 0) {
+ if (getprop("controls/engines/engine[1]/man-start") == 0) {
start_two_check();
- } else if (getprop("/controls/engines/engine[1]/man-start") == 1) {
+ } else if (getprop("controls/engines/engine[1]/man-start") == 1) {
eng_two_man_start.start();
}
}
- } else if (getprop("/controls/engines/engine[1]/cutoff-switch") == 1) {
+ } else if (getprop("controls/engines/engine[1]/cutoff-switch") == 1) {
cutoff_two();
}
});
@@ -137,28 +137,28 @@ var cutoff_two = func {
eng_two_auto_start.stop();
eng_two_man_start.stop();
eng_two_n2_check.stop();
- setprop("/controls/engines/engine[1]/igniter-a", 0);
- setprop("/controls/engines/engine[1]/igniter-b", 0);
- setprop("/controls/engines/engine[1]/man-start", 0);
- setprop("/systems/pneumatic/eng2-starter", 0);
- setprop("/controls/engines/engine[1]/starter", 0);
- setprop("/controls/engines/engine[1]/cutoff", 1);
- setprop("/engines/engine[1]/state", 0);
+ setprop("controls/engines/engine[1]/igniter-a", 0);
+ setprop("controls/engines/engine[1]/igniter-b", 0);
+ setprop("controls/engines/engine[1]/man-start", 0);
+ setprop("systems/pneumatic/eng2-starter", 0);
+ setprop("controls/engines/engine[1]/starter", 0);
+ setprop("controls/engines/engine[1]/cutoff", 1);
+ setprop("engines/engine[1]/state", 0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
var fast_start_two = func {
- setprop("/controls/engines/engine[1]/cutoff", 0);
- setprop("/engines/engine[1]/out-of-fuel", 0);
- setprop("/engines/engine[1]/run", 1);
+ setprop("controls/engines/engine[1]/cutoff", 0);
+ setprop("engines/engine[1]/out-of-fuel", 0);
+ setprop("engines/engine[1]/run", 1);
- setprop("/engines/engine[1]/cutoff", 0);
- setprop("/engines/engine[1]/starter", 0);
+ setprop("engines/engine[1]/cutoff", 0);
+ setprop("engines/engine[1]/starter", 0);
- setprop("/fdm/jsbsim/propulsion/set-running", 1);
+ setprop("fdm/jsbsim/propulsion/set-running", 1);
- setprop("/engines/engine[1]/state", 3);
- setprop("/systems/pneumatic/eng2-starter", 0);
+ setprop("engines/engine[1]/state", 3);
+ setprop("systems/pneumatic/eng2-starter", 0);
}
setlistener("/controls/engines/engine[1]/man-start", func {
@@ -166,60 +166,60 @@ setlistener("/controls/engines/engine[1]/man-start", func {
});
var start_two_mancheck = func {
- if (getprop("/controls/engines/engine[1]/man-start") == 1) {
- if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[1]/cutoff-switch") == 1)) {
- setprop("/systems/pneumatic/eng2-starter", 1);
+ if (getprop("controls/engines/engine[1]/man-start") == 1) {
+ if (getprop("controls/engines/engine-start-switch") == 2 and (getprop("controls/engines/engine[1]/cutoff-switch") == 1)) {
+ setprop("systems/pneumatic/eng2-starter", 1);
settimer(start_two_mancheck_b, 0.5);
}
} else {
- if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
- setprop("/systems/pneumatic/eng2-starter", 0);
- setprop("/engines/engine[1]/state", 0);
- setprop("/controls/engines/engine[1]/starter", 0);
+ if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
+ setprop("systems/pneumatic/eng2-starter", 0);
+ setprop("engines/engine[1]/state", 0);
+ setprop("controls/engines/engine[1]/starter", 0);
}
}
}
var start_two_mancheck_b = func {
- if (getprop("/systems/pneumatic/total-psi") >= 28) {
- setprop("/engines/engine[1]/state", 1);
- setprop("/controls/engines/engine[1]/starter", 1);
+ if (getprop("systems/pneumatic/total-psi") >= 28) {
+ setprop("engines/engine[1]/state", 1);
+ setprop("controls/engines/engine[1]/starter", 1);
}
}
var start_two_check = func {
- if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
- setprop("/systems/pneumatic/eng2-starter", 1);
+ if (getprop("controls/engines/engine-start-switch") == 2 and getprop("controls/engines/engine[1]/cutoff-switch") == 0) {
+ setprop("systems/pneumatic/eng2-starter", 1);
settimer(start_two_check_b, 0.5);
}
}
var start_two_check_b = func {
- if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/systems/pneumatic/total-psi") >= 28) and (getprop("/controls/engines/engine[1]/cutoff-switch") == 0)) {
+ if ((getprop("controls/engines/engine-start-switch") == 2) and (getprop("systems/pneumatic/total-psi") >= 28) and (getprop("controls/engines/engine[1]/cutoff-switch") == 0)) {
auto_start_two();
}
}
# Start Engine One
var auto_start_one = func {
- setprop("/engines/engine[0]/state", 1);
- setprop("/controls/engines/engine[0]/starter", 1);
+ setprop("engines/engine[0]/state", 1);
+ setprop("controls/engines/engine[0]/starter", 1);
eng_one_auto_start.start();
}
var eng_one_auto_start = maketimer(0.5, func {
- if (getprop("/engines/engine[0]/n1-actual") >= 4.7) {
+ if (getprop("engines/engine[0]/n1-actual") >= 4.7) {
eng_one_auto_start.stop();
- setprop("/engines/engine[0]/state", 2);
- setprop("/controls/engines/engine[0]/cutoff", 0);
- if (getprop("/controls/engines/engine[0]/last-igniter") == "B") {
- setprop("/controls/engines/engine[0]/igniter-a", 1);
- setprop("/controls/engines/engine[0]/igniter-b", 0);
- setprop("/controls/engines/engine[0]/last-igniter", "A");
- } else if (getprop("/controls/engines/engine[0]/last-igniter") == "A") {
- setprop("/controls/engines/engine[0]/igniter-a", 0);
- setprop("/controls/engines/engine[0]/igniter-b", 1);
- setprop("/controls/engines/engine[0]/last-igniter", "B");
+ setprop("engines/engine[0]/state", 2);
+ setprop("controls/engines/engine[0]/cutoff", 0);
+ if (getprop("controls/engines/engine[0]/last-igniter") == "B") {
+ setprop("controls/engines/engine[0]/igniter-a", 1);
+ setprop("controls/engines/engine[0]/igniter-b", 0);
+ setprop("controls/engines/engine[0]/last-igniter", "A");
+ } else if (getprop("controls/engines/engine[0]/last-igniter") == "A") {
+ setprop("controls/engines/engine[0]/igniter-a", 0);
+ setprop("controls/engines/engine[0]/igniter-b", 1);
+ setprop("controls/engines/engine[0]/last-igniter", "B");
}
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_one_egt_check.start();
@@ -228,12 +228,12 @@ var eng_one_auto_start = maketimer(0.5, func {
});
var eng_one_man_start = maketimer(0.5, func {
- if (getprop("/engines/engine[0]/n2-actual") >= 16.7) {
+ if (getprop("engines/engine[0]/n2-actual") >= 16.7) {
eng_one_man_start.stop();
- setprop("/engines/engine[0]/state", 2);
- setprop("/controls/engines/engine[0]/cutoff", 0);
- setprop("/controls/engines/engine[0]/igniter-a", 1);
- setprop("/controls/engines/engine[0]/igniter-b", 1);
+ setprop("engines/engine[0]/state", 2);
+ setprop("controls/engines/engine[0]/cutoff", 0);
+ setprop("controls/engines/engine[0]/igniter-a", 1);
+ setprop("controls/engines/engine[0]/igniter-b", 1);
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_one_egt_check.start();
eng_one_n2_check.start();
@@ -241,48 +241,48 @@ var eng_one_man_start = maketimer(0.5, func {
});
var eng_one_egt_check = maketimer(0.5, func {
- if (getprop("/engines/engine[0]/egt-actual") >= egt_start) {
+ if (getprop("engines/engine[0]/egt-actual") >= egt_start) {
eng_one_egt_check.stop();
interpolate(engines[0].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
});
var eng_one_n2_check = maketimer(0.5, func {
- if (getprop("/engines/engine[0]/n2-actual") >= 43.0) {
- if (getprop("/controls/engines/engine[0]/igniter-a") != 0) {
- setprop("/controls/engines/engine[0]/igniter-a", 0);
+ if (getprop("engines/engine[0]/n2-actual") >= 43.0) {
+ if (getprop("controls/engines/engine[0]/igniter-a") != 0) {
+ setprop("controls/engines/engine[0]/igniter-a", 0);
}
- if (getprop("/controls/engines/engine[0]/igniter-b") != 0) {
- setprop("/controls/engines/engine[0]/igniter-b", 0);
+ if (getprop("controls/engines/engine[0]/igniter-b") != 0) {
+ setprop("controls/engines/engine[0]/igniter-b", 0);
}
}
- if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
+ if (getprop("engines/engine[0]/n2-actual") >= 57.0) {
eng_one_n2_check.stop();
- setprop("/systems/pneumatic/eng1-starter", 0);
- setprop("/engines/engine[0]/state", 3);
+ setprop("systems/pneumatic/eng1-starter", 0);
+ setprop("engines/engine[0]/state", 3);
}
});
# Start Engine Two
var auto_start_two = func {
- setprop("/engines/engine[1]/state", 1);
- setprop("/controls/engines/engine[1]/starter", 1);
+ setprop("engines/engine[1]/state", 1);
+ setprop("controls/engines/engine[1]/starter", 1);
eng_two_auto_start.start();
}
var eng_two_auto_start = maketimer(0.5, func {
- if (getprop("/engines/engine[1]/n1-actual") >= 4.7) {
+ if (getprop("engines/engine[1]/n1-actual") >= 4.7) {
eng_two_auto_start.stop();
- setprop("/engines/engine[1]/state", 2);
- setprop("/controls/engines/engine[1]/cutoff", 0);
- if (getprop("/controls/engines/engine[1]/last-igniter") == "B") {
- setprop("/controls/engines/engine[1]/igniter-a", 1);
- setprop("/controls/engines/engine[1]/igniter-b", 0);
- setprop("/controls/engines/engine[1]/last-igniter", "A");
- } else if (getprop("/controls/engines/engine[1]/last-igniter") == "A") {
- setprop("/controls/engines/engine[1]/igniter-a", 0);
- setprop("/controls/engines/engine[1]/igniter-b", 1);
- setprop("/controls/engines/engine[1]/last-igniter", "B");
+ setprop("engines/engine[1]/state", 2);
+ setprop("controls/engines/engine[1]/cutoff", 0);
+ if (getprop("controls/engines/engine[1]/last-igniter") == "B") {
+ setprop("controls/engines/engine[1]/igniter-a", 1);
+ setprop("controls/engines/engine[1]/igniter-b", 0);
+ setprop("controls/engines/engine[1]/last-igniter", "A");
+ } else if (getprop("controls/engines/engine[1]/last-igniter") == "A") {
+ setprop("controls/engines/engine[1]/igniter-a", 0);
+ setprop("controls/engines/engine[1]/igniter-b", 1);
+ setprop("controls/engines/engine[1]/last-igniter", "B");
}
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_two_egt_check.start();
@@ -291,12 +291,12 @@ var eng_two_auto_start = maketimer(0.5, func {
});
var eng_two_man_start = maketimer(0.5, func {
- if (getprop("/engines/engine[1]/n2-actual") >= 16.7) {
+ if (getprop("engines/engine[1]/n2-actual") >= 16.7) {
eng_two_man_start.stop();
- setprop("/engines/engine[1]/state", 2);
- setprop("/controls/engines/engine[1]/cutoff", 0);
- setprop("/controls/engines/engine[1]/igniter-a", 1);
- setprop("/controls/engines/engine[1]/igniter-b", 1);
+ setprop("engines/engine[1]/state", 2);
+ setprop("controls/engines/engine[1]/cutoff", 0);
+ setprop("controls/engines/engine[1]/igniter-a", 1);
+ setprop("controls/engines/engine[1]/igniter-b", 1);
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_two_egt_check.start();
eng_two_n2_check.start();
@@ -304,70 +304,70 @@ var eng_two_man_start = maketimer(0.5, func {
});
var eng_two_egt_check = maketimer(0.5, func {
- if (getprop("/engines/engine[1]/egt-actual") >= egt_start) {
+ if (getprop("engines/engine[1]/egt-actual") >= egt_start) {
eng_two_egt_check.stop();
interpolate(engines[1].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
});
var eng_two_n2_check = maketimer(0.5, func {
- if (getprop("/engines/engine[1]/n2-actual") >= 43.0) {
- if (getprop("/controls/engines/engine[1]/igniter-a") != 0) {
- setprop("/controls/engines/engine[1]/igniter-a", 0);
+ if (getprop("engines/engine[1]/n2-actual") >= 43.0) {
+ if (getprop("controls/engines/engine[1]/igniter-a") != 0) {
+ setprop("controls/engines/engine[1]/igniter-a", 0);
}
- if (getprop("/controls/engines/engine[1]/igniter-b") != 0) {
- setprop("/controls/engines/engine[1]/igniter-b", 0);
+ if (getprop("controls/engines/engine[1]/igniter-b") != 0) {
+ setprop("controls/engines/engine[1]/igniter-b", 0);
}
}
- if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
+ if (getprop("engines/engine[1]/n2-actual") >= 57.0) {
eng_two_n2_check.stop();
- setprop("/systems/pneumatic/eng2-starter", 0);
- setprop("/engines/engine[1]/state", 3);
+ setprop("systems/pneumatic/eng2-starter", 0);
+ setprop("engines/engine[1]/state", 3);
}
});
# Various Other Stuff
setlistener("/controls/engines/engine-start-switch", func {
- if (getprop("/engines/engine[0]/state") == 0) {
+ if (getprop("engines/engine[0]/state") == 0) {
start_one_check();
start_one_mancheck();
}
- if (getprop("/engines/engine[1]/state") == 0) {
+ if (getprop("engines/engine[1]/state") == 0) {
start_two_check();
start_two_mancheck();
}
- if ((getprop("/controls/engines/engine-start-switch") == 0) or (getprop("/controls/engines/engine-start-switch") == 1)) {
- if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
- setprop("/controls/engines/engine[0]/starter", 0);
- setprop("/controls/engines/engine[0]/cutoff", 1);
- setprop("/systems/pneumatic/eng1-starter", 0);
- setprop("/engines/engine[0]/state", 0);
+ if ((getprop("controls/engines/engine-start-switch") == 0) or (getprop("controls/engines/engine-start-switch") == 1)) {
+ if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
+ setprop("controls/engines/engine[0]/starter", 0);
+ setprop("controls/engines/engine[0]/cutoff", 1);
+ setprop("systems/pneumatic/eng1-starter", 0);
+ setprop("engines/engine[0]/state", 0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
}
- if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
- setprop("/controls/engines/engine[1]/starter", 0);
- setprop("/controls/engines/engine[1]/cutoff", 1);
- setprop("/systems/pneumatic/eng2-starter", 0);
- setprop("/engines/engine[1]/state", 0);
+ if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
+ setprop("controls/engines/engine[1]/starter", 0);
+ setprop("controls/engines/engine[1]/cutoff", 1);
+ setprop("systems/pneumatic/eng2-starter", 0);
+ setprop("engines/engine[1]/state", 0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
}
});
setlistener("/systems/pneumatic/start-psi", func {
- if (getprop("/systems/pneumatic/total-psi") < 12) {
- if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
- setprop("/controls/engines/engine[0]/starter", 0);
- setprop("/controls/engines/engine[0]/cutoff", 1);
- setprop("/systems/pneumatic/eng1-starter", 0);
- setprop("/engines/engine[0]/state", 0);
+ if (getprop("systems/pneumatic/total-psi") < 12) {
+ if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
+ setprop("controls/engines/engine[0]/starter", 0);
+ setprop("controls/engines/engine[0]/cutoff", 1);
+ setprop("systems/pneumatic/eng1-starter", 0);
+ setprop("engines/engine[0]/state", 0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
}
- if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
- setprop("/controls/engines/engine[1]/starter", 0);
- setprop("/controls/engines/engine[1]/cutoff", 1);
- setprop("/systems/pneumatic/eng2-starter", 0);
- setprop("/engines/engine[1]/state", 0);
+ if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
+ setprop("controls/engines/engine[1]/starter", 0);
+ setprop("controls/engines/engine[1]/cutoff", 1);
+ setprop("systems/pneumatic/eng2-starter", 0);
+ setprop("engines/engine[1]/state", 0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
}
diff --git a/Nasal/Systems/FADEC/fadec-cfm.nas b/Nasal/Systems/FADEC/fadec-cfm.nas
index e0653890..04be517c 100644
--- a/Nasal/Systems/FADEC/fadec-cfm.nas
+++ b/Nasal/Systems/FADEC/fadec-cfm.nas
@@ -2,139 +2,139 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
-setprop("/systems/fadec/n1mode1", 0); # Doesn't do anything, just here for other logic #
-setprop("/systems/fadec/n1mode2", 0); # Doesn't do anything, just here for other logic #
-setprop("/systems/fadec/eng1/egt", 1);
-setprop("/systems/fadec/eng1/n1", 1);
-setprop("/systems/fadec/eng1/n2", 1);
-setprop("/systems/fadec/eng1/ff", 1);
-setprop("/systems/fadec/eng2/egt", 1);
-setprop("/systems/fadec/eng2/n1", 1);
-setprop("/systems/fadec/eng2/n2", 1);
-setprop("/systems/fadec/eng2/ff", 1);
-setprop("/systems/fadec/power-avail", 0);
-setprop("/systems/fadec/powered1", 0);
-setprop("/systems/fadec/powered2", 0);
-setprop("/systems/fadec/powered-time", -300);
-setprop("/systems/fadec/powerup", 0);
-setprop("/systems/fadec/eng1-master-count", 0);
-setprop("/systems/fadec/eng1-master-time", -300);
-setprop("/systems/fadec/eng1-off-power", 0);
-setprop("/systems/fadec/eng2-master-count", 0);
-setprop("/systems/fadec/eng2-master-time", -300);
-setprop("/systems/fadec/eng2-off-power", 0);
+setprop("systems/fadec/n1mode1", 0); # Doesn't do anything, just here for other logic #
+setprop("systems/fadec/n1mode2", 0); # Doesn't do anything, just here for other logic #
+setprop("systems/fadec/eng1/egt", 1);
+setprop("systems/fadec/eng1/n1", 1);
+setprop("systems/fadec/eng1/n2", 1);
+setprop("systems/fadec/eng1/ff", 1);
+setprop("systems/fadec/eng2/egt", 1);
+setprop("systems/fadec/eng2/n1", 1);
+setprop("systems/fadec/eng2/n2", 1);
+setprop("systems/fadec/eng2/ff", 1);
+setprop("systems/fadec/power-avail", 0);
+setprop("systems/fadec/powered1", 0);
+setprop("systems/fadec/powered2", 0);
+setprop("systems/fadec/powered-time", -300);
+setprop("systems/fadec/powerup", 0);
+setprop("systems/fadec/eng1-master-count", 0);
+setprop("systems/fadec/eng1-master-time", -300);
+setprop("systems/fadec/eng1-off-power", 0);
+setprop("systems/fadec/eng2-master-count", 0);
+setprop("systems/fadec/eng2-master-time", -300);
+setprop("systems/fadec/eng2-off-power", 0);
var FADEC = {
init: func() {
- setprop("/systems/fadec/powered-time", 0);
- setprop("/systems/fadec/eng1-master-time", -300);
- setprop("/systems/fadec/eng2-master-time", -300);
+ setprop("systems/fadec/powered-time", 0);
+ setprop("systems/fadec/eng1-master-time", -300);
+ setprop("systems/fadec/eng2-master-time", -300);
},
loop: func() {
- var ac1 = getprop("/systems/electrical/bus/ac-1");
- var ac2 = getprop("/systems/electrical/bus/ac-2");
- var acess = getprop("/systems/electrical/bus/ac-ess");
- var state1 = getprop("/engines/engine[0]/state");
- var state2 = getprop("/engines/engine[1]/state");
- var master1 = getprop("/controls/engines/engine[0]/cutoff-switch");
- var master2 = getprop("/controls/engines/engine[1]/cutoff-switch");
- var modeSel = getprop("/controls/engines/engine-start-switch");
- var elapsedSec = getprop("/sim/time/elapsed-sec");
+ var ac1 = getprop("systems/electrical/bus/ac-1");
+ var ac2 = getprop("systems/electrical/bus/ac-2");
+ var acess = getprop("systems/electrical/bus/ac-ess");
+ var state1 = getprop("engines/engine[0]/state");
+ var state2 = getprop("engines/engine[1]/state");
+ var master1 = getprop("controls/engines/engine[0]/cutoff-switch");
+ var master2 = getprop("controls/engines/engine[1]/cutoff-switch");
+ var modeSel = getprop("controls/engines/engine-start-switch");
+ var elapsedSec = getprop("sim/time/elapsed-sec");
if (ac1 >= 110 or ac2 >= 110 or acess >= 110) {
- if (getprop("/systems/fadec/power-avail") != 1) {
- setprop("/systems/fadec/powered-time", elapsedSec);
- setprop("/systems/fadec/power-avail", 1);
+ if (getprop("systems/fadec/power-avail") != 1) {
+ setprop("systems/fadec/powered-time", elapsedSec);
+ setprop("systems/fadec/power-avail", 1);
}
} else {
- if (getprop("/systems/fadec/power-avail") != 0) {
- setprop("/systems/fadec/power-avail", 0);
+ if (getprop("systems/fadec/power-avail") != 0) {
+ setprop("systems/fadec/power-avail", 0);
}
}
- var powerAvail = getprop("/systems/fadec/power-avail");
+ var powerAvail = getprop("systems/fadec/power-avail");
- if (getprop("/systems/fadec/powered-time") + 300 >= elapsedSec) {
- setprop("/systems/fadec/powerup", 1);
+ if (getprop("systems/fadec/powered-time") + 300 >= elapsedSec) {
+ setprop("systems/fadec/powerup", 1);
} else {
- setprop("/systems/fadec/powerup", 0);
+ setprop("systems/fadec/powerup", 0);
}
if (master1 == 1) {
- if (getprop("/systems/fadec/eng1-master-count") != 1) {
- setprop("/systems/fadec/eng1-master-time", elapsedSec);
- setprop("/systems/fadec/eng1-master-count", 1);
+ if (getprop("systems/fadec/eng1-master-count") != 1) {
+ setprop("systems/fadec/eng1-master-time", elapsedSec);
+ setprop("systems/fadec/eng1-master-count", 1);
}
} else {
- if (getprop("/systems/fadec/eng1-master-count") != 0) {
- setprop("/systems/fadec/eng1-master-count", 0);
+ if (getprop("systems/fadec/eng1-master-count") != 0) {
+ setprop("systems/fadec/eng1-master-count", 0);
}
}
- if (getprop("/systems/fadec/eng1-master-time") + 300 >= elapsedSec) {
- setprop("/systems/fadec/eng1-off-power", 1);
+ if (getprop("systems/fadec/eng1-master-time") + 300 >= elapsedSec) {
+ setprop("systems/fadec/eng1-off-power", 1);
} else {
- setprop("/systems/fadec/eng1-off-power", 0);
+ setprop("systems/fadec/eng1-off-power", 0);
}
if (master2 == 1) {
- if (getprop("/systems/fadec/eng2-master-count") != 1) {
- setprop("/systems/fadec/eng2-master-time", elapsedSec);
- setprop("/systems/fadec/eng2-master-count", 1);
+ if (getprop("systems/fadec/eng2-master-count") != 1) {
+ setprop("systems/fadec/eng2-master-time", elapsedSec);
+ setprop("systems/fadec/eng2-master-count", 1);
}
} else {
- if (getprop("/systems/fadec/eng2-master-count") != 0) {
- setprop("/systems/fadec/eng2-master-count", 0);
+ if (getprop("systems/fadec/eng2-master-count") != 0) {
+ setprop("systems/fadec/eng2-master-count", 0);
}
}
- if (getprop("/systems/fadec/eng2-master-time") + 300 >= elapsedSec) {
- setprop("/systems/fadec/eng2-off-power", 1);
+ if (getprop("systems/fadec/eng2-master-time") + 300 >= elapsedSec) {
+ setprop("systems/fadec/eng2-off-power", 1);
} else {
- setprop("/systems/fadec/eng2-off-power", 0);
+ setprop("systems/fadec/eng2-off-power", 0);
}
if (state1 == 3) {
- setprop("/systems/fadec/powered1", 1);
+ setprop("systems/fadec/powered1", 1);
} else if (powerAvail and modeSel == 2) {
- setprop("/systems/fadec/powered1", 1);
+ setprop("systems/fadec/powered1", 1);
} else {
- setprop("/systems/fadec/powered1", 0);
+ setprop("systems/fadec/powered1", 0);
}
if (state2 == 3) {
- setprop("/systems/fadec/powered2", 1);
+ setprop("systems/fadec/powered2", 1);
} else if (powerAvail and modeSel == 2) {
- setprop("/systems/fadec/powered2", 1);
+ setprop("systems/fadec/powered2", 1);
} else {
- setprop("/systems/fadec/powered2", 0);
+ setprop("systems/fadec/powered2", 0);
}
- var powered1 = getprop("/systems/fadec/powered1");
- var powered2 = getprop("/systems/fadec/powered2");
+ var powered1 = getprop("systems/fadec/powered1");
+ var powered2 = getprop("systems/fadec/powered2");
- if (powered1 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng1-off-power")) {
- setprop("/systems/fadec/eng1/n1", 1);
- setprop("/systems/fadec/eng1/egt", 1);
- setprop("/systems/fadec/eng1/n2", 1);
- setprop("/systems/fadec/eng1/ff", 1);
+ if (powered1 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng1-off-power")) {
+ setprop("systems/fadec/eng1/n1", 1);
+ setprop("systems/fadec/eng1/egt", 1);
+ setprop("systems/fadec/eng1/n2", 1);
+ setprop("systems/fadec/eng1/ff", 1);
} else {
- setprop("/systems/fadec/eng1/n1", 0);
- setprop("/systems/fadec/eng1/egt", 0);
- setprop("/systems/fadec/eng1/n2", 0);
- setprop("/systems/fadec/eng1/ff", 0);
+ setprop("systems/fadec/eng1/n1", 0);
+ setprop("systems/fadec/eng1/egt", 0);
+ setprop("systems/fadec/eng1/n2", 0);
+ setprop("systems/fadec/eng1/ff", 0);
}
- if (powered2 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng2-off-power")) {
- setprop("/systems/fadec/eng2/n1", 1);
- setprop("/systems/fadec/eng2/egt", 1);
- setprop("/systems/fadec/eng2/n2", 1);
- setprop("/systems/fadec/eng2/ff", 1);
+ if (powered2 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng2-off-power")) {
+ setprop("systems/fadec/eng2/n1", 1);
+ setprop("systems/fadec/eng2/egt", 1);
+ setprop("systems/fadec/eng2/n2", 1);
+ setprop("systems/fadec/eng2/ff", 1);
} else {
- setprop("/systems/fadec/eng2/n1", 0);
- setprop("/systems/fadec/eng2/egt", 0);
- setprop("/systems/fadec/eng2/n2", 0);
- setprop("/systems/fadec/eng2/ff", 0);
+ setprop("systems/fadec/eng2/n1", 0);
+ setprop("systems/fadec/eng2/egt", 0);
+ setprop("systems/fadec/eng2/n2", 0);
+ setprop("systems/fadec/eng2/ff", 0);
}
},
};
diff --git a/Nasal/Systems/FADEC/fadec-common.nas b/Nasal/Systems/FADEC/fadec-common.nas
index 5af4e4d0..af7b93f5 100644
--- a/Nasal/Systems/FADEC/fadec-common.nas
+++ b/Nasal/Systems/FADEC/fadec-common.nas
@@ -2,7 +2,7 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
-if (getprop("/options/eng") == "IAE") {
+if (getprop("options/eng") == "IAE") {
io.include("fadec-iae.nas");
} else {
io.include("fadec-cfm.nas");
@@ -27,36 +27,36 @@ var flaps = 0;
var alphaProt = 0;
var togaLock = 0;
var gs = 0;
-setprop("/systems/thrust/alpha-floor", 0);
-setprop("/systems/thrust/toga-lk", 0);
-setprop("/systems/thrust/epr/toga-lim", 0.0);
-setprop("/systems/thrust/epr/mct-lim", 0.0);
-setprop("/systems/thrust/epr/flx-lim", 0.0);
-setprop("/systems/thrust/epr/clb-lim", 0.0);
-setprop("/systems/thrust/n1/toga-lim", 0.0);
-setprop("/systems/thrust/n1/mct-lim", 0.0);
-setprop("/systems/thrust/n1/flx-lim", 0.0);
-setprop("/systems/thrust/n1/clb-lim", 0.0);
-setprop("/engines/flx-thr", 0.0);
-setprop("/controls/engines/thrust-limit", "TOGA");
-setprop("/controls/engines/epr-limit", 0.0);
-setprop("/controls/engines/n1-limit", 0.0);
-setprop("/systems/thrust/state1", "IDLE");
-setprop("/systems/thrust/state2", "IDLE");
-setprop("/systems/thrust/lvrclb", 0);
-setprop("/systems/thrust/clbreduc-ft", "1500");
-setprop("/systems/thrust/toga-lim", 0.0);
-setprop("/systems/thrust/mct-lim", 0.0);
-setprop("/systems/thrust/clb-lim", 0.0);
-setprop("/systems/thrust/lim-flex", 0);
-setprop("/engines/flex-derate", 0);
-setprop("/systems/thrust/eng-out", 0);
-setprop("/systems/thrust/thr-locked", 0);
-setprop("/systems/thrust/thr-locked-alert", 0);
-setprop("/systems/thrust/thr-locked-flash", 0);
-setprop("/systems/thrust/thr-lock-time", 0);
-setprop("/systems/thrust/thr-lock-cmd[0]", 0);
-setprop("/systems/thrust/thr-lock-cmd[1]", 0);
+setprop("systems/thrust/alpha-floor", 0);
+setprop("systems/thrust/toga-lk", 0);
+setprop("systems/thrust/epr/toga-lim", 0.0);
+setprop("systems/thrust/epr/mct-lim", 0.0);
+setprop("systems/thrust/epr/flx-lim", 0.0);
+setprop("systems/thrust/epr/clb-lim", 0.0);
+setprop("systems/thrust/n1/toga-lim", 0.0);
+setprop("systems/thrust/n1/mct-lim", 0.0);
+setprop("systems/thrust/n1/flx-lim", 0.0);
+setprop("systems/thrust/n1/clb-lim", 0.0);
+setprop("engines/flx-thr", 0.0);
+setprop("controls/engines/thrust-limit", "TOGA");
+setprop("controls/engines/epr-limit", 0.0);
+setprop("controls/engines/n1-limit", 0.0);
+setprop("systems/thrust/state1", "IDLE");
+setprop("systems/thrust/state2", "IDLE");
+setprop("systems/thrust/lvrclb", 0);
+setprop("systems/thrust/clbreduc-ft", "1500");
+setprop("systems/thrust/toga-lim", 0.0);
+setprop("systems/thrust/mct-lim", 0.0);
+setprop("systems/thrust/clb-lim", 0.0);
+setprop("systems/thrust/lim-flex", 0);
+setprop("engines/flex-derate", 0);
+setprop("systems/thrust/eng-out", 0);
+setprop("systems/thrust/thr-locked", 0);
+setprop("systems/thrust/thr-locked-alert", 0);
+setprop("systems/thrust/thr-locked-flash", 0);
+setprop("systems/thrust/thr-lock-time", 0);
+setprop("systems/thrust/thr-lock-cmd[0]", 0);
+setprop("systems/thrust/thr-lock-cmd[1]", 0);
setlistener("/sim/signals/fdm-initialized", func {
thrust_loop.start();
@@ -64,142 +64,142 @@ setlistener("/sim/signals/fdm-initialized", func {
});
setlistener("/controls/engines/engine[0]/throttle-pos", func {
- engstate1 = getprop("/engines/engine[0]/state");
- engstate2 = getprop("/engines/engine[1]/state");
- thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
- if (getprop("/systems/thrust/alpha-floor") == 0 and getprop("/systems/thrust/toga-lk") == 0) {
+ engstate1 = getprop("engines/engine[0]/state");
+ engstate2 = getprop("engines/engine[1]/state");
+ thr1 = getprop("controls/engines/engine[0]/throttle-pos");
+ if (getprop("systems/thrust/alpha-floor") == 0 and getprop("systems/thrust/toga-lk") == 0) {
if (thr1 < 0.01) {
- setprop("/systems/thrust/state1", "IDLE");
+ setprop("systems/thrust/state1", "IDLE");
unflex();
atoff_request();
} else if (thr1 >= 0.01 and thr1 < 0.60) {
- setprop("/systems/thrust/state1", "MAN");
+ setprop("systems/thrust/state1", "MAN");
unflex();
} else if (thr1 >= 0.60 and thr1 < 0.65) {
- setprop("/systems/thrust/state1", "CL");
+ setprop("systems/thrust/state1", "CL");
unflex();
} else if (thr1 >= 0.65 and thr1 < 0.78) {
- setprop("/systems/thrust/state1", "MAN THR");
+ setprop("systems/thrust/state1", "MAN THR");
unflex();
} else if (thr1 >= 0.78 and thr1 < 0.83) {
- if (getprop("/systems/thrust/eng-out") != 1) {
- if (getprop("/controls/engines/thrust-limit") == "FLX") {
- if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
- setprop("/it-autoflight/input/athr", 1);
+ if (getprop("systems/thrust/eng-out") != 1) {
+ if (getprop("controls/engines/thrust-limit") == "FLX") {
+ if (getprop("gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
+ setprop("it-autoflight/input/athr", 1);
}
- setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
+ setprop("controls/engines/engine[0]/throttle-fdm", 0.99);
} else {
- setprop("/controls/engines/engine[0]/throttle-fdm", 0.95);
+ setprop("controls/engines/engine[0]/throttle-fdm", 0.95);
}
}
- setprop("/systems/thrust/state1", "MCT");
+ setprop("systems/thrust/state1", "MCT");
} else if (thr1 >= 0.83 and thr1 < 0.95) {
- setprop("/systems/thrust/state1", "MAN THR");
+ setprop("systems/thrust/state1", "MAN THR");
unflex();
} else if (thr1 >= 0.95) {
- if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
- setprop("/it-autoflight/input/athr", 1);
+ if (getprop("gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
+ setprop("it-autoflight/input/athr", 1);
}
- setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
- setprop("/systems/thrust/state1", "TOGA");
+ setprop("controls/engines/engine[0]/throttle-fdm", 0.99);
+ setprop("systems/thrust/state1", "TOGA");
unflex();
}
} else {
if (thr1 < 0.01) {
- setprop("/systems/thrust/state1", "IDLE");
+ setprop("systems/thrust/state1", "IDLE");
} else if (thr1 >= 0.01 and thr1 < 0.60) {
- setprop("/systems/thrust/state1", "MAN");
+ setprop("systems/thrust/state1", "MAN");
} else if (thr1 >= 0.60 and thr1 < 0.65) {
- setprop("/systems/thrust/state1", "CL");
+ setprop("systems/thrust/state1", "CL");
} else if (thr1 >= 0.65 and thr1 < 0.78) {
- setprop("/systems/thrust/state1", "MAN THR");
+ setprop("systems/thrust/state1", "MAN THR");
} else if (thr1 >= 0.78 and thr1 < 0.83) {
- setprop("/systems/thrust/state1", "MCT");
+ setprop("systems/thrust/state1", "MCT");
} else if (thr1 >= 0.83 and thr1 < 0.95) {
- setprop("/systems/thrust/state1", "MAN THR");
+ setprop("systems/thrust/state1", "MAN THR");
} else if (thr1 >= 0.95) {
- setprop("/systems/thrust/state1", "TOGA");
+ setprop("systems/thrust/state1", "TOGA");
}
- setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
+ setprop("controls/engines/engine[0]/throttle-fdm", 0.99);
}
}, 0, 0);
setlistener("/controls/engines/engine[1]/throttle-pos", func {
- engstate1 = getprop("/engines/engine[0]/state");
- engstate2 = getprop("/engines/engine[1]/state");
- thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
- if (getprop("/systems/thrust/alpha-floor") == 0 and getprop("/systems/thrust/toga-lk") == 0) {
+ engstate1 = getprop("engines/engine[0]/state");
+ engstate2 = getprop("engines/engine[1]/state");
+ thr2 = getprop("controls/engines/engine[1]/throttle-pos");
+ if (getprop("systems/thrust/alpha-floor") == 0 and getprop("systems/thrust/toga-lk") == 0) {
if (thr2 < 0.01) {
- setprop("/systems/thrust/state2", "IDLE");
+ setprop("systems/thrust/state2", "IDLE");
unflex();
atoff_request();
} else if (thr2 >= 0.01 and thr2 < 0.60) {
- setprop("/systems/thrust/state2", "MAN");
+ setprop("systems/thrust/state2", "MAN");
unflex();
} else if (thr2 >= 0.60 and thr2 < 0.65) {
- setprop("/systems/thrust/state2", "CL");
+ setprop("systems/thrust/state2", "CL");
unflex();
} else if (thr2 >= 0.65 and thr2 < 0.78) {
- setprop("/systems/thrust/state2", "MAN THR");
+ setprop("systems/thrust/state2", "MAN THR");
unflex();
} else if (thr2 >= 0.78 and thr2 < 0.83) {
- if (getprop("/systems/thrust/eng-out") != 1) {
- if (getprop("/controls/engines/thrust-limit") == "FLX") {
- if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
- setprop("/it-autoflight/input/athr", 1);
+ if (getprop("systems/thrust/eng-out") != 1) {
+ if (getprop("controls/engines/thrust-limit") == "FLX") {
+ if (getprop("gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
+ setprop("it-autoflight/input/athr", 1);
}
- setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
+ setprop("controls/engines/engine[1]/throttle-fdm", 0.99);
} else {
- setprop("/controls/engines/engine[1]/throttle-fdm", 0.95);
+ setprop("controls/engines/engine[1]/throttle-fdm", 0.95);
}
}
- setprop("/systems/thrust/state2", "MCT");
+ setprop("systems/thrust/state2", "MCT");
} else if (thr2 >= 0.83 and thr2 < 0.95) {
- setprop("/systems/thrust/state2", "MAN THR");
+ setprop("systems/thrust/state2", "MAN THR");
unflex();
} else if (thr2 >= 0.95) {
- if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
- setprop("/it-autoflight/input/athr", 1);
+ if (getprop("gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
+ setprop("it-autoflight/input/athr", 1);
}
- setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
- setprop("/systems/thrust/state2", "TOGA");
+ setprop("controls/engines/engine[1]/throttle-fdm", 0.99);
+ setprop("systems/thrust/state2", "TOGA");
unflex();
}
} else {
if (thr2 < 0.01) {
- setprop("/systems/thrust/state2", "IDLE");
+ setprop("systems/thrust/state2", "IDLE");
} else if (thr2 >= 0.01 and thr2 < 0.60) {
- setprop("/systems/thrust/state2", "MAN");
+ setprop("systems/thrust/state2", "MAN");
} else if (thr2 >= 0.60 and thr2 < 0.65) {
- setprop("/systems/thrust/state2", "CL");
+ setprop("systems/thrust/state2", "CL");
} else if (thr2 >= 0.65 and thr2 < 0.78) {
- setprop("/systems/thrust/state2", "MAN THR");
+ setprop("systems/thrust/state2", "MAN THR");
} else if (thr2 >= 0.78 and thr2 < 0.83) {
- setprop("/systems/thrust/state2", "MCT");
+ setprop("systems/thrust/state2", "MCT");
} else if (thr2 >= 0.83 and thr2 < 0.95) {
- setprop("/systems/thrust/state2", "MAN THR");
+ setprop("systems/thrust/state2", "MAN THR");
} else if (thr2 >= 0.95) {
- setprop("/systems/thrust/state2", "TOGA");
+ setprop("systems/thrust/state2", "TOGA");
}
- setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
+ setprop("controls/engines/engine[1]/throttle-fdm", 0.99);
}
}, 0, 0);
# Alpha Floor and Toga Lock
setlistener("/it-autoflight/input/athr", func {
- if (getprop("/systems/thrust/alpha-floor") == 1) {
- setprop("/it-autoflight/input/athr", 1);
+ if (getprop("systems/thrust/alpha-floor") == 1) {
+ setprop("it-autoflight/input/athr", 1);
} else {
- setprop("/systems/thrust/toga-lk", 0);
+ setprop("systems/thrust/toga-lk", 0);
}
});
# Checks if all throttles are in the IDLE position, before tuning off the A/THR.
var atoff_request = func {
- state1 = getprop("/systems/thrust/state1");
- state2 = getprop("/systems/thrust/state2");
- if ((state1 == "IDLE") and (state2 == "IDLE") and (getprop("/systems/thrust/alpha-floor") == 0) and (getprop("/systems/thrust/toga-lk") == 0)) {
- if (getprop("/it-autoflight/input/athr") == 1 and pts.Position.gearAglFt.getValue() > 50) {
+ state1 = getprop("systems/thrust/state1");
+ state2 = getprop("systems/thrust/state2");
+ if ((state1 == "IDLE") and (state2 == "IDLE") and (getprop("systems/thrust/alpha-floor") == 0) and (getprop("systems/thrust/toga-lk") == 0)) {
+ if (getprop("it-autoflight/input/athr") == 1 and pts.Position.gearAglFt.getValue() > 50) {
fcu.athrOff("soft");
} elsif (pts.Position.gearAglFt.getValue() < 50) {
fcu.athrOff("none");
@@ -208,66 +208,66 @@ var atoff_request = func {
}
var thrust_loop = maketimer(0.04, func {
- state1 = getprop("/systems/thrust/state1");
- state2 = getprop("/systems/thrust/state2");
- engstate1 = getprop("/engines/engine[0]/state");
- engstate2 = getprop("/engines/engine[1]/state");
- thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
- thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
- eprtoga = getprop("/systems/thrust/epr/toga-lim");
- eprmct = getprop("/systems/thrust/epr/mct-lim");
- eprflx = getprop("/systems/thrust/epr/flx-lim");
- eprclb = getprop("/systems/thrust/epr/clb-lim");
- n1toga = getprop("/systems/thrust/n1/toga-lim");
- n1mct = getprop("/systems/thrust/n1/mct-lim");
- n1flx = getprop("/systems/thrust/n1/flx-lim");
- n1clb = getprop("/systems/thrust/n1/clb-lim");
- gs = getprop("/velocities/groundspeed-kt");
- if (getprop("/FMGC/internal/flex-set") == 1 and getprop("/systems/fadec/n1mode1") == 0 and getprop("/systems/fadec/n1mode2") == 0 and getprop("/gear/gear[1]/wow") == 1 and getprop("/gear/gear[2]/wow") == 1 and gs < 40) {
- setprop("/systems/thrust/lim-flex", 1);
- } else if (getprop("/FMGC/internal/flex-set") == 0 or engstate1 != 3 or engstate2 != 3) {
- setprop("/systems/thrust/lim-flex", 0);
+ state1 = getprop("systems/thrust/state1");
+ state2 = getprop("systems/thrust/state2");
+ engstate1 = getprop("engines/engine[0]/state");
+ engstate2 = getprop("engines/engine[1]/state");
+ thr1 = getprop("controls/engines/engine[0]/throttle-pos");
+ thr2 = getprop("controls/engines/engine[1]/throttle-pos");
+ eprtoga = getprop("systems/thrust/epr/toga-lim");
+ eprmct = getprop("systems/thrust/epr/mct-lim");
+ eprflx = getprop("systems/thrust/epr/flx-lim");
+ eprclb = getprop("systems/thrust/epr/clb-lim");
+ n1toga = getprop("systems/thrust/n1/toga-lim");
+ n1mct = getprop("systems/thrust/n1/mct-lim");
+ n1flx = getprop("systems/thrust/n1/flx-lim");
+ n1clb = getprop("systems/thrust/n1/clb-lim");
+ gs = getprop("velocities/groundspeed-kt");
+ if (getprop("FMGC/internal/flex-set") == 1 and getprop("systems/fadec/n1mode1") == 0 and getprop("systems/fadec/n1mode2") == 0 and getprop("gear/gear[1]/wow") == 1 and getprop("gear/gear[2]/wow") == 1 and gs < 40) {
+ setprop("systems/thrust/lim-flex", 1);
+ } else if (getprop("FMGC/internal/flex-set") == 0 or engstate1 != 3 or engstate2 != 3) {
+ setprop("systems/thrust/lim-flex", 0);
}
- if (getprop("/controls/engines/engine[0]/reverser") == "1" or getprop("/controls/engines/engine[1]/reverser") == "1") {
- setprop("/controls/engines/thrust-limit", "MREV");
- setprop("/controls/engines/epr-limit", 1.000);
- setprop("/controls/engines/n1-limit", 0.0);
- } else if (getprop("/gear/gear[1]/wow") == 0 or getprop("/gear/gear[2]/wow") == 0 or (engstate1 != 3 and engstate2 != 3)) {
- if ((state1 == "TOGA" or state2 == "TOGA" or (state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) or getprop("/systems/thrust/alpha-floor") == 1 or getprop("/systems/thrust/toga-lk") == 1) {
- setprop("/controls/engines/thrust-limit", "TOGA");
- setprop("/controls/engines/epr-limit", eprtoga);
- setprop("/controls/engines/n1-limit", n1toga);
- } else if ((state1 == "MCT" or state2 == "MCT" or (state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("/systems/thrust/lim-flex") == 0) {
- setprop("/controls/engines/thrust-limit", "MCT");
- setprop("/controls/engines/epr-limit", eprmct);
- setprop("/controls/engines/n1-limit", n1mct);
- } else if ((state1 == "MCT" or state2 == "MCT" or (state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("/systems/thrust/lim-flex") == 1) {
- setprop("/controls/engines/thrust-limit", "FLX");
- setprop("/controls/engines/epr-limit", eprflx);
- setprop("/controls/engines/n1-limit", n1flx);
+ if (getprop("controls/engines/engine[0]/reverser") == "1" or getprop("controls/engines/engine[1]/reverser") == "1") {
+ setprop("controls/engines/thrust-limit", "MREV");
+ setprop("controls/engines/epr-limit", 1.000);
+ setprop("controls/engines/n1-limit", 0.0);
+ } else if (getprop("gear/gear[1]/wow") == 0 or getprop("gear/gear[2]/wow") == 0 or (engstate1 != 3 and engstate2 != 3)) {
+ if ((state1 == "TOGA" or state2 == "TOGA" or (state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) or getprop("systems/thrust/alpha-floor") == 1 or getprop("systems/thrust/toga-lk") == 1) {
+ setprop("controls/engines/thrust-limit", "TOGA");
+ setprop("controls/engines/epr-limit", eprtoga);
+ setprop("controls/engines/n1-limit", n1toga);
+ } else if ((state1 == "MCT" or state2 == "MCT" or (state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("systems/thrust/lim-flex") == 0) {
+ setprop("controls/engines/thrust-limit", "MCT");
+ setprop("controls/engines/epr-limit", eprmct);
+ setprop("controls/engines/n1-limit", n1mct);
+ } else if ((state1 == "MCT" or state2 == "MCT" or (state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("systems/thrust/lim-flex") == 1) {
+ setprop("controls/engines/thrust-limit", "FLX");
+ setprop("controls/engines/epr-limit", eprflx);
+ setprop("controls/engines/n1-limit", n1flx);
} else if (state1 == "CL" or state2 == "CL" or state1 == "MAN" or state2 == "MAN" or state1 == "IDLE" or state2 == "IDLE") {
- setprop("/controls/engines/thrust-limit", "CLB");
- setprop("/controls/engines/epr-limit", eprclb);
- setprop("/controls/engines/n1-limit", n1clb);
+ setprop("controls/engines/thrust-limit", "CLB");
+ setprop("controls/engines/epr-limit", eprclb);
+ setprop("controls/engines/n1-limit", n1clb);
}
- } else if (getprop("/FMGC/internal/flex-set") == 1 and getprop("/systems/fadec/n1mode1") == 0 and getprop("/systems/fadec/n1mode2") == 0) {
- if ((state1 == "TOGA" or state2 == "TOGA" or (state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) or getprop("/systems/thrust/alpha-floor") == 1 or getprop("/systems/thrust/toga-lk") == 1) {
- setprop("/controls/engines/thrust-limit", "TOGA");
- setprop("/controls/engines/epr-limit", eprtoga);
- setprop("/controls/engines/n1-limit", n1toga);
+ } else if (getprop("FMGC/internal/flex-set") == 1 and getprop("systems/fadec/n1mode1") == 0 and getprop("systems/fadec/n1mode2") == 0) {
+ if ((state1 == "TOGA" or state2 == "TOGA" or (state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) or getprop("systems/thrust/alpha-floor") == 1 or getprop("systems/thrust/toga-lk") == 1) {
+ setprop("controls/engines/thrust-limit", "TOGA");
+ setprop("controls/engines/epr-limit", eprtoga);
+ setprop("controls/engines/n1-limit", n1toga);
} else {
- setprop("/controls/engines/thrust-limit", "FLX");
- setprop("/controls/engines/epr-limit", eprflx);
- setprop("/controls/engines/n1-limit", n1flx);
+ setprop("controls/engines/thrust-limit", "FLX");
+ setprop("controls/engines/epr-limit", eprflx);
+ setprop("controls/engines/n1-limit", n1flx);
}
} else {
- setprop("/controls/engines/thrust-limit", "TOGA");
- setprop("/controls/engines/epr-limit", eprtoga);
- setprop("/controls/engines/n1-limit", n1toga);
+ setprop("controls/engines/thrust-limit", "TOGA");
+ setprop("controls/engines/epr-limit", eprtoga);
+ setprop("controls/engines/n1-limit", n1toga);
}
- alpha = getprop("/fdm/jsbsim/aero/alpha-deg");
- flaps = getprop("/controls/flight/flap-pos");
+ alpha = getprop("fdm/jsbsim/aero/alpha-deg");
+ flaps = getprop("controls/flight/flap-pos");
if (flaps == 0) {
alphaProt = 9.5;
} else if (flaps == 1 or flaps == 2 or flaps == 3) {
@@ -278,115 +278,115 @@ var thrust_loop = maketimer(0.04, func {
alphaProt = 13.0;
}
togaLock = alphaProt - 1;
- if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and getprop("/it-fbw/law") == 0 and (getprop("/systems/thrust/eng-out") == 0 or (getprop("/systems/thrust/eng-out") == 1 and flaps == 0)) and getprop("/systems/fadec/n1mode1") == 0
- and getprop("/systems/fadec/n1mode2") == 0) {
+ if (getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0 and getprop("it-fbw/law") == 0 and (getprop("systems/thrust/eng-out") == 0 or (getprop("systems/thrust/eng-out") == 1 and flaps == 0)) and getprop("systems/fadec/n1mode1") == 0
+ and getprop("systems/fadec/n1mode2") == 0) {
if (alpha > alphaProt and pts.Position.gearAglFt.getValue() >= 100) {
- setprop("/systems/thrust/alpha-floor", 1);
- setprop("/systems/thrust/toga-lk", 0);
- setprop("/it-autoflight/input/athr", 1);
- setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
- setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
- } else if (getprop("/systems/thrust/alpha-floor") == 1 and alpha < togaLock) {
- setprop("/systems/thrust/alpha-floor", 0);
- setprop("/it-autoflight/input/athr", 1);
- setprop("/systems/thrust/toga-lk", 1);
- setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
- setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
+ setprop("systems/thrust/alpha-floor", 1);
+ setprop("systems/thrust/toga-lk", 0);
+ setprop("it-autoflight/input/athr", 1);
+ setprop("controls/engines/engine[0]/throttle-fdm", 0.99);
+ setprop("controls/engines/engine[1]/throttle-fdm", 0.99);
+ } else if (getprop("systems/thrust/alpha-floor") == 1 and alpha < togaLock) {
+ setprop("systems/thrust/alpha-floor", 0);
+ setprop("it-autoflight/input/athr", 1);
+ setprop("systems/thrust/toga-lk", 1);
+ setprop("controls/engines/engine[0]/throttle-fdm", 0.99);
+ setprop("controls/engines/engine[1]/throttle-fdm", 0.99);
}
} else {
- setprop("/systems/thrust/alpha-floor", 0);
- setprop("/systems/thrust/toga-lk", 0);
+ setprop("systems/thrust/alpha-floor", 0);
+ setprop("systems/thrust/toga-lk", 0);
}
});
var unflex = func {
- state1 = getprop("/systems/thrust/state1");
- state2 = getprop("/systems/thrust/state2");
- if (state1 != "MCT" and state2 != "MCT" and getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
- setprop("/systems/thrust/lim-flex", 0);
+ state1 = getprop("systems/thrust/state1");
+ state2 = getprop("systems/thrust/state2");
+ if (state1 != "MCT" and state2 != "MCT" and getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0) {
+ setprop("systems/thrust/lim-flex", 0);
}
}
var thrust_flash = maketimer(0.5, func {
- state1 = getprop("/systems/thrust/state1");
- state2 = getprop("/systems/thrust/state2");
+ state1 = getprop("systems/thrust/state1");
+ state2 = getprop("systems/thrust/state2");
- if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and (getprop("/engines/engine[0]/state") != 3 or getprop("/engines/engine[1]/state") != 3)) {
- setprop("/systems/thrust/eng-out", 1);
+ if (getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0 and (getprop("engines/engine[0]/state") != 3 or getprop("engines/engine[1]/state") != 3)) {
+ setprop("systems/thrust/eng-out", 1);
} else {
- setprop("/systems/thrust/eng-out", 0);
+ setprop("systems/thrust/eng-out", 0);
}
- if (state1 == "CL" and state2 == "CL" and getprop("/systems/thrust/eng-out") != 1) {
- setprop("/systems/thrust/lvrclb", 0);
- } else if (state1 == "MCT" and state2 == "MCT" and getprop("/systems/thrust/lim-flex") != 1 and getprop("/systems/thrust/eng-out") == 1) {
- setprop("/systems/thrust/lvrclb", 0);
+ if (state1 == "CL" and state2 == "CL" and getprop("systems/thrust/eng-out") != 1) {
+ setprop("systems/thrust/lvrclb", 0);
+ } else if (state1 == "MCT" and state2 == "MCT" and getprop("systems/thrust/lim-flex") != 1 and getprop("systems/thrust/eng-out") == 1) {
+ setprop("systems/thrust/lvrclb", 0);
} else {
- var status = getprop("/systems/thrust/lvrclb");
+ var status = getprop("systems/thrust/lvrclb");
if (status == 0) {
- if (getprop("/gear/gear[0]/wow") == 0) {
- if (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN") {
- setprop("/systems/thrust/lvrclb", 1);
+ if (getprop("gear/gear[0]/wow") == 0) {
+ if (getprop("systems/thrust/state1") == "MAN" or getprop("systems/thrust/state2") == "MAN") {
+ setprop("systems/thrust/lvrclb", 1);
} else {
- if (getprop("/instrumentation/altimeter/indicated-altitude-ft") >= getprop("/systems/thrust/clbreduc-ft") and getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
- setprop("/systems/thrust/lvrclb", 1);
- } else if ((state1 == "CL" and state2 != "CL") or (state1 != "CL" and state2 == "CL") and getprop("/systems/thrust/eng-out") != 1) {
- setprop("/systems/thrust/lvrclb", 1);
+ if (getprop("instrumentation/altimeter/indicated-altitude-ft") >= getprop("systems/thrust/clbreduc-ft") and getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0) {
+ setprop("systems/thrust/lvrclb", 1);
+ } else if ((state1 == "CL" and state2 != "CL") or (state1 != "CL" and state2 == "CL") and getprop("systems/thrust/eng-out") != 1) {
+ setprop("systems/thrust/lvrclb", 1);
} else {
- setprop("/systems/thrust/lvrclb", 0);
+ setprop("systems/thrust/lvrclb", 0);
}
}
}
} else if (status == 1) {
- setprop("/systems/thrust/lvrclb", 0);
+ setprop("systems/thrust/lvrclb", 0);
}
}
});
var lockThr = func() {
- state1 = getprop("/systems/thrust/state1");
- state2 = getprop("/systems/thrust/state2");
- if ((state1 == "CL" and state2 == "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 == "MCT" and state2 == "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
- setprop("/systems/thrust/thr-lock-time", getprop("/sim/time/elapsed-sec"));
- setprop("/systems/thrust/thr-locked", 1);
+ state1 = getprop("systems/thrust/state1");
+ state2 = getprop("systems/thrust/state2");
+ if ((state1 == "CL" and state2 == "CL" and getprop("systems/thrust/eng-out") == 0) or (state1 == "MCT" and state2 == "MCT" and getprop("systems/thrust/eng-out") == 1)) {
+ setprop("systems/thrust/thr-lock-time", getprop("sim/time/elapsed-sec"));
+ setprop("systems/thrust/thr-locked", 1);
lockTimer.start();
}
}
var checkLockThr = func() {
- if (getprop("/systems/thrust/thr-lock-time") + 5 > getprop("/sim/time/elapsed-sec")) { return; }
+ if (getprop("systems/thrust/thr-lock-time") + 5 > getprop("sim/time/elapsed-sec")) { return; }
if (fmgc.Output.athr.getBoolValue()) {
lockTimer.stop();
- setprop("/systems/thrust/thr-locked", 0);
- setprop("/systems/thrust/thr-locked-alert", 0);
- setprop("/systems/thrust/thr-lock-time", 0);
- setprop("/systems/thrust/thr-locked-flash", 0);
+ setprop("systems/thrust/thr-locked", 0);
+ setprop("systems/thrust/thr-locked-alert", 0);
+ setprop("systems/thrust/thr-lock-time", 0);
+ setprop("systems/thrust/thr-locked-flash", 0);
return;
}
- if (getprop("/systems/thrust/thr-locked") == 0) {
+ if (getprop("systems/thrust/thr-locked") == 0) {
lockTimer.stop();
- setprop("/systems/thrust/thr-locked", 0);
- setprop("/systems/thrust/thr-locked-alert", 0);
- setprop("/systems/thrust/thr-lock-time", 0);
- setprop("/systems/thrust/thr-locked-flash", 0);
+ setprop("systems/thrust/thr-locked", 0);
+ setprop("systems/thrust/thr-locked-alert", 0);
+ setprop("systems/thrust/thr-lock-time", 0);
+ setprop("systems/thrust/thr-locked-flash", 0);
return;
}
- state1 = getprop("/systems/thrust/state1");
- state2 = getprop("/systems/thrust/state2");
+ state1 = getprop("systems/thrust/state1");
+ state2 = getprop("systems/thrust/state2");
- if ((state1 != "CL" and state2 != "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 != "MCT" and state2 != "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
+ if ((state1 != "CL" and state2 != "CL" and getprop("systems/thrust/eng-out") == 0) or (state1 != "MCT" and state2 != "MCT" and getprop("systems/thrust/eng-out") == 1)) {
lockTimer.stop();
- setprop("/systems/thrust/thr-locked", 0);
- setprop("/systems/thrust/thr-locked-alert", 0);
- setprop("/systems/thrust/thr-lock-time", 0);
- setprop("/systems/thrust/thr-locked-flash", 0);
- } elsif ((state1 == "CL" and state2 == "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 == "MCT" and state2 == "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
- setprop("/systems/thrust/thr-locked-alert", 1);
- setprop("/systems/thrust/thr-lock-time", getprop("/sim/time/elapsed-sec"));
- setprop("/systems/thrust/thr-locked-flash", 1);
+ setprop("systems/thrust/thr-locked", 0);
+ setprop("systems/thrust/thr-locked-alert", 0);
+ setprop("systems/thrust/thr-lock-time", 0);
+ setprop("systems/thrust/thr-locked-flash", 0);
+ } elsif ((state1 == "CL" and state2 == "CL" and getprop("systems/thrust/eng-out") == 0) or (state1 == "MCT" and state2 == "MCT" and getprop("systems/thrust/eng-out") == 1)) {
+ setprop("systems/thrust/thr-locked-alert", 1);
+ setprop("systems/thrust/thr-lock-time", getprop("sim/time/elapsed-sec"));
+ setprop("systems/thrust/thr-locked-flash", 1);
lockTimer.stop();
lockTimer2.start();
}
@@ -395,49 +395,49 @@ var checkLockThr = func() {
var checkLockThr2 = func() {
if (fmgc.Output.athr.getBoolValue()) {
lockTimer2.stop();
- setprop("/systems/thrust/thr-locked", 0);
- setprop("/systems/thrust/thr-locked-alert", 0);
- setprop("/systems/thrust/thr-lock-time", 0);
- setprop("/systems/thrust/thr-locked-flash", 0);
+ setprop("systems/thrust/thr-locked", 0);
+ setprop("systems/thrust/thr-locked-alert", 0);
+ setprop("systems/thrust/thr-lock-time", 0);
+ setprop("systems/thrust/thr-locked-flash", 0);
return;
}
- if (getprop("/systems/thrust/thr-locked") == 0) {
+ if (getprop("systems/thrust/thr-locked") == 0) {
lockTimer2.stop();
- setprop("/systems/thrust/thr-locked", 0);
- setprop("/systems/thrust/thr-locked-alert", 0);
- setprop("/systems/thrust/thr-lock-time", 0);
- setprop("/systems/thrust/thr-locked-flash", 0);
+ setprop("systems/thrust/thr-locked", 0);
+ setprop("systems/thrust/thr-locked-alert", 0);
+ setprop("systems/thrust/thr-lock-time", 0);
+ setprop("systems/thrust/thr-locked-flash", 0);
return;
}
- if (getprop("/systems/thrust/thr-lock-time") + 5 < getprop("/sim/time/elapsed-sec")) {
- setprop("/systems/thrust/thr-locked-flash", 0);
+ if (getprop("systems/thrust/thr-lock-time") + 5 < getprop("sim/time/elapsed-sec")) {
+ setprop("systems/thrust/thr-locked-flash", 0);
settimer(func() {
- setprop("/systems/thrust/thr-locked-flash", 1);
- setprop("/systems/thrust/thr-lock-time", getprop("/sim/time/elapsed-sec"));
+ setprop("systems/thrust/thr-locked-flash", 1);
+ setprop("systems/thrust/thr-lock-time", getprop("sim/time/elapsed-sec"));
ecam.athr_lock.noRepeat = 0;
ecam.athr_lock.noRepeat2 = 0;
}, 0.2);
}
- state1 = getprop("/systems/thrust/state1");
- state2 = getprop("/systems/thrust/state2");
+ state1 = getprop("systems/thrust/state1");
+ state2 = getprop("systems/thrust/state2");
- if ((state1 != "CL" and state2 != "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 != "MCT" and state2 != "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
+ if ((state1 != "CL" and state2 != "CL" and getprop("systems/thrust/eng-out") == 0) or (state1 != "MCT" and state2 != "MCT" and getprop("systems/thrust/eng-out") == 1)) {
lockTimer2.stop();
- setprop("/systems/thrust/thr-locked", 0);
- setprop("/systems/thrust/thr-locked-alert", 0);
- setprop("/systems/thrust/thr-lock-time", 0);
- setprop("/systems/thrust/thr-locked-flash", 0);
+ setprop("systems/thrust/thr-locked", 0);
+ setprop("systems/thrust/thr-locked-alert", 0);
+ setprop("systems/thrust/thr-lock-time", 0);
+ setprop("systems/thrust/thr-locked-flash", 0);
}
}
setlistener("/systems/thrust/thr-locked", func {
- if (getprop("/systems/thrust/thr-locked") == 1) {
- setprop("/systems/thrust/thr-lock-cmd[0]", getprop("/controls/engines/engine[0]/throttle-output"));
- setprop("/systems/thrust/thr-lock-cmd[1]", getprop("/controls/engines/engine[1]/throttle-output"));
+ if (getprop("systems/thrust/thr-locked") == 1) {
+ setprop("systems/thrust/thr-lock-cmd[0]", getprop("controls/engines/engine[0]/throttle-output"));
+ setprop("systems/thrust/thr-lock-cmd[1]", getprop("controls/engines/engine[1]/throttle-output"));
}
}, 0, 0);
diff --git a/Nasal/Systems/FADEC/fadec-iae.nas b/Nasal/Systems/FADEC/fadec-iae.nas
index 9202a067..5e882b10 100644
--- a/Nasal/Systems/FADEC/fadec-iae.nas
+++ b/Nasal/Systems/FADEC/fadec-iae.nas
@@ -2,191 +2,191 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
-setprop("/controls/fadec/n1mode1", 0);
-setprop("/controls/fadec/n1mode2", 0);
-setprop("/systems/fadec/n1mode1", 0); # 0 == EPR, 1 == N1 Rated, 2 == N1 Unrated #
-setprop("/systems/fadec/n1mode2", 0); # 0 == EPR, 1 == N1 Rated, 2 == N1 Unrated #
-setprop("/systems/fadec/eng1/epr", 1);
-setprop("/systems/fadec/eng1/egt", 1);
-setprop("/systems/fadec/eng1/n1", 1);
-setprop("/systems/fadec/eng1/n2", 1);
-setprop("/systems/fadec/eng1/ff", 1);
-setprop("/systems/fadec/eng2/epr", 1);
-setprop("/systems/fadec/eng2/egt", 1);
-setprop("/systems/fadec/eng2/n1", 1);
-setprop("/systems/fadec/eng2/n2", 1);
-setprop("/systems/fadec/eng2/ff", 1);
-setprop("/systems/fadec/power-avail", 0);
-setprop("/systems/fadec/powered1", 0);
-setprop("/systems/fadec/powered2", 0);
-setprop("/systems/fadec/powered-time", -300);
-setprop("/systems/fadec/powerup", 0);
-setprop("/systems/fadec/eng1-master-count", 0);
-setprop("/systems/fadec/eng1-master-time", -300);
-setprop("/systems/fadec/eng1-off-power", 0);
-setprop("/systems/fadec/eng2-master-count", 0);
-setprop("/systems/fadec/eng2-master-time", -300);
-setprop("/systems/fadec/eng2-off-power", 0);
+setprop("controls/fadec/n1mode1", 0);
+setprop("controls/fadec/n1mode2", 0);
+setprop("systems/fadec/n1mode1", 0); # 0 == EPR, 1 == N1 Rated, 2 == N1 Unrated #
+setprop("systems/fadec/n1mode2", 0); # 0 == EPR, 1 == N1 Rated, 2 == N1 Unrated #
+setprop("systems/fadec/eng1/epr", 1);
+setprop("systems/fadec/eng1/egt", 1);
+setprop("systems/fadec/eng1/n1", 1);
+setprop("systems/fadec/eng1/n2", 1);
+setprop("systems/fadec/eng1/ff", 1);
+setprop("systems/fadec/eng2/epr", 1);
+setprop("systems/fadec/eng2/egt", 1);
+setprop("systems/fadec/eng2/n1", 1);
+setprop("systems/fadec/eng2/n2", 1);
+setprop("systems/fadec/eng2/ff", 1);
+setprop("systems/fadec/power-avail", 0);
+setprop("systems/fadec/powered1", 0);
+setprop("systems/fadec/powered2", 0);
+setprop("systems/fadec/powered-time", -300);
+setprop("systems/fadec/powerup", 0);
+setprop("systems/fadec/eng1-master-count", 0);
+setprop("systems/fadec/eng1-master-time", -300);
+setprop("systems/fadec/eng1-off-power", 0);
+setprop("systems/fadec/eng2-master-count", 0);
+setprop("systems/fadec/eng2-master-time", -300);
+setprop("systems/fadec/eng2-off-power", 0);
var FADEC = {
init: func() {
- setprop("/systems/fadec/powered-time", 0);
- setprop("/systems/fadec/eng1-master-time", -300);
- setprop("/systems/fadec/eng2-master-time", -300);
+ setprop("systems/fadec/powered-time", 0);
+ setprop("systems/fadec/eng1-master-time", -300);
+ setprop("systems/fadec/eng2-master-time", -300);
},
loop: func() {
- var ac1 = getprop("/systems/electrical/bus/ac-1");
- var ac2 = getprop("/systems/electrical/bus/ac-2");
- var acess = getprop("/systems/electrical/bus/ac-ess");
- var state1 = getprop("/engines/engine[0]/state");
- var state2 = getprop("/engines/engine[1]/state");
- var master1 = getprop("/controls/engines/engine[0]/cutoff-switch");
- var master2 = getprop("/controls/engines/engine[1]/cutoff-switch");
- var modeSel = getprop("/controls/engines/engine-start-switch");
- var N1Mode1_sw = getprop("/controls/fadec/n1mode1");
- var N1Mode2_sw = getprop("/controls/fadec/n1mode2");
- var elapsedSec = getprop("/sim/time/elapsed-sec");
+ var ac1 = getprop("systems/electrical/bus/ac-1");
+ var ac2 = getprop("systems/electrical/bus/ac-2");
+ var acess = getprop("systems/electrical/bus/ac-ess");
+ var state1 = getprop("engines/engine[0]/state");
+ var state2 = getprop("engines/engine[1]/state");
+ var master1 = getprop("controls/engines/engine[0]/cutoff-switch");
+ var master2 = getprop("controls/engines/engine[1]/cutoff-switch");
+ var modeSel = getprop("controls/engines/engine-start-switch");
+ var N1Mode1_sw = getprop("controls/fadec/n1mode1");
+ var N1Mode2_sw = getprop("controls/fadec/n1mode2");
+ var elapsedSec = getprop("sim/time/elapsed-sec");
if (ac1 >= 110 or ac2 >= 110 or acess >= 110) {
- if (getprop("/systems/fadec/power-avail") != 1) {
- setprop("/systems/fadec/powered-time", elapsedSec);
- setprop("/systems/fadec/power-avail", 1);
+ if (getprop("systems/fadec/power-avail") != 1) {
+ setprop("systems/fadec/powered-time", elapsedSec);
+ setprop("systems/fadec/power-avail", 1);
}
} else {
- if (getprop("/systems/fadec/power-avail") != 0) {
- setprop("/systems/fadec/power-avail", 0);
+ if (getprop("systems/fadec/power-avail") != 0) {
+ setprop("systems/fadec/power-avail", 0);
}
}
- var powerAvail = getprop("/systems/fadec/power-avail");
+ var powerAvail = getprop("systems/fadec/power-avail");
- if (getprop("/systems/fadec/powered-time") + 300 >= elapsedSec) {
- setprop("/systems/fadec/powerup", 1);
+ if (getprop("systems/fadec/powered-time") + 300 >= elapsedSec) {
+ setprop("systems/fadec/powerup", 1);
} else {
- setprop("/systems/fadec/powerup", 0);
+ setprop("systems/fadec/powerup", 0);
}
if (master1 == 1) {
- if (getprop("/systems/fadec/eng1-master-count") != 1) {
- setprop("/systems/fadec/eng1-master-time", elapsedSec);
- setprop("/systems/fadec/eng1-master-count", 1);
+ if (getprop("systems/fadec/eng1-master-count") != 1) {
+ setprop("systems/fadec/eng1-master-time", elapsedSec);
+ setprop("systems/fadec/eng1-master-count", 1);
}
} else {
- if (getprop("/systems/fadec/eng1-master-count") != 0) {
- setprop("/systems/fadec/eng1-master-count", 0);
+ if (getprop("systems/fadec/eng1-master-count") != 0) {
+ setprop("systems/fadec/eng1-master-count", 0);
}
}
- if (getprop("/systems/fadec/eng1-master-time") + 300 >= elapsedSec) {
- setprop("/systems/fadec/eng1-off-power", 1);
+ if (getprop("systems/fadec/eng1-master-time") + 300 >= elapsedSec) {
+ setprop("systems/fadec/eng1-off-power", 1);
} else {
- setprop("/systems/fadec/eng1-off-power", 0);
+ setprop("systems/fadec/eng1-off-power", 0);
}
if (master2 == 1) {
- if (getprop("/systems/fadec/eng2-master-count") != 1) {
- setprop("/systems/fadec/eng2-master-time", elapsedSec);
- setprop("/systems/fadec/eng2-master-count", 1);
+ if (getprop("systems/fadec/eng2-master-count") != 1) {
+ setprop("systems/fadec/eng2-master-time", elapsedSec);
+ setprop("systems/fadec/eng2-master-count", 1);
}
} else {
- if (getprop("/systems/fadec/eng2-master-count") != 0) {
- setprop("/systems/fadec/eng2-master-count", 0);
+ if (getprop("systems/fadec/eng2-master-count") != 0) {
+ setprop("systems/fadec/eng2-master-count", 0);
}
}
- if (getprop("/systems/fadec/eng2-master-time") + 300 >= elapsedSec) {
- setprop("/systems/fadec/eng2-off-power", 1);
+ if (getprop("systems/fadec/eng2-master-time") + 300 >= elapsedSec) {
+ setprop("systems/fadec/eng2-off-power", 1);
} else {
- setprop("/systems/fadec/eng2-off-power", 0);
+ setprop("systems/fadec/eng2-off-power", 0);
}
if (state1 == 3) {
- setprop("/systems/fadec/powered1", 1);
+ setprop("systems/fadec/powered1", 1);
} else if (powerAvail and modeSel == 2) {
- setprop("/systems/fadec/powered1", 1);
+ setprop("systems/fadec/powered1", 1);
} else {
- setprop("/systems/fadec/powered1", 0);
+ setprop("systems/fadec/powered1", 0);
}
if (state2 == 3) {
- setprop("/systems/fadec/powered2", 1);
+ setprop("systems/fadec/powered2", 1);
} else if (powerAvail and modeSel == 2) {
- setprop("/systems/fadec/powered2", 1);
+ setprop("systems/fadec/powered2", 1);
} else {
- setprop("/systems/fadec/powered2", 0);
+ setprop("systems/fadec/powered2", 0);
}
if (N1Mode1_sw == 1) {
- setprop("/systems/fadec/n1mode1", 1);
+ setprop("systems/fadec/n1mode1", 1);
} else {
- setprop("/systems/fadec/n1mode1", 0);
+ setprop("systems/fadec/n1mode1", 0);
}
if (N1Mode2_sw == 1) {
- setprop("/systems/fadec/n1mode2", 1);
+ setprop("systems/fadec/n1mode2", 1);
} else {
- setprop("/systems/fadec/n1mode2", 0);
+ setprop("systems/fadec/n1mode2", 0);
}
- var powered1 = getprop("/systems/fadec/powered1");
- var powered2 = getprop("/systems/fadec/powered2");
- var N1Mode1 = getprop("/systems/fadec/n1mode1");
- var N1Mode2 = getprop("/systems/fadec/n1mode2");
- var N11 = getprop("/engines/engine[0]/n1-actual");
- var N12 = getprop("/engines/engine[1]/n1-actual");
- var N21 = getprop("/engines/engine[0]/n2-actual");
- var N22 = getprop("/engines/engine[1]/n2-actual");
+ var powered1 = getprop("systems/fadec/powered1");
+ var powered2 = getprop("systems/fadec/powered2");
+ var N1Mode1 = getprop("systems/fadec/n1mode1");
+ var N1Mode2 = getprop("systems/fadec/n1mode2");
+ var N11 = getprop("engines/engine[0]/n1-actual");
+ var N12 = getprop("engines/engine[1]/n1-actual");
+ var N21 = getprop("engines/engine[0]/n2-actual");
+ var N22 = getprop("engines/engine[1]/n2-actual");
- if ((powered1 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng1-off-power")) and N1Mode1 == 0) {
- setprop("/systems/fadec/eng1/epr", 1);
+ if ((powered1 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng1-off-power")) and N1Mode1 == 0) {
+ setprop("systems/fadec/eng1/epr", 1);
} else {
- setprop("/systems/fadec/eng1/epr", 0);
+ setprop("systems/fadec/eng1/epr", 0);
}
- if ((powered2 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng2-off-power")) and N1Mode2 == 0) {
- setprop("/systems/fadec/eng2/epr", 1);
+ if ((powered2 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng2-off-power")) and N1Mode2 == 0) {
+ setprop("systems/fadec/eng2/epr", 1);
} else {
- setprop("/systems/fadec/eng2/epr", 0);
+ setprop("systems/fadec/eng2/epr", 0);
}
- if (powered1 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng1-off-power")) {
- setprop("/systems/fadec/eng1/egt", 1);
- setprop("/systems/fadec/eng1/ff", 1);
+ if (powered1 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng1-off-power")) {
+ setprop("systems/fadec/eng1/egt", 1);
+ setprop("systems/fadec/eng1/ff", 1);
} else {
- setprop("/systems/fadec/eng1/egt", 0);
- setprop("/systems/fadec/eng1/ff", 0);
+ setprop("systems/fadec/eng1/egt", 0);
+ setprop("systems/fadec/eng1/ff", 0);
}
- if (powered2 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng2-off-power")) {
- setprop("/systems/fadec/eng2/egt", 1);
- setprop("/systems/fadec/eng2/ff", 1);
+ if (powered2 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng2-off-power")) {
+ setprop("systems/fadec/eng2/egt", 1);
+ setprop("systems/fadec/eng2/ff", 1);
} else {
- setprop("/systems/fadec/eng2/egt", 0);
- setprop("/systems/fadec/eng2/ff", 0);
+ setprop("systems/fadec/eng2/egt", 0);
+ setprop("systems/fadec/eng2/ff", 0);
}
if (powered1 and N11 >= 3.5) {
- setprop("/systems/fadec/eng1/n1", 1);
+ setprop("systems/fadec/eng1/n1", 1);
} else {
- setprop("/systems/fadec/eng1/n1", 0);
+ setprop("systems/fadec/eng1/n1", 0);
}
if (powered2 and N12 >= 3.5) {
- setprop("/systems/fadec/eng2/n1", 1);
+ setprop("systems/fadec/eng2/n1", 1);
} else {
- setprop("/systems/fadec/eng2/n1", 0);
+ setprop("systems/fadec/eng2/n1", 0);
}
if (powered1 and N21 >= 3.5) {
- setprop("/systems/fadec/eng1/n2", 1);
+ setprop("systems/fadec/eng1/n2", 1);
} else {
- setprop("/systems/fadec/eng1/n2", 0);
+ setprop("systems/fadec/eng1/n2", 0);
}
if (powered2 and N22 >= 3.5) {
- setprop("/systems/fadec/eng2/n2", 1);
+ setprop("systems/fadec/eng2/n2", 1);
} else {
- setprop("/systems/fadec/eng2/n2", 0);
+ setprop("systems/fadec/eng2/n2", 0);
}
},
};
diff --git a/Nasal/Systems/brakes.nas b/Nasal/Systems/brakes.nas
index de0b3fa3..3486459e 100644
--- a/Nasal/Systems/brakes.nas
+++ b/Nasal/Systems/brakes.nas
@@ -7,18 +7,18 @@ var thr1 = 0;
var thr2 = 0;
var wow0 = 0;
var gnd_speed = 0;
-setprop("/controls/autobrake/active", 0);
-setprop("/controls/autobrake/mode", 0);
-setprop("/controls/autobrake/decel-rate", 0);
+setprop("controls/autobrake/active", 0);
+setprop("controls/autobrake/mode", 0);
+setprop("controls/autobrake/decel-rate", 0);
var autobrake_init = func {
- setprop("/controls/autobrake/active", 0);
- setprop("/controls/autobrake/mode", 0);
+ setprop("controls/autobrake/active", 0);
+ setprop("controls/autobrake/mode", 0);
}
# Override FG's generic brake
controls.applyBrakes = func(v, which = 0) {
- if (getprop("/systems/acconfig/autoconfig-running") != 1) {
+ if (getprop("systems/acconfig/autoconfig-running") != 1) {
if (which <= 0) {
interpolate("/controls/gear/brake-left", v, 0.5);
}
@@ -30,51 +30,51 @@ controls.applyBrakes = func(v, which = 0) {
# Set autobrake mode
var arm_autobrake = func(mode) {
- wow0 = getprop("/gear/gear[0]/wow");
- gnd_speed = getprop("/velocities/groundspeed-kt");
+ wow0 = getprop("gear/gear[0]/wow");
+ gnd_speed = getprop("velocities/groundspeed-kt");
if (mode == 0) { # OFF
absChk.stop();
- if (getprop("/controls/autobrake/active") == 1) {
- setprop("/controls/autobrake/active", 0);
- setprop("/controls/gear/brake-left", 0);
- setprop("/controls/gear/brake-right", 0);
+ if (getprop("controls/autobrake/active") == 1) {
+ setprop("controls/autobrake/active", 0);
+ setprop("controls/gear/brake-left", 0);
+ setprop("controls/gear/brake-right", 0);
}
- setprop("/controls/autobrake/decel-rate", 0);
- setprop("/controls/autobrake/mode", 0);
+ setprop("controls/autobrake/decel-rate", 0);
+ setprop("controls/autobrake/mode", 0);
} else if (mode == 1 and wow0 != 1) { # LO
- setprop("/controls/autobrake/decel-rate", 1.7);
- setprop("/controls/autobrake/mode", 1);
+ setprop("controls/autobrake/decel-rate", 1.7);
+ setprop("controls/autobrake/mode", 1);
absChk.start();
} else if (mode == 2 and wow0 != 1) { # MED
- setprop("/controls/autobrake/decel-rate", 3);
- setprop("/controls/autobrake/mode", 2);
+ setprop("controls/autobrake/decel-rate", 3);
+ setprop("controls/autobrake/mode", 2);
absChk.start();
} else if (mode == 3 and wow0 == 1 and gnd_speed < 40) { # MAX
- setprop("/controls/autobrake/decel-rate", 6);
- setprop("/controls/autobrake/mode", 3);
+ setprop("controls/autobrake/decel-rate", 6);
+ setprop("controls/autobrake/mode", 3);
absChk.start();
}
}
# Autobrake loop
var absChk = maketimer(0.2, func {
- thr1 = getprop("/controls/engines/engine[0]/throttle");
- thr2 = getprop("/controls/engines/engine[1]/throttle");
- wow0 = getprop("/gear/gear[0]/wow");
- gnd_speed = getprop("/velocities/groundspeed-kt");
+ thr1 = getprop("controls/engines/engine[0]/throttle");
+ thr2 = getprop("controls/engines/engine[1]/throttle");
+ wow0 = getprop("gear/gear[0]/wow");
+ gnd_speed = getprop("velocities/groundspeed-kt");
if (gnd_speed > 72) {
- if (getprop("/controls/autobrake/mode") != 0 and thr1 < 0.15 and thr2 < 0.15 and wow0 == 1) {
- setprop("/controls/autobrake/active", 1);
+ if (getprop("controls/autobrake/mode") != 0 and thr1 < 0.15 and thr2 < 0.15 and wow0 == 1) {
+ setprop("controls/autobrake/active", 1);
} else {
- setprop("/controls/autobrake/active", 0);
- setprop("/controls/gear/brake-left", 0);
- setprop("/controls/gear/brake-right", 0);
+ setprop("controls/autobrake/active", 0);
+ setprop("controls/gear/brake-left", 0);
+ setprop("controls/gear/brake-right", 0);
}
}
- if (getprop("/controls/autobrake/mode") == 3 and getprop("/controls/gear/gear-down") == 0) {
+ if (getprop("controls/autobrake/mode") == 3 and getprop("controls/gear/gear-down") == 0) {
arm_autobrake(0);
}
- if (getprop("/controls/autobrake/mode") != 0 and wow0 == 1 and getprop("/controls/autobrake/active") == 1 and (getprop("/controls/gear/brake-left") > 0.05 or getprop("/controls/gear/brake-right") > 0.05)) {
+ if (getprop("controls/autobrake/mode") != 0 and wow0 == 1 and getprop("controls/autobrake/active") == 1 and (getprop("controls/gear/brake-left") > 0.05 or getprop("controls/gear/brake-right") > 0.05)) {
arm_autobrake(0);
}
});
diff --git a/Nasal/Systems/brakesystem.nas b/Nasal/Systems/brakesystem.nas
index ca411ad4..617a97a8 100755
--- a/Nasal/Systems/brakesystem.nas
+++ b/Nasal/Systems/brakesystem.nas
@@ -75,9 +75,15 @@ var BrakeSystem =
setprop("gear/gear[2]/R3error-temp-degc", math.round(rand()*(5)) - 2.5);
setprop("gear/gear[2]/R4error-temp-degc", math.round(rand()*(5)) - 2.5);
+<<<<<<< HEAD
#var atemp = getprop("environment/temperature-degc") or 0;
#var vmach = getprop("velocities/mach") or 0;
var tatdegc = getprop("/systems/navigation/probes/tat-1/compute-tat") or 0;
+=======
+ var atemp = getprop("environment/temperature-degc") or 0;
+ var vmach = getprop("velocities/mach") or 0;
+ var tatdegc = getprop("systems/navigation/probes/tat-1/compute-tat");
+>>>>>>> d47b3431d233eb890aa9e256c21f148e6dce5a21
setprop("gear/gear[1]/L1brake-temp-degc",tatdegc+getprop("gear/gear[1]/L1error-temp-degc"));
setprop("gear/gear[1]/L2brake-temp-degc",tatdegc+getprop("gear/gear[1]/L2error-temp-degc"));
diff --git a/Nasal/Systems/efis.nas b/Nasal/Systems/efis.nas
index 81050c52..61056fb5 100644
--- a/Nasal/Systems/efis.nas
+++ b/Nasal/Systems/efis.nas
@@ -3,98 +3,98 @@
# Copyright (c) 2019 Joshua 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);
+ 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 setCptND = func(d) {
- var mode = getprop("/instrumentation/efis[0]/nd/display-mode");
+ var mode = getprop("instrumentation/efis[0]/nd/display-mode");
if (d == 1) {
if (mode == "ILS") {
- setprop("/instrumentation/efis[0]/nd/display-mode", "VOR");
- setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 1);
+ setprop("instrumentation/efis[0]/nd/display-mode", "VOR");
+ setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 1);
} else if (mode == "VOR") {
- setprop("/instrumentation/efis[0]/nd/display-mode", "NAV");
- setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 2);
+ setprop("instrumentation/efis[0]/nd/display-mode", "NAV");
+ setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 2);
} else if (mode == "NAV") {
- setprop("/instrumentation/efis[0]/nd/display-mode", "ARC");
- setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 3);
+ setprop("instrumentation/efis[0]/nd/display-mode", "ARC");
+ setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 3);
} else if (mode == "ARC") {
- setprop("/instrumentation/efis[0]/nd/display-mode", "PLAN");
- setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 4);
+ setprop("instrumentation/efis[0]/nd/display-mode", "PLAN");
+ setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 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);
+ setprop("instrumentation/efis[0]/nd/display-mode", "ARC");
+ setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 3);
} else if (mode == "ARC") {
- setprop("/instrumentation/efis[0]/nd/display-mode", "NAV");
- setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 2);
+ setprop("instrumentation/efis[0]/nd/display-mode", "NAV");
+ setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 2);
} else if (mode == "NAV") {
- setprop("/instrumentation/efis[0]/nd/display-mode", "VOR");
- setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 1);
+ setprop("instrumentation/efis[0]/nd/display-mode", "VOR");
+ setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 1);
} else if (mode == "VOR") {
- setprop("/instrumentation/efis[0]/nd/display-mode", "ILS");
- setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 0);
+ setprop("instrumentation/efis[0]/nd/display-mode", "ILS");
+ setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 0);
}
}
}
var setFoND = func(d) {
- var mode = getprop("/instrumentation/efis[1]/nd/display-mode");
+ var mode = getprop("instrumentation/efis[1]/nd/display-mode");
if (d == 1) {
if (mode == "ILS") {
- setprop("/instrumentation/efis[1]/nd/display-mode", "VOR");
- setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 1);
+ setprop("instrumentation/efis[1]/nd/display-mode", "VOR");
+ setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 1);
} else if (mode == "VOR") {
- setprop("/instrumentation/efis[1]/nd/display-mode", "NAV");
- setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 2);
+ setprop("instrumentation/efis[1]/nd/display-mode", "NAV");
+ setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 2);
} else if (mode == "NAV") {
- setprop("/instrumentation/efis[1]/nd/display-mode", "ARC");
- setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 3);
+ setprop("instrumentation/efis[1]/nd/display-mode", "ARC");
+ setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 3);
} else if (mode == "ARC") {
- setprop("/instrumentation/efis[1]/nd/display-mode", "PLAN");
- setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 4);
+ setprop("instrumentation/efis[1]/nd/display-mode", "PLAN");
+ setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 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);
+ setprop("instrumentation/efis[1]/nd/display-mode", "ARC");
+ setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 3);
} else if (mode == "ARC") {
- setprop("/instrumentation/efis[1]/nd/display-mode", "NAV");
- setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 2);
+ setprop("instrumentation/efis[1]/nd/display-mode", "NAV");
+ setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 2);
} else if (mode == "NAV") {
- setprop("/instrumentation/efis[1]/nd/display-mode", "VOR");
- setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 1);
+ setprop("instrumentation/efis[1]/nd/display-mode", "VOR");
+ setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 1);
} else if (mode == "VOR") {
- setprop("/instrumentation/efis[1]/nd/display-mode", "ILS");
- setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 0);
+ setprop("instrumentation/efis[1]/nd/display-mode", "ILS");
+ setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 0);
}
}
}
var setNDRange = func(n, d) {
- var rng = getprop("/instrumentation/efis[" ~ n ~ "]/inputs/range-nm");
+ var rng = getprop("instrumentation/efis[" ~ n ~ "]/inputs/range-nm");
if (d == 1) {
rng = rng * 2;
if (rng > 320) {
@@ -106,111 +106,111 @@ var setNDRange = func(n, d) {
rng = 10;
}
}
- setprop("/instrumentation/efis[" ~ n ~ "]/inputs/range-nm", rng);
+ setprop("instrumentation/efis[" ~ n ~ "]/inputs/range-nm", 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);
+ 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);
} 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);
+ 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);
} 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);
+ 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);
} 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);
+ 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);
} 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);
+ 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);
} 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);
+ 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);
}
}
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);
+ 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);
} 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);
+ 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);
} 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);
+ 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);
} 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);
+ 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);
} 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);
+ 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);
} 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);
+ 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 toggleSTD = func {
- var Std = getprop("/modes/altimeter/std");
+ 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);
+ 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 qnh = getprop("instrumentation/altimeter/setting-inhg");
+ setprop("modes/altimeter/oldqnh", qnh);
+ setprop("instrumentation/altimeter/setting-inhg", 29.92);
+ setprop("modes/altimeter/std", 1);
}
}
\ No newline at end of file
diff --git a/Nasal/Systems/electrical.nas b/Nasal/Systems/electrical.nas
index fd175ebb..76a55778 100644
--- a/Nasal/Systems/electrical.nas
+++ b/Nasal/Systems/electrical.nas
@@ -16,38 +16,38 @@ var ELEC = {
_timer1On: 0,
_timer2On: 0,
Bus: {
- acEss: props.globals.getNode("/systems/electrical/bus/ac-ess"),
- acEssShed: props.globals.getNode("/systems/electrical/bus/ac-ess-shed"),
- ac1: props.globals.getNode("/systems/electrical/bus/ac-1"),
- ac2: props.globals.getNode("/systems/electrical/bus/ac-2"),
- dcBat: props.globals.getNode("/systems/electrical/bus/dc-bat"),
- dcEss: props.globals.getNode("/systems/electrical/bus/dc-ess"),
- dcEssShed: props.globals.getNode("/systems/electrical/bus/dc-ess-shed"),
- dc1: props.globals.getNode("/systems/electrical/bus/dc-1"),
- dc2: props.globals.getNode("/systems/electrical/bus/dc-2"),
- dcHot1: props.globals.getNode("/systems/electrical/bus/dc-hot-1"),
- dcHot2: props.globals.getNode("/systems/electrical/bus/dc-hot-2"),
+ acEss: props.globals.getNode("systems/electrical/bus/ac-ess"),
+ acEssShed: props.globals.getNode("systems/electrical/bus/ac-ess-shed"),
+ ac1: props.globals.getNode("systems/electrical/bus/ac-1"),
+ ac2: props.globals.getNode("systems/electrical/bus/ac-2"),
+ dcBat: props.globals.getNode("systems/electrical/bus/dc-bat"),
+ dcEss: props.globals.getNode("systems/electrical/bus/dc-ess"),
+ dcEssShed: props.globals.getNode("systems/electrical/bus/dc-ess-shed"),
+ dc1: props.globals.getNode("systems/electrical/bus/dc-1"),
+ dc2: props.globals.getNode("systems/electrical/bus/dc-2"),
+ dcHot1: props.globals.getNode("systems/electrical/bus/dc-hot-1"),
+ dcHot2: props.globals.getNode("systems/electrical/bus/dc-hot-2"),
},
Fail: {
- acEssBusFault: props.globals.getNode("/systems/failures/electrical/ac-ess-bus"),
- ac1BusFault: props.globals.getNode("/systems/failures/electrical/ac-1-bus"),
- ac2BusFault: props.globals.getNode("/systems/failures/electrical/ac-2-bus"),
- bat1Fault: props.globals.getNode("/systems/failures/electrical/bat-1"),
- bat2Fault: props.globals.getNode("/systems/failures/electrical/bat-2"),
- dcBatBusFault: props.globals.getNode("/systems/failures/electrical/dc-bat-bus"),
- dcEssBusFault: props.globals.getNode("/systems/failures/electrical/dc-ess-bus"),
- dc1BusFault: props.globals.getNode("/systems/failures/electrical/dc-1-bus"),
- dc2BusFault: props.globals.getNode("/systems/failures/electrical/dc-2-bus"),
- emerGenFault: props.globals.getNode("/systems/failures/electrical/emer-gen"),
- essTrFault: props.globals.getNode("/systems/failures/electrical/ess-tr"),
- gen1Fault: props.globals.getNode("/systems/failures/electrical/gen-1"),
- gen2Fault: props.globals.getNode("/systems/failures/electrical/gen-2"),
- genApuFault: props.globals.getNode("/systems/failures/electrical/apu"),
- idg1Fault: props.globals.getNode("/systems/failures/electrical/idg-1"), # oil leak or low press
- idg2Fault: props.globals.getNode("/systems/failures/electrical/idg-2"),
- statInvFault: props.globals.getNode("/systems/failures/electrical/stat-inv"),
- tr1Fault: props.globals.getNode("/systems/failures/electrical/tr-1"),
- tr2Fault: props.globals.getNode("/systems/failures/electrical/tr-2"),
+ acEssBusFault: props.globals.getNode("systems/failures/electrical/ac-ess-bus"),
+ ac1BusFault: props.globals.getNode("systems/failures/electrical/ac-1-bus"),
+ ac2BusFault: props.globals.getNode("systems/failures/electrical/ac-2-bus"),
+ bat1Fault: props.globals.getNode("systems/failures/electrical/bat-1"),
+ bat2Fault: props.globals.getNode("systems/failures/electrical/bat-2"),
+ dcBatBusFault: props.globals.getNode("systems/failures/electrical/dc-bat-bus"),
+ dcEssBusFault: props.globals.getNode("systems/failures/electrical/dc-ess-bus"),
+ dc1BusFault: props.globals.getNode("systems/failures/electrical/dc-1-bus"),
+ dc2BusFault: props.globals.getNode("systems/failures/electrical/dc-2-bus"),
+ emerGenFault: props.globals.getNode("systems/failures/electrical/emer-gen"),
+ essTrFault: props.globals.getNode("systems/failures/electrical/ess-tr"),
+ gen1Fault: props.globals.getNode("systems/failures/electrical/gen-1"),
+ gen2Fault: props.globals.getNode("systems/failures/electrical/gen-2"),
+ genApuFault: props.globals.getNode("systems/failures/electrical/apu"),
+ idg1Fault: props.globals.getNode("systems/failures/electrical/idg-1"), # oil leak or low press
+ idg2Fault: props.globals.getNode("systems/failures/electrical/idg-2"),
+ statInvFault: props.globals.getNode("systems/failures/electrical/stat-inv"),
+ tr1Fault: props.globals.getNode("systems/failures/electrical/tr-1"),
+ tr2Fault: props.globals.getNode("systems/failures/electrical/tr-2"),
},
Generic: {
adf: props.globals.initNode("/systems/electrical/outputs/adf", 0, "DOUBLE"),
@@ -72,50 +72,50 @@ var ELEC = {
Misc: {
},
Relay: {
- essTrContactor: props.globals.getNode("/systems/electrical/relay/dc-ess-feed-tr/contact-pos"),
+ essTrContactor: props.globals.getNode("systems/electrical/relay/dc-ess-feed-tr/contact-pos"),
},
SomeThing: {
- emerGenSignal: props.globals.getNode("/systems/electrical/some-electric-thingie/emer-gen-operate"),
+ emerGenSignal: props.globals.getNode("systems/electrical/some-electric-thingie/emer-gen-operate"),
},
Source: {
Bat1: {
- amps: props.globals.getNode("/systems/electrical/sources/bat-1/amp"),
- limiter: props.globals.getNode("/systems/electrical/sources/bat-1/limiter"),
- percent: props.globals.getNode("/systems/electrical/sources/bat-1/percent"),
- time: props.globals.getNode("/systems/electrical/sources/bat-1/time"),
+ amps: props.globals.getNode("systems/electrical/sources/bat-1/amp"),
+ limiter: props.globals.getNode("systems/electrical/sources/bat-1/limiter"),
+ percent: props.globals.getNode("systems/electrical/sources/bat-1/percent"),
+ time: props.globals.getNode("systems/electrical/sources/bat-1/time"),
},
Bat2: {
- amps: props.globals.getNode("/systems/electrical/sources/bat-2/amp"),
- limiter: props.globals.getNode("/systems/electrical/sources/bat-2/limiter"),
- percent: props.globals.getNode("/systems/electrical/sources/bat-2/percent"),
- time: props.globals.getNode("/systems/electrical/sources/bat-2/time"),
+ amps: props.globals.getNode("systems/electrical/sources/bat-2/amp"),
+ limiter: props.globals.getNode("systems/electrical/sources/bat-2/limiter"),
+ percent: props.globals.getNode("systems/electrical/sources/bat-2/percent"),
+ time: props.globals.getNode("systems/electrical/sources/bat-2/time"),
},
trEss: {
- outputVolt: props.globals.getNode("/systems/electrical/sources/tr-ess/output-volt"),
- outputAmp: props.globals.getNode("/systems/electrical/sources/tr-ess/output-amp"),
+ outputVolt: props.globals.getNode("systems/electrical/sources/tr-ess/output-volt"),
+ outputAmp: props.globals.getNode("systems/electrical/sources/tr-ess/output-amp"),
},
IDG1: {
- gcrRelay: props.globals.getNode("/systems/electrical/sources/idg-1/gcr-relay"),
+ gcrRelay: props.globals.getNode("systems/electrical/sources/idg-1/gcr-relay"),
},
IDG2: {
- gcrRelay: props.globals.getNode("/systems/electrical/sources/idg-1/gcr-relay"),
+ gcrRelay: props.globals.getNode("systems/electrical/sources/idg-1/gcr-relay"),
},
},
Switch: {
- acEssFeed: props.globals.getNode("/controls/electrical/switches/ac-ess-feed"),
- busTie: props.globals.getNode("/controls/electrical/switches/bus-tie"),
- bat1: props.globals.getNode("/controls/electrical/switches/bat-1"),
- bat2: props.globals.getNode("/controls/electrical/switches/bat-2"),
- emerGenTest: props.globals.getNode("/controls/electrical/switches/emer-gen-test"),
- extPwr: props.globals.getNode("/controls/electrical/switches/ext-pwr"),
- galley: props.globals.getNode("/controls/electrical/switches/galley"),
- gen1: props.globals.getNode("/controls/electrical/switches/gen-1"),
- gen2: props.globals.getNode("/controls/electrical/switches/gen-2"),
- genApu: props.globals.getNode("/controls/electrical/switches/apu"),
- gen1Line: props.globals.getNode("/controls/electrical/switches/gen-1-line-contactor"),
- idg1Disc: props.globals.getNode("/controls/electrical/switches/idg-1-disc"),
- idg2Disc: props.globals.getNode("/controls/electrical/switches/idg-2-disc"),
- emerElecManOn: props.globals.getNode("/controls/electrical/switches/emer-elec-man-on"), # non-reset
+ acEssFeed: props.globals.getNode("controls/electrical/switches/ac-ess-feed"),
+ busTie: props.globals.getNode("controls/electrical/switches/bus-tie"),
+ bat1: props.globals.getNode("controls/electrical/switches/bat-1"),
+ bat2: props.globals.getNode("controls/electrical/switches/bat-2"),
+ emerGenTest: props.globals.getNode("controls/electrical/switches/emer-gen-test"),
+ extPwr: props.globals.getNode("controls/electrical/switches/ext-pwr"),
+ galley: props.globals.getNode("controls/electrical/switches/galley"),
+ gen1: props.globals.getNode("controls/electrical/switches/gen-1"),
+ gen2: props.globals.getNode("controls/electrical/switches/gen-2"),
+ genApu: props.globals.getNode("controls/electrical/switches/apu"),
+ gen1Line: props.globals.getNode("controls/electrical/switches/gen-1-line-contactor"),
+ idg1Disc: props.globals.getNode("controls/electrical/switches/idg-1-disc"),
+ idg2Disc: props.globals.getNode("controls/electrical/switches/idg-2-disc"),
+ emerElecManOn: props.globals.getNode("controls/electrical/switches/emer-elec-man-on"), # non-reset
},
init: func() {
me.resetFail();
@@ -172,64 +172,64 @@ var ELEC = {
dcbat = me.Bus.dcBat.getValue();
if (battery1_percent < 100 and dcbat > 25 and battery1_sw and !batt1_fail) {
- if (battery1_time + 5 < getprop("/sim/time/elapsed-sec")) {
+ if (battery1_time + 5 < getprop("sim/time/elapsed-sec")) {
battery1_percent_calc = battery1_percent + 0.75; # Roughly 90 percent every 10 mins
if (battery1_percent_calc > 100) {
battery1_percent_calc = 100;
}
me.Source.Bat1.limiter.setBoolValue(1);
me.Source.Bat1.percent.setValue(battery1_percent_calc);
- me.Source.Bat1.time.setValue(getprop("/sim/time/elapsed-sec"));
+ me.Source.Bat1.time.setValue(getprop("sim/time/elapsed-sec"));
}
} else if (battery1_percent == 100 and dcbat > 25 and battery1_sw and !batt1_fail) {
- me.Source.Bat1.time.setValue(getprop("/sim/time/elapsed-sec"));
+ me.Source.Bat1.time.setValue(getprop("sim/time/elapsed-sec"));
me.Source.Bat1.limiter.setBoolValue(0);
} else if (battery1_amps > 0 and battery1_sw and !batt1_fail) {
- if (battery1_time + 5 < getprop("/sim/time/elapsed-sec")) {
+ if (battery1_time + 5 < getprop("sim/time/elapsed-sec")) {
battery1_percent_calc = battery1_percent - 0.25; # Roughly 90 percent every 30 mins
if (battery1_percent_calc < 5) {
battery1_percent_calc = 5;
}
me.Source.Bat1.limiter.setBoolValue(1);
me.Source.Bat1.percent.setValue(battery1_percent_calc);
- me.Source.Bat1.time.setValue(getprop("/sim/time/elapsed-sec"));
+ me.Source.Bat1.time.setValue(getprop("sim/time/elapsed-sec"));
}
} else {
- me.Source.Bat1.time.setValue(getprop("/sim/time/elapsed-sec"));
+ me.Source.Bat1.time.setValue(getprop("sim/time/elapsed-sec"));
me.Source.Bat1.limiter.setBoolValue(0);
}
if (battery2_percent < 100 and dcbat > 25 and battery2_sw and !batt2_fail) {
- if (battery2_time + 5 < getprop("/sim/time/elapsed-sec")) {
+ if (battery2_time + 5 < getprop("sim/time/elapsed-sec")) {
battery2_percent_calc = battery2_percent + 0.75; # Roughly 90 percent every 10 mins
if (battery2_percent_calc > 100) {
battery2_percent_calc = 100;
}
me.Source.Bat2.limiter.setBoolValue(1);
me.Source.Bat2.percent.setValue(battery2_percent_calc);
- me.Source.Bat2.time.setValue(getprop("/sim/time/elapsed-sec"));
+ me.Source.Bat2.time.setValue(getprop("sim/time/elapsed-sec"));
}
} else if (battery2_percent == 100 and dcbat > 25 and battery2_sw and !batt2_fail) {
- me.Source.Bat2.time.setValue(getprop("/sim/time/elapsed-sec"));
+ me.Source.Bat2.time.setValue(getprop("sim/time/elapsed-sec"));
me.Source.Bat2.limiter.setBoolValue(0);
} else if (battery2_amps > 0 and battery2_sw and !batt1_fail) {
- if (battery2_time + 5 < getprop("/sim/time/elapsed-sec")) {
+ if (battery2_time + 5 < getprop("sim/time/elapsed-sec")) {
battery2_percent_calc = battery2_percent - 0.25; # Roughly 90 percent every 30 mins
if (battery2_percent_calc < 5) {
battery2_percent_calc = 5;
}
me.Source.Bat2.limiter.setBoolValue(1);
me.Source.Bat2.percent.setValue(battery2_percent_calc);
- me.Source.Bat2.time.setValue(getprop("/sim/time/elapsed-sec"));
+ me.Source.Bat2.time.setValue(getprop("sim/time/elapsed-sec"));
}
} else {
- me.Source.Bat2.time.setValue(getprop("/sim/time/elapsed-sec"));
+ me.Source.Bat2.time.setValue(getprop("sim/time/elapsed-sec"));
me.Source.Bat2.limiter.setBoolValue(0);
}
# Autopilot Disconnection routines
if (me.Bus.dcEssShed.getValue() < 25) {
- if (getprop("/it-autoflight/output/ap1") == 1 and !me._timer1On) {
+ if (getprop("it-autoflight/output/ap1") == 1 and !me._timer1On) {
me._timer1On = 1;
settimer(func() {
if (me.Bus.dcEssShed.getValue() < 25) {
@@ -244,7 +244,7 @@ var ELEC = {
}
if (me.Bus.dc2.getValue() < 25) {
- if (getprop("/it-autoflight/output/ap2") == 1 and !me._timer2On) {
+ if (getprop("it-autoflight/output/ap2") == 1 and !me._timer2On) {
me._timer2On = 1;
settimer(func() {
if (me.Bus.dc2.getValue() < 25) {
diff --git a/Nasal/Systems/fire.nas b/Nasal/Systems/fire.nas
index 7347c5d3..799418ba 100644
--- a/Nasal/Systems/fire.nas
+++ b/Nasal/Systems/fire.nas
@@ -3,10 +3,10 @@
# Copyright (c) 2019 Joshua Davidson (Octal450)
-var elapsedTime = props.globals.getNode("/sim/time/elapsed-sec");
-var apuTestBtn = props.globals.getNode("/controls/fire/apu-test-btn", 1);
-var testBtn = props.globals.getNode("/controls/fire/test-btn-1", 1);
-var testBtn2 = props.globals.getNode("/controls/fire/test-btn-2", 1);
+var elapsedTime = props.globals.getNode("sim/time/elapsed-sec");
+var apuTestBtn = props.globals.getNode("controls/fire/apu-test-btn", 1);
+var testBtn = props.globals.getNode("controls/fire/test-btn-1", 1);
+var testBtn2 = props.globals.getNode("controls/fire/test-btn-2", 1);
var dischTest = props.globals.initNode("/systems/fire/cargo/disch-test", 0, "BOOL");
var cargoTestBtn = props.globals.initNode("/controls/fire/cargo/test", 0, "BOOL");
var cargoTestTime = props.globals.initNode("/controls/fire/cargo/test-time", 0, "DOUBLE");
@@ -22,7 +22,7 @@ var eng2Inop = props.globals.initNode("/systems/fire/engine2/det-inop", 0, "BOOL
var apuInop = props.globals.initNode("/systems/fire/apu/det-inop", 0, "BOOL");
var aftCargoFireWarn = props.globals.initNode("/systems/fire/cargo/aft/warning-active", 0, "BOOL");
var fwdCargoFireWarn = props.globals.initNode("/systems/fire/cargo/fwd/warning-active", 0, "BOOL");
-var apuEmerShutdown = props.globals.getNode("/systems/apu/emer-shutdown", 1);
+var apuEmerShutdown = props.globals.getNode("systems/apu/emer-shutdown", 1);
var eng1AgentTimer = props.globals.initNode("/systems/fire/engine1/agent1-timer", 99, "INT");
var eng2AgentTimer = props.globals.initNode("/systems/fire/engine2/agent1-timer", 99, "INT");
var eng1Agent2Timer = props.globals.initNode("/systems/fire/engine1/agent2-timer", 99, "INT");
@@ -33,20 +33,20 @@ var eng2AgentTimerTime = props.globals.initNode("/systems/fire/engine2/agent1-ti
var eng1Agent2TimerTime = props.globals.initNode("/systems/fire/engine1/agent2-timer-time", 0, "INT");
var eng2Agent2TimerTime = props.globals.initNode("/systems/fire/engine2/agent2-timer-time", 0, "INT");
var apuAgentTimerTime = props.globals.initNode("/systems/fire/apu/agent-timer-time", 0, "INT");
-var wow = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
+var wow = props.globals.getNode("fdm/jsbsim/position/wow", 1);
var dcbatNode = props.globals.getNode("systems/electrical/bus/dc-bat", 1);
var dcessNode = props.globals.getNode("systems/electrical/bus/dc-ess", 1);
-var apuBleedNode = props.globals.getNode("/systems/apu/bleed-used", 1);
-var apuMaster = props.globals.getNode("/controls/APU/master", 1);
+var apuBleedNode = props.globals.getNode("systems/apu/bleed-used", 1);
+var apuMaster = props.globals.getNode("controls/APU/master", 1);
var fire_init = func {
- setprop("/controls/OH/protectors/fwddisch", 0);
- setprop("/controls/OH/protectors/aftdisch", 0);
- setprop("/controls/fire/cargo/fwddisch", 0);
- setprop("/controls/fire/cargo/aftdisch", 0);
- setprop("/systems/failures/cargo-fwd-fire", 0);
- setprop("/systems/failures/cargo-aft-fire", 0);
- setprop("/controls/fire/cargo/test", 0);
+ setprop("controls/OH/protectors/fwddisch", 0);
+ setprop("controls/OH/protectors/aftdisch", 0);
+ setprop("controls/fire/cargo/fwddisch", 0);
+ setprop("controls/fire/cargo/aftdisch", 0);
+ setprop("systems/failures/cargo-fwd-fire", 0);
+ setprop("systems/failures/cargo-aft-fire", 0);
+ setprop("controls/fire/cargo/test", 0);
fire_timer.start();
}
@@ -69,7 +69,7 @@ var engFireDetectorUnit = {
eF.loopTwo = 0;
eF.fireProp = props.globals.getNode(fireProp, 1);
eF.testProp = props.globals.getNode(testProp, 1);
- eF.wow = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
+ eF.wow = props.globals.getNode("fdm/jsbsim/position/wow", 1);
eF.condition = 100;
return eF;
},
@@ -292,9 +292,9 @@ var detectorLoop = {
}
},
sendSignal: func(system, typeLoop) {
- if (system == 0 and !getprop("/systems/failures/engine-left-fire")) { return; }
- elsif (system == 1 and !getprop("/systems/failures/engine-right-fire")) { return; }
- elsif (system == 2 and !getprop("/systems/failures/apu-fire")) { return; }
+ if (system == 0 and !getprop("systems/failures/engine-left-fire")) { return; }
+ elsif (system == 1 and !getprop("systems/failures/engine-right-fire")) { return; }
+ elsif (system == 2 and !getprop("systems/failures/apu-fire")) { return; }
engFireDetectorUnits.vector[system].receiveSignal(typeLoop);
}
};
@@ -319,8 +319,8 @@ var cargoDetectorLoop = {
}
},
sendSignal: func(system, typeLoop) {
- if ((system == 0 or system == 1) and !getprop("/systems/failures/cargo-aft-fire")) { return; }
- elsif (system == 2 and !getprop("/systems/failures/cargo-fwd-fire")) { return; }
+ if ((system == 0 or system == 1) and !getprop("systems/failures/cargo-aft-fire")) { return; }
+ elsif (system == 2 and !getprop("systems/failures/cargo-fwd-fire")) { return; }
cargoSmokeDetectorUnits.vector[system].receiveSignal(typeLoop);
}
@@ -560,7 +560,7 @@ var createCargoFireBottleListener = func(prop, index) {
# Listeners
setlistener("/controls/engines/engine[0]/fire-btn", func() {
- if (getprop("/controls/engines/engine[0]/fire-btn") == 1) {
+ if (getprop("controls/engines/engine[0]/fire-btn") == 1) {
ecam.shutUpYou();
eng1AgentTimerMakeTimer.stop();
eng1AgentTimer.setValue(10);
@@ -570,7 +570,7 @@ setlistener("/controls/engines/engine[0]/fire-btn", func() {
}, 0, 0);
setlistener("/systems/fire/engine1/disch1", func() {
- if (getprop("/systems/fire/engine1/disch1") == 1) {
+ if (getprop("systems/fire/engine1/disch1") == 1) {
eng1Agent2TimerMakeTimer.stop();
eng1Agent2Timer.setValue(30);
eng1Agent2TimerTime.setValue(elapsedTime.getValue() + 31);
@@ -603,7 +603,7 @@ eng1Agent2TimerMakeTimerFunc = func() {
}
setlistener("/controls/engines/engine[1]/fire-btn", func() {
- if (getprop("/controls/engines/engine[1]/fire-btn") == 1) {
+ if (getprop("controls/engines/engine[1]/fire-btn") == 1) {
ecam.shutUpYou();
eng2AgentTimerMakeTimer.stop();
eng2AgentTimer.setValue(10);
@@ -613,7 +613,7 @@ setlistener("/controls/engines/engine[1]/fire-btn", func() {
}, 0, 0);
setlistener("/systems/fire/engine2/disch1", func() {
- if (getprop("/systems/fire/engine2/disch1") == 1) {
+ if (getprop("systems/fire/engine2/disch1") == 1) {
eng2Agent2TimerMakeTimer.stop();
eng2Agent2Timer.setValue(30);
eng2Agent2TimerTime.setValue(elapsedTime.getValue() + 31);
@@ -646,7 +646,7 @@ eng2Agent2TimerMakeTimerFunc = func() {
}
setlistener("/controls/APU/fire-btn", func() {
- if (getprop("/controls/APU/fire-btn") == 1) {
+ if (getprop("controls/APU/fire-btn") == 1) {
ecam.shutUpYou();
apuAgentTimerMakeTimer.stop();
apuAgentTimer.setValue(10);
@@ -667,7 +667,7 @@ apuAgentTimerMakeTimerFunc = func() {
}
setlistener("/controls/fire/test-btn-1", func() {
- if (getprop("/systems/failures/engine-left-fire")) { return; }
+ if (getprop("systems/failures/engine-left-fire")) { return; }
if (testBtn.getValue() == 1) {
if (dcbatNode.getValue() > 25 or dcessNode.getValue() > 25) {
@@ -680,7 +680,7 @@ setlistener("/controls/fire/test-btn-1", func() {
}, 0, 0);
setlistener("/controls/fire/test-btn-2", func() {
- if (getprop("/systems/failures/engine-right-fire")) { return; }
+ if (getprop("systems/failures/engine-right-fire")) { return; }
if (testBtn2.getValue() == 1) {
if (dcbatNode.getValue() > 25 or dcessNode.getValue() > 25) {
eng2FireWarn.setBoolValue(1);
@@ -692,7 +692,7 @@ setlistener("/controls/fire/test-btn-2", func() {
}, 0, 0);
setlistener("/controls/fire/apu-test-btn", func() {
- if (getprop("/systems/failures/apu-fire")) { return; }
+ if (getprop("systems/failures/apu-fire")) { return; }
if (apuTestBtn.getValue() == 1) {
if (dcbatNode.getValue() > 25 or dcessNode.getValue() > 25) {
apuFireWarn.setBoolValue(1);
@@ -704,7 +704,7 @@ setlistener("/controls/fire/apu-test-btn", func() {
}, 0, 0);
setlistener("/controls/fire/cargo/test", func() {
- if (getprop("/systems/failures/aft-cargo-fire") or getprop("/systems/failures/fwd-cargo-fire") or dcbatNode.getValue() < 25 or dcessNode.getValue() < 25) { return; }
+ if (getprop("systems/failures/aft-cargo-fire") or getprop("systems/failures/fwd-cargo-fire") or dcbatNode.getValue() < 25 or dcessNode.getValue() < 25) { return; }
if (cargoTestBtn.getBoolValue()) {
cargoTestTime.setValue(elapsedTime.getValue());
cargoTestChecker.start();
diff --git a/Nasal/Systems/fuel.nas b/Nasal/Systems/fuel.nas
index 3c9ae9c2..05405edd 100644
--- a/Nasal/Systems/fuel.nas
+++ b/Nasal/Systems/fuel.nas
@@ -7,48 +7,48 @@ var FUEL = {
offset1: 0,
offset2: 0,
timeEngStart: 0,
- cmdCtrOn: props.globals.getNode("/systems/fuel/ctr-pump-cmd-on-eng-start"),
- refuelling: props.globals.getNode("/systems/fuel/refuel/refuelling"),
+ cmdCtrOn: props.globals.getNode("systems/fuel/ctr-pump-cmd-on-eng-start"),
+ refuelling: props.globals.getNode("systems/fuel/refuel/refuelling"),
Fail: {
},
Switches: {
- centerTkMode: props.globals.getNode("/controls/fuel/switches/center-mode"),
- crossfeed: props.globals.getNode("/controls/fuel/switches/crossfeed"),
- pumpLeft1: props.globals.getNode("/controls/fuel/switches/pump-left-1"),
- pumpLeft2: props.globals.getNode("/controls/fuel/switches/pump-left-2"),
- pumpCenter1: props.globals.getNode("/controls/fuel/switches/pump-center-1"),
- pumpCenter2: props.globals.getNode("/controls/fuel/switches/pump-center-2"),
- pumpRight1: props.globals.getNode("/controls/fuel/switches/pump-right-1"),
- pumpRight2: props.globals.getNode("/controls/fuel/switches/pump-right-2"),
+ centerTkMode: props.globals.getNode("controls/fuel/switches/center-mode"),
+ crossfeed: props.globals.getNode("controls/fuel/switches/crossfeed"),
+ pumpLeft1: props.globals.getNode("controls/fuel/switches/pump-left-1"),
+ pumpLeft2: props.globals.getNode("controls/fuel/switches/pump-left-2"),
+ pumpCenter1: props.globals.getNode("controls/fuel/switches/pump-center-1"),
+ pumpCenter2: props.globals.getNode("controls/fuel/switches/pump-center-2"),
+ pumpRight1: props.globals.getNode("controls/fuel/switches/pump-right-1"),
+ pumpRight2: props.globals.getNode("controls/fuel/switches/pump-right-2"),
},
Pumps: {
- apu: props.globals.getNode("/systems/fuel/pumps/apu-operate"),
- allOff: props.globals.getNode("/systems/fuel/pumps/all-eng-pump-off"),
+ apu: props.globals.getNode("systems/fuel/pumps/apu-operate"),
+ allOff: props.globals.getNode("systems/fuel/pumps/all-eng-pump-off"),
},
Valves: {
- crossfeed: props.globals.getNode("/systems/fuel/valves/crossfeed-valve"),
- lpValve1: props.globals.getNode("/systems/fuel/valves/engine-1-lp-valve"),
- lpValve2: props.globals.getNode("/systems/fuel/valves/engine-2-lp-valve"),
- transfer1: props.globals.getNode("/systems/fuel/valves/outer-inner-transfer-valve-1"),
- transfer2: props.globals.getNode("/systems/fuel/valves/outer-inner-transfer-valve-2"),
- refuelLeft: props.globals.getNode("/systems/fuel/refuel/left-valve"),
- refuelCenter: props.globals.getNode("/systems/fuel/refuel/center-valve"),
- refuelRight: props.globals.getNode("/systems/fuel/refuel/right-valve"),
+ crossfeed: props.globals.getNode("systems/fuel/valves/crossfeed-valve"),
+ lpValve1: props.globals.getNode("systems/fuel/valves/engine-1-lp-valve"),
+ lpValve2: props.globals.getNode("systems/fuel/valves/engine-2-lp-valve"),
+ transfer1: props.globals.getNode("systems/fuel/valves/outer-inner-transfer-valve-1"),
+ transfer2: props.globals.getNode("systems/fuel/valves/outer-inner-transfer-valve-2"),
+ refuelLeft: props.globals.getNode("systems/fuel/refuel/left-valve"),
+ refuelCenter: props.globals.getNode("systems/fuel/refuel/center-valve"),
+ refuelRight: props.globals.getNode("systems/fuel/refuel/right-valve"),
},
Quantity: {
- leftOuter: props.globals.getNode("/consumables/fuel/tank[0]/level-lbs"),
- leftOuterPct: props.globals.getNode("/consumables/fuel/tank[0]/level-norm"),
- leftInner: props.globals.getNode("/consumables/fuel/tank[1]/level-lbs"),
- leftInnerPct: props.globals.getNode("/consumables/fuel/tank[1]/level-norm"),
- center: props.globals.getNode("/consumables/fuel/tank[2]/level-lbs"),
- centerPct: props.globals.getNode("/consumables/fuel/tank[2]/level-norm"),
- rightInner: props.globals.getNode("/consumables/fuel/tank[3]/level-lbs"),
- rightInnerPct: props.globals.getNode("/consumables/fuel/tank[3]/level-norm"),
- rightOuter: props.globals.getNode("/consumables/fuel/tank[4]/level-lbs"),
- rightOuterPct: props.globals.getNode("/consumables/fuel/tank[4]/level-norm"),
- usedLeft: props.globals.getNode("/systems/fuel/fuel-used-1"),
- usedRight: props.globals.getNode("/systems/fuel/fuel-used-2"),
+ leftOuter: props.globals.getNode("consumables/fuel/tank[0]/level-lbs"),
+ leftOuterPct: props.globals.getNode("consumables/fuel/tank[0]/level-norm"),
+ leftInner: props.globals.getNode("consumables/fuel/tank[1]/level-lbs"),
+ leftInnerPct: props.globals.getNode("consumables/fuel/tank[1]/level-norm"),
+ center: props.globals.getNode("consumables/fuel/tank[2]/level-lbs"),
+ centerPct: props.globals.getNode("consumables/fuel/tank[2]/level-norm"),
+ rightInner: props.globals.getNode("consumables/fuel/tank[3]/level-lbs"),
+ rightInnerPct: props.globals.getNode("consumables/fuel/tank[3]/level-norm"),
+ rightOuter: props.globals.getNode("consumables/fuel/tank[4]/level-lbs"),
+ rightOuterPct: props.globals.getNode("consumables/fuel/tank[4]/level-norm"),
+ usedLeft: props.globals.getNode("systems/fuel/fuel-used-1"),
+ usedRight: props.globals.getNode("systems/fuel/fuel-used-2"),
},
resetFail: func() {
@@ -84,162 +84,162 @@ setlistener("/engines/engine[1]/state", func() {
var FUELx = {
init: func() {
- setprop("/systems/fuel/gravityfeedL", 0);
- setprop("/systems/fuel/gravityfeedR", 0);
- setprop("/systems/fuel/gravityfeedL-output", 0);
- setprop("/systems/fuel/gravityfeedR-output", 0);
- setprop("/controls/fuel/x-feed", 0);
- setprop("/controls/fuel/tank0pump1", 0);
- setprop("/controls/fuel/tank0pump2", 0);
- setprop("/controls/fuel/tank1pump1", 0);
- setprop("/controls/fuel/tank1pump2", 0);
- setprop("/controls/fuel/tank2pump1", 0);
- setprop("/controls/fuel/tank2pump2", 0);
- setprop("/controls/fuel/mode", 1);
- setprop("/systems/fuel/valves/crossfeed-valve", 0);
- setprop("/systems/fuel/tank[0]/feed", 0);
- setprop("/systems/fuel/tank[1]/feed", 0);
- setprop("/systems/fuel/tank[2]/feed", 0);
- setprop("/systems/fuel/only-use-ctr-tank", 0);
- setprop("/systems/fuel/tank0pump1-fault", 0);
- setprop("/systems/fuel/tank0pump2-fault", 0);
- setprop("/systems/fuel/tank1pump1-fault", 0);
- setprop("/systems/fuel/tank1pump2-fault", 0);
- setprop("/systems/fuel/tank2pump1-fault", 0);
- setprop("/systems/fuel/tank2pump2-fault", 0);
- setprop("/systems/fuel/mode-fault", 0);
+ setprop("systems/fuel/gravityfeedL", 0);
+ setprop("systems/fuel/gravityfeedR", 0);
+ setprop("systems/fuel/gravityfeedL-output", 0);
+ setprop("systems/fuel/gravityfeedR-output", 0);
+ setprop("controls/fuel/x-feed", 0);
+ setprop("controls/fuel/tank0pump1", 0);
+ setprop("controls/fuel/tank0pump2", 0);
+ setprop("controls/fuel/tank1pump1", 0);
+ setprop("controls/fuel/tank1pump2", 0);
+ setprop("controls/fuel/tank2pump1", 0);
+ setprop("controls/fuel/tank2pump2", 0);
+ setprop("controls/fuel/mode", 1);
+ setprop("systems/fuel/valves/crossfeed-valve", 0);
+ setprop("systems/fuel/tank[0]/feed", 0);
+ setprop("systems/fuel/tank[1]/feed", 0);
+ setprop("systems/fuel/tank[2]/feed", 0);
+ setprop("systems/fuel/only-use-ctr-tank", 0);
+ setprop("systems/fuel/tank0pump1-fault", 0);
+ setprop("systems/fuel/tank0pump2-fault", 0);
+ setprop("systems/fuel/tank1pump1-fault", 0);
+ setprop("systems/fuel/tank1pump2-fault", 0);
+ setprop("systems/fuel/tank2pump1-fault", 0);
+ setprop("systems/fuel/tank2pump2-fault", 0);
+ setprop("systems/fuel/mode-fault", 0);
},
loop: func() {
- xfeed_sw = getprop("/controls/fuel/x-feed");
- tank0pump1_sw = getprop("/controls/fuel/tank0pump1");
- tank0pump2_sw = getprop("/controls/fuel/tank0pump2");
- tank1pump1_sw = getprop("/controls/fuel/tank1pump1");
- tank1pump2_sw = getprop("/controls/fuel/tank1pump2");
- tank2pump1_sw = getprop("/controls/fuel/tank2pump1");
- tank2pump2_sw = getprop("/controls/fuel/tank2pump2");
- mode_sw = getprop("/controls/fuel/mode");
- xfeed = getprop("/systems/fuel/valves/crossfeed-valve");
- ac1 = getprop("/systems/electrical/bus/ac-1");
- ac2 = getprop("/systems/electrical/bus/ac-2");
- gravityfeedL = getprop("/systems/fuel/gravityfeedL");
- gravityfeedR = getprop("/systems/fuel/gravityfeedR");
- gload = getprop("/accelerations/pilot-gdamped");
- tank0pump1_fail = getprop("/systems/failures/tank0pump1");
- tank0pump2_fail = getprop("/systems/failures/tank0pump2");
- tank1pump1_fail = getprop("/systems/failures/tank1pump1");
- tank1pump2_fail = getprop("/systems/failures/tank1pump2");
- tank2pump1_fail = getprop("/systems/failures/tank2pump1");
- tank2pump2_fail = getprop("/systems/failures/tank2pump2");
+ xfeed_sw = getprop("controls/fuel/x-feed");
+ tank0pump1_sw = getprop("controls/fuel/tank0pump1");
+ tank0pump2_sw = getprop("controls/fuel/tank0pump2");
+ tank1pump1_sw = getprop("controls/fuel/tank1pump1");
+ tank1pump2_sw = getprop("controls/fuel/tank1pump2");
+ tank2pump1_sw = getprop("controls/fuel/tank2pump1");
+ tank2pump2_sw = getprop("controls/fuel/tank2pump2");
+ mode_sw = getprop("controls/fuel/mode");
+ xfeed = getprop("systems/fuel/valves/crossfeed-valve");
+ ac1 = getprop("systems/electrical/bus/ac-1");
+ ac2 = getprop("systems/electrical/bus/ac-2");
+ gravityfeedL = getprop("systems/fuel/gravityfeedL");
+ gravityfeedR = getprop("systems/fuel/gravityfeedR");
+ gload = getprop("accelerations/pilot-gdamped");
+ tank0pump1_fail = getprop("systems/failures/tank0pump1");
+ tank0pump2_fail = getprop("systems/failures/tank0pump2");
+ tank1pump1_fail = getprop("systems/failures/tank1pump1");
+ tank1pump2_fail = getprop("systems/failures/tank1pump2");
+ tank2pump1_fail = getprop("systems/failures/tank2pump1");
+ tank2pump2_fail = getprop("systems/failures/tank2pump2");
if (gload >= 0.7 and gravityfeedL) {
- setprop("/systems/fuel/gravityfeedL-output", 1);
+ setprop("systems/fuel/gravityfeedL-output", 1);
} else {
- setprop("/systems/fuel/gravityfeedL-output", 0);
+ setprop("systems/fuel/gravityfeedL-output", 0);
}
if (gload >= 0.7 and gravityfeedR) {
- setprop("/systems/fuel/gravityfeedR-output", 1);
+ setprop("systems/fuel/gravityfeedR-output", 1);
} else {
- setprop("/systems/fuel/gravityfeedR-output", 0);
+ setprop("systems/fuel/gravityfeedR-output", 0);
}
- gravityfeedL_output = getprop("/systems/fuel/gravityfeedL-output");
- gravityfeedR_output = getprop("/systems/fuel/gravityfeedR-output");
+ gravityfeedL_output = getprop("systems/fuel/gravityfeedL-output");
+ gravityfeedR_output = getprop("systems/fuel/gravityfeedR-output");
if ((ac1 >= 110 or ac2 >= 110) and tank0pump1_sw and !tank0pump1_fail) {
- setprop("/systems/fuel/tank[0]/feed", 1);
+ setprop("systems/fuel/tank[0]/feed", 1);
} else if ((ac1 >= 110 or ac2 >= 110) and tank0pump2_sw and !tank0pump2_fail) {
- setprop("/systems/fuel/tank[0]/feed", 1);
+ setprop("systems/fuel/tank[0]/feed", 1);
} else if (gravityfeedL_output) {
- setprop("/systems/fuel/tank[0]/feed", 1);
+ setprop("systems/fuel/tank[0]/feed", 1);
} else {
- setprop("/systems/fuel/tank[0]/feed", 0);
+ setprop("systems/fuel/tank[0]/feed", 0);
}
if ((ac1 >= 110 or ac2 >= 110) and tank1pump1_sw and !tank1pump1_fail) {
- setprop("/systems/fuel/tank[1]/feed", 1);
+ setprop("systems/fuel/tank[1]/feed", 1);
} else if ((ac1 >= 110 or ac2 >= 110) and tank1pump2_sw and !tank1pump2_fail) {
- setprop("/systems/fuel/tank[1]/feed", 1);
+ setprop("systems/fuel/tank[1]/feed", 1);
} else {
- setprop("/systems/fuel/tank[1]/feed", 0);
+ setprop("systems/fuel/tank[1]/feed", 0);
}
if ((ac1 >= 110 or ac2 >= 110) and tank2pump1_sw and !tank2pump1_fail) {
- setprop("/systems/fuel/tank[2]/feed", 1);
+ setprop("systems/fuel/tank[2]/feed", 1);
} else if ((ac1 >= 110 or ac2 >= 110) and tank2pump2_sw and !tank2pump2_fail) {
- setprop("/systems/fuel/tank[2]/feed", 1);
+ setprop("systems/fuel/tank[2]/feed", 1);
} else if (gravityfeedR_output) {
- setprop("/systems/fuel/tank[2]/feed", 1);
+ setprop("systems/fuel/tank[2]/feed", 1);
} else {
- setprop("/systems/fuel/tank[2]/feed", 0);
+ setprop("systems/fuel/tank[2]/feed", 0);
}
if ((ac1 >= 110 or ac2 >= 110) and xfeed_sw) {
- setprop("/systems/fuel/valves/crossfeed-valve", 1);
+ setprop("systems/fuel/valves/crossfeed-valve", 1);
} else {
- setprop("/systems/fuel/valves/crossfeed-valve", 0);
+ setprop("systems/fuel/valves/crossfeed-valve", 0);
}
- tank0 = getprop("/systems/fuel/tank[0]/feed");
- tank1 = getprop("/systems/fuel/tank[1]/feed");
- tank2 = getprop("/systems/fuel/tank[2]/feed");
+ tank0 = getprop("systems/fuel/tank[0]/feed");
+ tank1 = getprop("systems/fuel/tank[1]/feed");
+ tank2 = getprop("systems/fuel/tank[2]/feed");
if ((ac1 >= 110 or ac2 >= 110) and (tank0pump1_sw or tank0pump2_sw)) {
- setprop("/systems/fuel/gravityfeedL", 0);
+ setprop("systems/fuel/gravityfeedL", 0);
} else {
- setprop("/systems/fuel/gravityfeedL", 1);
+ setprop("systems/fuel/gravityfeedL", 1);
}
if ((ac1 >= 110 or ac2 >= 110) and (tank2pump1_sw or tank2pump2_sw)) {
- setprop("/systems/fuel/gravityfeedR", 0);
+ setprop("systems/fuel/gravityfeedR", 0);
} else {
- setprop("/systems/fuel/gravityfeedR", 1);
+ setprop("systems/fuel/gravityfeedR", 1);
}
- gravityfeedL = getprop("/systems/fuel/gravityfeedL");
- gravityfeedR = getprop("/systems/fuel/gravityfeedR");
+ gravityfeedL = getprop("systems/fuel/gravityfeedL");
+ gravityfeedR = getprop("systems/fuel/gravityfeedR");
- if ((getprop("/fdm/jsbsim/propulsion/tank[1]/contents-lbs") >= 50) and (tank1pump1_sw or tank1pump2_sw) and !gravityfeedL and !gravityfeedR) {
- setprop("/systems/fuel/only-use-ctr-tank", 1);
+ if ((getprop("fdm/jsbsim/propulsion/tank[1]/contents-lbs") >= 50) and (tank1pump1_sw or tank1pump2_sw) and !gravityfeedL and !gravityfeedR) {
+ setprop("systems/fuel/only-use-ctr-tank", 1);
} else {
- setprop("/systems/fuel/only-use-ctr-tank", 0);
+ setprop("systems/fuel/only-use-ctr-tank", 0);
}
# Fault lights
if (tank0pump1_sw and tank0pump1_fail) {
- setprop("/systems/fuel/tank0pump1-fault", 1);
+ setprop("systems/fuel/tank0pump1-fault", 1);
} else {
- setprop("/systems/fuel/tank0pump1-fault", 0);
+ setprop("systems/fuel/tank0pump1-fault", 0);
}
if (tank0pump2_sw and tank0pump2_fail) {
- setprop("/systems/fuel/tank0pump2-fault", 1);
+ setprop("systems/fuel/tank0pump2-fault", 1);
} else {
- setprop("/systems/fuel/tank0pump2-fault", 0);
+ setprop("systems/fuel/tank0pump2-fault", 0);
}
if (tank1pump1_sw and tank1pump1_fail) {
- setprop("/systems/fuel/tank1pump1-fault", 1);
+ setprop("systems/fuel/tank1pump1-fault", 1);
} else {
- setprop("/systems/fuel/tank1pump1-fault", 0);
+ setprop("systems/fuel/tank1pump1-fault", 0);
}
if (tank1pump2_sw and tank1pump2_fail) {
- setprop("/systems/fuel/tank1pump2-fault", 1);
+ setprop("systems/fuel/tank1pump2-fault", 1);
} else {
- setprop("/systems/fuel/tank1pump2-fault", 0);
+ setprop("systems/fuel/tank1pump2-fault", 0);
}
if (tank2pump1_sw and tank2pump1_fail) {
- setprop("/systems/fuel/tank2pump1-fault", 1);
+ setprop("systems/fuel/tank2pump1-fault", 1);
} else {
- setprop("/systems/fuel/tank2pump1-fault", 0);
+ setprop("systems/fuel/tank2pump1-fault", 0);
}
if (tank2pump2_sw and tank2pump2_fail) {
- setprop("/systems/fuel/tank2pump2-fault", 1);
+ setprop("systems/fuel/tank2pump2-fault", 1);
} else {
- setprop("/systems/fuel/tank2pump2-fault", 0);
+ setprop("systems/fuel/tank2pump2-fault", 0);
}
},
};
diff --git a/Nasal/Systems/ground_services.nas b/Nasal/Systems/ground_services.nas
index 2db8c5ea..164e8919 100644
--- a/Nasal/Systems/ground_services.nas
+++ b/Nasal/Systems/ground_services.nas
@@ -11,33 +11,33 @@ var ground_services = {
me.ice_time = 0;
# Catering Truck
- setprop("/services/catering/scissor-deg", 0);
- setprop("/services/catering/position-norm", 0);
+ setprop("services/catering/scissor-deg", 0);
+ setprop("services/catering/position-norm", 0);
# De-icing Truck
- setprop("/services/deicing_truck/enable", 0);
- setprop("/services/deicing_truck/de-ice", 0);
+ setprop("services/deicing_truck/enable", 0);
+ setprop("services/deicing_truck/de-ice", 0);
# Set them all to 0 if the aircraft is not stationary
- if (getprop("/velocities/groundspeed-kt") >= 2) {
- setprop("/services/chocks/nose", 0);
- setprop("/services/chocks/left", 0);
- setprop("/services/chocks/right", 0);
- setprop("/services/fuel-truck/enable", 0);
- setprop("/services/deicing_truck/enable", 0);
- setprop("/services/catering/enable", 0);
+ if (getprop("velocities/groundspeed-kt") >= 2) {
+ setprop("services/chocks/nose", 0);
+ setprop("services/chocks/left", 0);
+ setprop("services/chocks/right", 0);
+ setprop("services/fuel-truck/enable", 0);
+ setprop("services/deicing_truck/enable", 0);
+ setprop("services/catering/enable", 0);
}
me.reset();
},
update : func {
# Catering Truck Controls
- var cater_pos = getprop("/services/catering/position-norm");
+ var cater_pos = getprop("services/catering/position-norm");
var scissor_deg = 3.325 * (1/D2R) * math.asin(cater_pos / (2 * 3.6612));
- setprop("/services/catering/scissor-deg", scissor_deg);
+ setprop("services/catering/scissor-deg", scissor_deg);
# De-icing Truck
- if (getprop("/services/deicing_truck/enable") and getprop("/services/deicing_truck/de-ice")) {
+ if (getprop("services/deicing_truck/enable") and getprop("services/deicing_truck/de-ice")) {
if (me.ice_time == 2) {
door.move(1);
ground_message ("Lifting De-icing Crane...");
@@ -60,7 +60,7 @@ var ground_services = {
if (me.ice_time == 900) {
ground_message("De-icing Completed!", 1, 1, 1);
- setprop("/services/deicing_truck/de-ice", 0);
+ setprop("services/deicing_truck/de-ice", 0);
}
} else {
@@ -81,7 +81,7 @@ var ground_services = {
};
var ground_message = func (string) {
- setprop("/sim/messages/ground", string);
+ setprop("sim/messages/ground", string);
}
setlistener("sim/signals/fdm-initialized", func {
diff --git a/Nasal/Systems/hydraulics.nas b/Nasal/Systems/hydraulics.nas
index 1ff789e5..9ae7e607 100644
--- a/Nasal/Systems/hydraulics.nas
+++ b/Nasal/Systems/hydraulics.nas
@@ -22,23 +22,23 @@ var HYD = {
counter: props.globals.initNode("/systems/hydraulic/brakes/counter", 0, "INT"),
},
Fail: {
- blueElec: props.globals.getNode("/systems/failures/hydraulic/blue-elec"),
- blueLeak: props.globals.getNode("/systems/failures/hydraulic/blue-leak"),
- greenEng: props.globals.getNode("/systems/failures/hydraulic/green-edp"),
- greenLeak: props.globals.getNode("/systems/failures/hydraulic/green-leak"),
- ptuFault: props.globals.getNode("/systems/failures/hydraulic/ptu"),
- yellowEng: props.globals.getNode("/systems/failures/hydraulic/yellow-edp"),
- yellowElec: props.globals.getNode("/systems/failures/hydraulic/yellow-elec"),
- yellowLeak: props.globals.getNode("/systems/failures/hydraulic/yellow-leak"),
+ blueElec: props.globals.getNode("systems/failures/hydraulic/blue-elec"),
+ blueLeak: props.globals.getNode("systems/failures/hydraulic/blue-leak"),
+ greenEng: props.globals.getNode("systems/failures/hydraulic/green-edp"),
+ greenLeak: props.globals.getNode("systems/failures/hydraulic/green-leak"),
+ ptuFault: props.globals.getNode("systems/failures/hydraulic/ptu"),
+ yellowEng: props.globals.getNode("systems/failures/hydraulic/yellow-edp"),
+ yellowElec: props.globals.getNode("systems/failures/hydraulic/yellow-elec"),
+ yellowLeak: props.globals.getNode("systems/failures/hydraulic/yellow-leak"),
},
Psi: {
- blue: props.globals.getNode("/systems/hydraulic/blue-psi"),
- green: props.globals.getNode("/systems/hydraulic/green-psi"),
- yellow: props.globals.getNode("/systems/hydraulic/yellow-psi"),
+ blue: props.globals.getNode("systems/hydraulic/blue-psi"),
+ green: props.globals.getNode("systems/hydraulic/green-psi"),
+ yellow: props.globals.getNode("systems/hydraulic/yellow-psi"),
},
Ptu: {
- active: props.globals.getNode("/systems/hydraulic/sources/ptu/ptu-active"),
- diff: props.globals.getNode("/systems/hydraulic/yellow-psi-diff"),
+ active: props.globals.getNode("systems/hydraulic/sources/ptu/ptu-active"),
+ diff: props.globals.getNode("systems/hydraulic/yellow-psi-diff"),
},
Qty: {
blueInput: props.globals.initNode("/systems/hydraulic/blue-qty-input", 0, "INT"),
@@ -46,20 +46,20 @@ var HYD = {
yellowInput: props.globals.initNode("/systems/hydraulic/yellow-qty-input", 0, "INT"),
},
Rat: {
- position: props.globals.getNode("/systems/hydraulic/sources/rat/position"),
+ position: props.globals.getNode("systems/hydraulic/sources/rat/position"),
},
Switch: {
- blueElec: props.globals.getNode("/controls/hydraulic/switches/blue-elec"),
- blueElecOvrd: props.globals.getNode("/controls/hydraulic/switches/blue-elec-ovrd"),
- greenEDP: props.globals.getNode("/controls/hydraulic/switches/green-edp"),
- ptu: props.globals.getNode("/controls/hydraulic/switches/ptu"),
- rat: props.globals.getNode("/controls/hydraulic/switches/rat-man"),
- yellowEDP: props.globals.getNode("/controls/hydraulic/switches/yellow-edp"),
- yellowElec: props.globals.getNode("/controls/hydraulic/switches/yellow-elec"),
+ blueElec: props.globals.getNode("controls/hydraulic/switches/blue-elec"),
+ blueElecOvrd: props.globals.getNode("controls/hydraulic/switches/blue-elec-ovrd"),
+ greenEDP: props.globals.getNode("controls/hydraulic/switches/green-edp"),
+ ptu: props.globals.getNode("controls/hydraulic/switches/ptu"),
+ rat: props.globals.getNode("controls/hydraulic/switches/rat-man"),
+ yellowEDP: props.globals.getNode("controls/hydraulic/switches/yellow-edp"),
+ yellowElec: props.globals.getNode("controls/hydraulic/switches/yellow-elec"),
},
Valve: {
- yellowFire: props.globals.getNode("/systems/hydraulic/sources/yellow-edp/fire-valve"),
- greenFire: props.globals.getNode("/systems/hydraulic/sources/green-edp/fire-valve"),
+ yellowFire: props.globals.getNode("systems/hydraulic/sources/yellow-edp/fire-valve"),
+ greenFire: props.globals.getNode("systems/hydraulic/sources/green-edp/fire-valve"),
},
init: func() {
me.resetFail();
@@ -86,7 +86,7 @@ var HYD = {
},
loop: func() {
accum = me.Brakes.accumPressPsi.getValue();
- parking = getprop("/controls/gear/brake-parking");
+ parking = getprop("controls/gear/brake-parking");
askidnws_sw = me.Brakes.askidSw.getBoolValue();
if (!parking and askidnws_sw and me.Psi.green.getValue() > 2500) {
@@ -107,8 +107,8 @@ var HYD = {
};
setlistener("/controls/gear/gear-down", func {
- down = getprop("/controls/gear/gear-down");
- if (!down and (getprop("/gear/gear[0]/wow") or getprop("/gear/gear[1]/wow") or getprop("/gear/gear[2]/wow"))) {
- setprop("/controls/gear/gear-down", 1);
+ down = getprop("controls/gear/gear-down");
+ if (!down and (getprop("gear/gear[0]/wow") or getprop("gear/gear[1]/wow") or getprop("gear/gear[2]/wow"))) {
+ setprop("controls/gear/gear-down", 1);
}
});
diff --git a/Nasal/Systems/icing.nas b/Nasal/Systems/icing.nas
index 4e8a51a9..9ffffad4 100644
--- a/Nasal/Systems/icing.nas
+++ b/Nasal/Systems/icing.nas
@@ -60,186 +60,186 @@ var stateL = 0;
var stateR = 0;
var icingInit = func {
- setprop("/systems/icing/severity", "0"); # maximum severity: we will make it random
- setprop("/systems/icing/factor", 0.0); # the factor is how many inches we add per second
- setprop("/systems/icing/max-spread-degc", 0.0);
- setprop("/systems/icing/melt-w-heat-factor", -0.00005000);
- setprop("/systems/icing/icingcond", 0);
- setprop("/controls/switches/windowprobeheat", 0);
- setprop("/controls/switches/wing", 0);
- setprop("/controls/switches/wingfault", 0);
- setprop("/controls/switches/leng", 0);
- setprop("/controls/switches/lengfault", 0);
- setprop("/controls/switches/reng", 0);
- setprop("/controls/switches/rengfault", 0);
- setprop("/controls/deice/wing", 0);
- setprop("/controls/deice/lengine", 0);
- setprop("/controls/deice/rengine", 0);
- setprop("/controls/deice/windowprobeheat", 0);
- setprop("/systems/pitot/icing", 0.0);
- setprop("/systems/pitot/failed", 1);
- setprop("/controls/deice/WingHasBeenTurnedOff", 0);
- setprop("/controls/deice/GroundModeFinished", 0);
+ setprop("systems/icing/severity", "0"); # maximum severity: we will make it random
+ setprop("systems/icing/factor", 0.0); # the factor is how many inches we add per second
+ setprop("systems/icing/max-spread-degc", 0.0);
+ setprop("systems/icing/melt-w-heat-factor", -0.00005000);
+ setprop("systems/icing/icingcond", 0);
+ setprop("controls/switches/windowprobeheat", 0);
+ setprop("controls/switches/wing", 0);
+ setprop("controls/switches/wingfault", 0);
+ setprop("controls/switches/leng", 0);
+ setprop("controls/switches/lengfault", 0);
+ setprop("controls/switches/reng", 0);
+ setprop("controls/switches/rengfault", 0);
+ setprop("controls/deice/wing", 0);
+ setprop("controls/deice/lengine", 0);
+ setprop("controls/deice/rengine", 0);
+ setprop("controls/deice/windowprobeheat", 0);
+ setprop("systems/pitot/icing", 0.0);
+ setprop("systems/pitot/failed", 1);
+ setprop("controls/deice/WingHasBeenTurnedOff", 0);
+ setprop("controls/deice/GroundModeFinished", 0);
icing_timer.start();
}
var icingModel = func {
- dewpoint = getprop("/environment/dewpoint-degc");
- temperature = getprop("/environment/temperature-degc");
- speed = getprop("/velocities/airspeed-kt");
- visibility = getprop("/environment/effective-visibility-m");
- visibLclWx = getprop("/environment/visibility-m");
- severity = getprop("/systems/icing/severity");
- factor = getprop("/systems/icing/factor");
- maxSpread = getprop("/systems/icing/max-spread-degc");
- icingCond = getprop("/systems/icing/icingcond");
- pause = getprop("/sim/freeze/master");
- melt = getprop("/systems/icing/melt-w-heat-factor");
- windowprobe = getprop("/controls/deice/windowprobeheat");
- wingBtn = getprop("/controls/switches/wing");
- wingFault = getprop("/controls/switches/wingfault");
- wingAnti = getprop("/controls/deice/wing");
- PSI = getprop("/systems/pneumatic/total-psi");
- wowl = getprop("/gear/gear[1]/wow");
- wowr = getprop("/gear/gear[2]/wow");
- PitotIcing = getprop("/systems/pitot/icing");
- PitotFailed = getprop("/systems/pitot/failed");
- lengBtn = getprop("/controls/switches/leng");
- lengFault = getprop("/controls/switches/lengfault");
- rengBtn = getprop("/controls/switches/reng");
- rengFault = getprop("/controls/switches/rengfault");
- lengAnti = getprop("/controls/deice/lengine");
- rengAnti = getprop("/controls/deice/rengine");
- WingHasBeenTurnedOff = getprop("/controls/deice/WingHasBeenTurnedOff");
- GroundModeFinished = getprop("/controls/deice/GroundModeFinished");
+ dewpoint = getprop("environment/dewpoint-degc");
+ temperature = getprop("environment/temperature-degc");
+ speed = getprop("velocities/airspeed-kt");
+ visibility = getprop("environment/effective-visibility-m");
+ visibLclWx = getprop("environment/visibility-m");
+ severity = getprop("systems/icing/severity");
+ factor = getprop("systems/icing/factor");
+ maxSpread = getprop("systems/icing/max-spread-degc");
+ icingCond = getprop("systems/icing/icingcond");
+ pause = getprop("sim/freeze/master");
+ melt = getprop("systems/icing/melt-w-heat-factor");
+ windowprobe = getprop("controls/deice/windowprobeheat");
+ wingBtn = getprop("controls/switches/wing");
+ wingFault = getprop("controls/switches/wingfault");
+ wingAnti = getprop("controls/deice/wing");
+ PSI = getprop("systems/pneumatic/total-psi");
+ wowl = getprop("gear/gear[1]/wow");
+ wowr = getprop("gear/gear[2]/wow");
+ PitotIcing = getprop("systems/pitot/icing");
+ PitotFailed = getprop("systems/pitot/failed");
+ lengBtn = getprop("controls/switches/leng");
+ lengFault = getprop("controls/switches/lengfault");
+ rengBtn = getprop("controls/switches/reng");
+ rengFault = getprop("controls/switches/rengfault");
+ lengAnti = getprop("controls/deice/lengine");
+ rengAnti = getprop("controls/deice/rengine");
+ WingHasBeenTurnedOff = getprop("controls/deice/WingHasBeenTurnedOff");
+ GroundModeFinished = getprop("controls/deice/GroundModeFinished");
if (temperature >= 0 or !icingCond) {
- setprop("/systems/icing/severity", "0");
+ setprop("systems/icing/severity", "0");
} else if (temperature < 0 and temperature >= -2 and icingCond) {
- setprop("/systems/icing/severity", "1");
+ setprop("systems/icing/severity", "1");
} else if (temperature < -2 and temperature >= -12 and icingCond) {
- setprop("/systems/icing/severity", "3");
+ setprop("systems/icing/severity", "3");
} else if (temperature < -12 and temperature >= -30 and icingCond) {
- setprop("/systems/icing/severity", "5");
+ setprop("systems/icing/severity", "5");
} else if (temperature < -30 and temperature >= -40 and icingCond) {
- setprop("/systems/icing/severity", "3");
+ setprop("systems/icing/severity", "3");
} else if (temperature < -40 and temperature >= -99 and icingCond) {
- setprop("/systems/icing/severity", "1");
+ setprop("systems/icing/severity", "1");
}
- icing1 = getprop("/sim/model/icing/iceable[0]/ice-inches");
- sensitive1 = getprop("/sim/model/icing/iceable[0]/sensitivity");
+ icing1 = getprop("sim/model/icing/iceable[0]/ice-inches");
+ sensitive1 = getprop("sim/model/icing/iceable[0]/sensitivity");
v = icing1 + (factor * sensitive1);
a = icing1 + melt;
if (icing1 < 0.0 and !pause) {
- setprop("/sim/model/icing/iceable[0]/ice-inches", 0.0);
+ setprop("sim/model/icing/iceable[0]/ice-inches", 0.0);
} else if (wingAnti) {
- setprop("/sim/model/icing/iceable[0]/ice-inches", a);
+ setprop("sim/model/icing/iceable[0]/ice-inches", a);
} else if (!pause and !wingAnti) {
- setprop("/sim/model/icing/iceable[0]/ice-inches", v);
+ setprop("sim/model/icing/iceable[0]/ice-inches", v);
}
- icing2 = getprop("/sim/model/icing/iceable[1]/ice-inches");
- sensitive2 = getprop("/sim/model/icing/iceable[1]/sensitivity");
+ icing2 = getprop("sim/model/icing/iceable[1]/ice-inches");
+ sensitive2 = getprop("sim/model/icing/iceable[1]/sensitivity");
u = icing2 + (factor * sensitive2);
b = icing2 + melt;
if (icing2 < 0.0 and !pause) {
- setprop("/sim/model/icing/iceable[1]/ice-inches", 0.0);
+ setprop("sim/model/icing/iceable[1]/ice-inches", 0.0);
} else if (lengAnti) {
- setprop("/sim/model/icing/iceable[1]/ice-inches", b);
+ setprop("sim/model/icing/iceable[1]/ice-inches", b);
} else if (!pause and !lengAnti) {
- setprop("/sim/model/icing/iceable[1]/ice-inches", u);
+ setprop("sim/model/icing/iceable[1]/ice-inches", u);
}
- icing3 = getprop("/sim/model/icing/iceable[2]/ice-inches");
- sensitive3 = getprop("/sim/model/icing/iceable[2]/sensitivity");
+ icing3 = getprop("sim/model/icing/iceable[2]/ice-inches");
+ sensitive3 = getprop("sim/model/icing/iceable[2]/sensitivity");
t = icing3 + (factor * sensitive3);
c = icing3 + melt;
if (icing3 < 0.0 and !pause) {
- setprop("/sim/model/icing/iceable[2]/ice-inches", 0.0);
+ setprop("sim/model/icing/iceable[2]/ice-inches", 0.0);
} else if (rengAnti) {
- setprop("/sim/model/icing/iceable[2]/ice-inches", c);
+ setprop("sim/model/icing/iceable[2]/ice-inches", c);
} else if (!pause and !rengAnti) {
- setprop("/sim/model/icing/iceable[2]/ice-inches", t);
+ setprop("sim/model/icing/iceable[2]/ice-inches", t);
}
- icing4 = getprop("/sim/model/icing/iceable[3]/ice-inches");
- sensitive4 = getprop("/sim/model/icing/iceable[3]/sensitivity");
+ icing4 = getprop("sim/model/icing/iceable[3]/ice-inches");
+ sensitive4 = getprop("sim/model/icing/iceable[3]/sensitivity");
s = icing4 + (factor * sensitive4);
d = icing4 + melt;
if (icing4 < 0.0 and !pause) {
- setprop("/sim/model/icing/iceable[3]/ice-inches", 0.0);
+ setprop("sim/model/icing/iceable[3]/ice-inches", 0.0);
} else if (windowprobe) {
- setprop("/sim/model/icing/iceable[3]/ice-inches", d);
+ setprop("sim/model/icing/iceable[3]/ice-inches", d);
} else if (!pause and !windowprobe) {
- setprop("/sim/model/icing/iceable[3]/ice-inches", s);
+ setprop("sim/model/icing/iceable[3]/ice-inches", s);
}
- icing5 = getprop("/sim/model/icing/iceable[4]/ice-inches");
- sensitive5 = getprop("/sim/model/icing/iceable[4]/sensitivity");
+ icing5 = getprop("sim/model/icing/iceable[4]/ice-inches");
+ sensitive5 = getprop("sim/model/icing/iceable[4]/sensitivity");
r = icing5 + (factor * sensitive5);
if (icing5 < 0.0 and !pause) {
- setprop("/sim/model/icing/iceable[4]/ice-inches", 0.0);
+ setprop("sim/model/icing/iceable[4]/ice-inches", 0.0);
} else if (!pause) {
- setprop("/sim/model/icing/iceable[4]/ice-inches", r);
+ setprop("sim/model/icing/iceable[4]/ice-inches", r);
}
- icing6 = getprop("/sim/model/icing/iceable[5]/ice-inches");
- sensitive6 = getprop("/sim/model/icing/iceable[5]/sensitivity");
+ icing6 = getprop("sim/model/icing/iceable[5]/ice-inches");
+ sensitive6 = getprop("sim/model/icing/iceable[5]/sensitivity");
q = icing6 + (factor * sensitive6);
e = icing6 + melt;
if (icing6 < 0.0 and !pause) {
- setprop("/sim/model/icing/iceable[5]/ice-inches", 0.0);
+ setprop("sim/model/icing/iceable[5]/ice-inches", 0.0);
} else if (windowprobe) {
- setprop("/sim/model/icing/iceable[5]/ice-inches", e);
+ setprop("sim/model/icing/iceable[5]/ice-inches", e);
} else if (!pause and !windowprobe) {
- setprop("/sim/model/icing/iceable[5]/ice-inches", q);
+ setprop("sim/model/icing/iceable[5]/ice-inches", q);
}
# Do we create ice?
spread = temperature - dewpoint;
# freezing fog or low temp and below dp or in advanced wx cloud
if ((spread < maxSpread and temperature < 0) or (temperature < 0 and visibility < 1000) or (visibLclWx < 5000 and temperature < 0)) {
- setprop("/systems/icing/icingcond", 1);
+ setprop("systems/icing/icingcond", 1);
} else {
- setprop("/systems/icing/icingcond", 0);
+ setprop("systems/icing/icingcond", 0);
}
if (WingHasBeenTurnedOff and !wowl and !wowr and GroundModeFinished) {
- setprop("/controls/deice/wing", 1);
- setprop("/controls/switches/WingHasBeenTurnedOff", 0);
+ setprop("controls/deice/wing", 1);
+ setprop("controls/switches/WingHasBeenTurnedOff", 0);
}
# If we have low pressure we have a fault
if (PSI < 10) {
- setprop("/controls/switches/wingfault", 1);
- setprop("/controls/deice/wing", 0);
+ setprop("controls/switches/wingfault", 1);
+ setprop("controls/deice/wing", 0);
}
if (PSI > 10 and wingFault) {
- setprop("/controls/switches/wingfault", 0);
+ setprop("controls/switches/wingfault", 0);
if (wingBtn) {
- setprop("/controls/deice/wing", 1);
+ setprop("controls/deice/wing", 1);
}
}
if (PitotIcing > 0.03) {
if (!PitotFailed) {
- setprop("/systems/pitot/failed", 1);
+ setprop("systems/pitot/failed", 1);
}
} else if (PitotIcing < 0.03) {
if (PitotFailed) {
- setprop("/systems/pitot/failed", 0);
+ setprop("systems/pitot/failed", 0);
}
}
- # if ((getprop("/systems/electrical/bus/dc-1") == 0 or getprop("/systems/electrical/bus/dc-2") == 0) and getprop("/fdm/jsbsim/position/wow") == 0) {
- # setprop("/controls/switches/leng", 1);
- # setprop("/controls/switches/reng", 1);
+ # if ((getprop("systems/electrical/bus/dc-1") == 0 or getprop("systems/electrical/bus/dc-2") == 0) and getprop("fdm/jsbsim/position/wow") == 0) {
+ # setprop("controls/switches/leng", 1);
+ # setprop("controls/switches/reng", 1);
# }
- #if (getprop("/systems/electrical/bus/dc-ess-shed") == 0) {
- # setprop("/controls/switches/wing", 0);
+ #if (getprop("systems/electrical/bus/dc-ess-shed") == 0) {
+ # setprop("controls/switches/wing", 0);
#}
}
@@ -248,24 +248,24 @@ var icingModel = func {
#################
setlistener("/controls/switches/leng", func {
- if (getprop("/controls/switches/leng") == 1 and getprop("/engines/engine[0]/state") == 3) {
- setprop("/controls/switches/lengfault", 1);
+ if (getprop("controls/switches/leng") == 1 and getprop("engines/engine[0]/state") == 3) {
+ setprop("controls/switches/lengfault", 1);
settimer(func() {
- setprop("/controls/switches/lengfault", 0);
- setprop("/controls/deice/lengine", 1);
+ setprop("controls/switches/lengfault", 0);
+ setprop("controls/deice/lengine", 1);
}, 0.5);
- } else if (getprop("/controls/switches/leng") == 0) {
- setprop("/controls/switches/lengfault", 1);
+ } else if (getprop("controls/switches/leng") == 0) {
+ setprop("controls/switches/lengfault", 1);
settimer(func() {
- setprop("/controls/switches/lengfault", 0);
- setprop("/controls/deice/lengine", 0);
+ setprop("controls/switches/lengfault", 0);
+ setprop("controls/deice/lengine", 0);
}, 0.5);
}
});
setlistener("/engines/engine[0]/state", func {
- if (getprop("/engines/engine[0]/state") != 3) {
- setprop("/controls/switches/leng", 0);
+ if (getprop("engines/engine[0]/state") != 3) {
+ setprop("controls/switches/leng", 0);
}
});
@@ -274,24 +274,24 @@ setlistener("/engines/engine[0]/state", func {
#################
setlistener("/controls/switches/reng", func {
- if (getprop("/controls/switches/reng") == 1 and getprop("/engines/engine[1]/state") == 3) {
- setprop("/controls/switches/rengfault", 1);
+ if (getprop("controls/switches/reng") == 1 and getprop("engines/engine[1]/state") == 3) {
+ setprop("controls/switches/rengfault", 1);
settimer(func() {
- setprop("/controls/switches/rengfault", 0);
- setprop("/controls/deice/rengine", 1);
+ setprop("controls/switches/rengfault", 0);
+ setprop("controls/deice/rengine", 1);
}, 0.5);
- } else if (getprop("/controls/switches/reng") == 0) {
- setprop("/controls/switches/rengfault", 1);
+ } else if (getprop("controls/switches/reng") == 0) {
+ setprop("controls/switches/rengfault", 1);
settimer(func() {
- setprop("/controls/switches/rengfault", 0);
- setprop("/controls/deice/rengine", 0);
+ setprop("controls/switches/rengfault", 0);
+ setprop("controls/deice/rengine", 0);
}, 0.5);
}
});
setlistener("/engines/engine[1]/state", func {
- if (getprop("/engines/engine[1]/state") != 3) {
- setprop("/controls/switches/reng", 0);
+ if (getprop("engines/engine[1]/state") != 3) {
+ setprop("controls/switches/reng", 0);
}
});
@@ -300,21 +300,21 @@ setlistener("/engines/engine[1]/state", func {
##################
setlistener("/controls/switches/windowprobeheat", func {
- windowprb = getprop("/controls/switches/windowprobeheat");
+ windowprb = getprop("controls/switches/windowprobeheat");
if (windowprb == 0.5) { # if in auto
- wowl = getprop("/gear/gear[1]/wow");
- wowr = getprop("/gear/gear[2]/wow");
- stateL = getprop("/engines/engine[0]/state");
- stateR = getprop("/engines/engine[1]/state");
+ wowl = getprop("gear/gear[1]/wow");
+ wowr = getprop("gear/gear[2]/wow");
+ stateL = getprop("engines/engine[0]/state");
+ stateR = getprop("engines/engine[1]/state");
if (!wowl or !wowr) {
- setprop("/controls/deice/windowprobeheat", 1);
+ setprop("controls/deice/windowprobeheat", 1);
} else if (stateL == 3 or stateR == 3) {
- setprop("/controls/deice/windowprobeheat", 1);
+ setprop("controls/deice/windowprobeheat", 1);
}
} else if (windowprb == 1) { # if in ON
- setprop("/controls/deice/windowprobeheat", 1);
+ setprop("controls/deice/windowprobeheat", 1);
} else {
- setprop("/controls/deice/windowprobeheat", 0);
+ setprop("controls/deice/windowprobeheat", 0);
}
});
@@ -324,33 +324,33 @@ setlistener("/controls/switches/windowprobeheat", func {
# Switching on the wing anti-ice
setlistener("/controls/switches/wing", func {
- wowl = getprop("/gear/gear[1]/wow");
- wowr = getprop("/gear/gear[2]/wow");
- wingBtn = getprop("/controls/switches/wing");
+ wowl = getprop("gear/gear[1]/wow");
+ wowr = getprop("gear/gear[2]/wow");
+ wingBtn = getprop("controls/switches/wing");
if (wowl and wowr and wingBtn) {
- setprop("/controls/switches/wingfault", 1);
+ setprop("controls/switches/wingfault", 1);
settimer(func() {
- setprop("/controls/switches/wingfault", 0);
- setprop("/controls/deice/wing", 1);
+ setprop("controls/switches/wingfault", 0);
+ setprop("controls/deice/wing", 1);
}, 0.5);
settimer(func() {
- setprop("/controls/deice/WingHasBeenTurnedOff", 1);
- setprop("/controls/deice/wing", 0);
+ setprop("controls/deice/WingHasBeenTurnedOff", 1);
+ setprop("controls/deice/wing", 0);
}, 30.5);
settimer(func() {
- setprop("/controls/deice/GroundModeFinished", 1);
+ setprop("controls/deice/GroundModeFinished", 1);
}, 31);
} else if (wingBtn and !wowl and !wowr) { # In the air
- setprop("/controls/switches/wingfault", 1);
+ setprop("controls/switches/wingfault", 1);
settimer(func() {
- setprop("/controls/switches/wingfault", 0);
- setprop("/controls/deice/wing", 1);
+ setprop("controls/switches/wingfault", 0);
+ setprop("controls/deice/wing", 1);
}, 0.5);
} else if (!wingBtn) {
- setprop("/controls/switches/wingfault", 1);
+ setprop("controls/switches/wingfault", 1);
settimer(func() {
- setprop("/controls/switches/wingfault", 0);
- setprop("/controls/deice/wing", 0);
+ setprop("controls/switches/wingfault", 0);
+ setprop("controls/deice/wing", 0);
}, 0.5);
}
});
diff --git a/Nasal/Systems/payload.nas b/Nasal/Systems/payload.nas
index 4e06149b..cd508129 100644
--- a/Nasal/Systems/payload.nas
+++ b/Nasal/Systems/payload.nas
@@ -3,12 +3,12 @@
var fuelSvc = {
_needCenter: 0,
- enable: props.globals.getNode("/services/fuel-truck/enable"),
- connect: props.globals.getNode("/services/fuel-truck/connect"),
- operate: props.globals.getNode("/services/fuel-truck/operate"),
+ enable: props.globals.getNode("services/fuel-truck/enable"),
+ connect: props.globals.getNode("services/fuel-truck/connect"),
+ operate: props.globals.getNode("services/fuel-truck/operate"),
Nodes: {
- requestLbs: props.globals.getNode("/services/fuel-truck/request-lbs"),
- requestTotalLbs: props.globals.getNode("/services/fuel-truck/request-total-lbs"),
+ requestLbs: props.globals.getNode("services/fuel-truck/request-lbs"),
+ requestTotalLbs: props.globals.getNode("services/fuel-truck/request-total-lbs"),
},
newRequest: func() {
diff --git a/Nasal/Systems/pneumatics-old.nas b/Nasal/Systems/pneumatics-old.nas
index 416fb7b4..9a88b772 100644
--- a/Nasal/Systems/pneumatics-old.nas
+++ b/Nasal/Systems/pneumatics-old.nas
@@ -6,37 +6,37 @@
# Main class
var PNEU = {
Fail: {
- apu: props.globals.getNode("/systems/failures/pneumatics/apu-valve");
- bleed1: props.globals.getNode("/systems/failures/pneumatics/bleed-1-valve");
- bleed2: props.globals.getNode("/systems/failures/pneumatics/bleed-2-valve");
- cabinFans: props.globals.getNode("/systems/failures/pneumatics/cabin-fans");
- hotAir: props.globals.getNode("/systems/failures/pneumatics/hot-air");
- pack1: props.globals.getNode("/systems/failures/pneumatics/pack-1-valve");
- pack2: props.globals.getNode("/systems/failures/pneumatics/pack-2-valve");
- ramAir: props.globals.getNode("/systems/failures/pneumatics/ram-air");
- trimValveCockpit: props.globals.getNode("/systems/failures/pneumatics/trim-valve-cockpit");
- trimValveAft: props.globals.getNode("/systems/failures/pneumatics/trim-valve-cabin-aft");
- trimValveFwd: props.globals.getNode("/systems/failures/pneumatics/trim-valve-cabin-fwd");
- xbleed: props.globals.getNode("/systems/failures/pneumatics/x-bleed-valve");
+ apu: props.globals.getNode("systems/failures/pneumatics/apu-valve");
+ bleed1: props.globals.getNode("systems/failures/pneumatics/bleed-1-valve");
+ bleed2: props.globals.getNode("systems/failures/pneumatics/bleed-2-valve");
+ cabinFans: props.globals.getNode("systems/failures/pneumatics/cabin-fans");
+ hotAir: props.globals.getNode("systems/failures/pneumatics/hot-air");
+ pack1: props.globals.getNode("systems/failures/pneumatics/pack-1-valve");
+ pack2: props.globals.getNode("systems/failures/pneumatics/pack-2-valve");
+ ramAir: props.globals.getNode("systems/failures/pneumatics/ram-air");
+ trimValveCockpit: props.globals.getNode("systems/failures/pneumatics/trim-valve-cockpit");
+ trimValveAft: props.globals.getNode("systems/failures/pneumatics/trim-valve-cabin-aft");
+ trimValveFwd: props.globals.getNode("systems/failures/pneumatics/trim-valve-cabin-fwd");
+ xbleed: props.globals.getNode("systems/failures/pneumatics/x-bleed-valve");
}
Psi: {
},
Switch: {
- apu: props.globals.getNode("/controls/pneumatics/switches/apu");
- bleed1: props.globals.getNode("/controls/pneumatics/switches/bleed-1");
- bleed2: props.globals.getNode("/controls/pneumatics/switches/bleed-2");
- blower: props.globals.getNode("/controls/pneumatics/switches/blower");
- cabinFans: props.globals.getNode("/controls/pneumatics/switches/cabin-fans");
- extract: props.globals.getNode("/controls/pneumatics/switches/extract");
- hotAir: props.globals.getNode("/controls/pneumatics/switches/hot-air");
- pack1: props.globals.getNode("/controls/pneumatics/switches/pack-1");
- pack2: props.globals.getNode("/controls/pneumatics/switches/pack-2");
- packFlow: props.globals.getNode("/controls/pneumatics/switches/pack-flow");
- ramAir: props.globals.getNode("/controls/pneumatics/switches/ram-air");
- tempCockpit: props.globals.getNode("/controls/pneumatics/switches/temp-cockpit");
- tempAft: props.globals.getNode("/controls/pneumatics/switches/temp-cabin-aft");
- tempFwd: props.globals.getNode("/controls/pneumatics/switches/temp-cabin-fwd");
- xbleed: props.globals.getNode("/controls/pneumatics/switches/x-bleed");
+ apu: props.globals.getNode("controls/pneumatics/switches/apu");
+ bleed1: props.globals.getNode("controls/pneumatics/switches/bleed-1");
+ bleed2: props.globals.getNode("controls/pneumatics/switches/bleed-2");
+ blower: props.globals.getNode("controls/pneumatics/switches/blower");
+ cabinFans: props.globals.getNode("controls/pneumatics/switches/cabin-fans");
+ extract: props.globals.getNode("controls/pneumatics/switches/extract");
+ hotAir: props.globals.getNode("controls/pneumatics/switches/hot-air");
+ pack1: props.globals.getNode("controls/pneumatics/switches/pack-1");
+ pack2: props.globals.getNode("controls/pneumatics/switches/pack-2");
+ packFlow: props.globals.getNode("controls/pneumatics/switches/pack-flow");
+ ramAir: props.globals.getNode("controls/pneumatics/switches/ram-air");
+ tempCockpit: props.globals.getNode("controls/pneumatics/switches/temp-cockpit");
+ tempAft: props.globals.getNode("controls/pneumatics/switches/temp-cabin-aft");
+ tempFwd: props.globals.getNode("controls/pneumatics/switches/temp-cabin-fwd");
+ xbleed: props.globals.getNode("controls/pneumatics/switches/x-bleed");
},
init: func() {
me.resetFail();
diff --git a/Nasal/Systems/pneumatics.nas b/Nasal/Systems/pneumatics.nas
index 5de2c9f7..86362c83 100644
--- a/Nasal/Systems/pneumatics.nas
+++ b/Nasal/Systems/pneumatics.nas
@@ -74,418 +74,418 @@ var guard = 0;
var PNEU = {
init: func() {
- setprop("/controls/pneumatic/switches/bleed1", 1);
- setprop("/controls/pneumatic/switches/bleed2", 1);
- setprop("/controls/pneumatic/switches/bleedapu", 0);
- setprop("/controls/pneumatic/switches/groundair", 0);
- setprop("/controls/pneumatic/switches/pack1", 1);
- setprop("/controls/pneumatic/switches/pack2", 1);
- setprop("/controls/pneumatic/switches/hot-air", 1);
- setprop("/controls/pneumatic/switches/ram-air", 0);
- setprop("/controls/pneumatic/switches/pack-flo", 9); # LO: 7, NORM: 9, HI: 11.
- setprop("/controls/pneumatic/switches/xbleed", 1); # SHUT: 0, AUTO: 1, OPEN: 2.
- setprop("/systems/pneumatic/bleed1", 0);
- setprop("/systems/pneumatic/bleed2", 0);
- setprop("/systems/pneumatic/bleedapu", 0);
- setprop("/systems/pneumatic/groundair", 0);
- setprop("/systems/pneumatic/total-psi", 0);
- setprop("/systems/pneumatic/start-psi", 0);
- setprop("/systems/pneumatic/pack-psi", 0);
- setprop("/systems/pneumatic/pack1", 0);
- setprop("/systems/pneumatic/pack2", 0);
- setprop("/systems/pneumatic/start-psi", 0);
- setprop("/systems/pneumatic/eng1-starter", 0);
- setprop("/systems/pneumatic/eng2-starter", 0);
- setprop("/systems/pneumatic/bleed1-fault", 0);
- setprop("/systems/pneumatic/bleed2-fault", 0);
- setprop("/systems/pneumatic/bleedapu-fault", 0);
- setprop("/systems/pneumatic/hotair-fault", 0);
- setprop("/systems/pneumatic/pack1-fault", 0);
- setprop("/systems/pneumatic/pack2-fault", 0);
- setprop("/systems/pneumatic/xbleed", 0);
- setprop("/systems/pneumatic/xbleed-state", "closed");
- setprop("/systems/pneumatic/starting", 0);
- setprop("/FMGC/internal/dep-arpt", "");
- altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- setprop("/systems/pressurization/mode", "GN");
- setprop("/systems/pressurization/vs", "0");
- setprop("/systems/pressurization/targetvs", "0");
- setprop("/systems/pressurization/vs-norm", "0");
- setprop("/systems/pressurization/auto", 1);
- setprop("/systems/pressurization/deltap", "0");
- setprop("/systems/pressurization/outflowpos", "0");
- setprop("/systems/pressurization/deltap-norm", "0");
- setprop("/systems/pressurization/outflowpos-norm", "0");
- setprop("/systems/pressurization/outflowpos-man", "0.5");
- setprop("/systems/pressurization/outflowpos-man-sw", "0");
- setprop("/systems/pressurization/outflowpos-norm-cmd", "0");
- setprop("/systems/pressurization/cabinalt", altitude);
- setprop("/systems/pressurization/targetalt", altitude);
- setprop("/systems/pressurization/diff-to-target", "0");
- setprop("/systems/pressurization/ditchingpb", 0);
- setprop("/systems/pressurization/targetvs", "0");
- setprop("/systems/pressurization/ambientpsi", "0");
- setprop("/systems/pressurization/cabinpsi", "0");
- setprop("/systems/pressurization/manvs-cmd", "0");
- setprop("/systems/pressurization/pack-1-out-temp", 0);
- setprop("/systems/pressurization/pack-2-out-temp", 0);
- setprop("/systems/pressurization/pack-1-bypass", 0);
- setprop("/systems/pressurization/pack-2-bypass", 0);
- setprop("/systems/pressurization/pack-1-flow", 0);
- setprop("/systems/pressurization/pack-2-flow", 0);
- setprop("/systems/pressurization/pack-1-comp-out-temp", 0);
- setprop("/systems/pressurization/pack-2-comp-out-temp", 0);
- setprop("/systems/pressurization/pack-1-valve", 0);
- setprop("/systems/pressurization/pack-2-valve", 0);
- setprop("/systems/ventilation/cabin/fans", 0); # aircon fans
- setprop("/systems/ventilation/avionics/fan", 0);
- setprop("/systems/ventilation/avionics/extractvalve", "0");
- setprop("/systems/ventilation/avionics/inletvalve", "0");
- setprop("/systems/ventilation/lavatory/extractfan", 0);
- setprop("/systems/ventilation/lavatory/extractvalve", "0");
- setprop("/controls/deice/eng1-on", 0);
- setprop("/controls/deice/eng2-on", 0);
- setprop("/controls/oxygen/masksDeploy", 0);
- setprop("/controls/oxygen/masksDeployMan", 0);
- setprop("/controls/oxygen/masksReset", 0); # this is the TMR RESET pb on the maintenance panel, needs 3D model
- setprop("/controls/oxygen/masksSys", 0);
- setprop("/systems/pneumatic/hp-valve-1-state", 0);
- setprop("/systems/pneumatic/hp-valve-2-state", 0);
- setprop("/systems/pneumatic/hp-valve-1", 0);
- setprop("/systems/pneumatic/hp-valve-2", 0);
- setprop("/systems/pneumatic/eng-valve-1-state", 0);
- setprop("/systems/pneumatic/eng-valve-2-state", 0);
- setprop("/systems/pneumatic/eng-valve-1", 0);
- setprop("/systems/pneumatic/eng-valve-2", 0);
- setprop("/systems/pneumatic/precooler-1-psi", 0);
- setprop("/systems/pneumatic/precooler-2-psi", 0);
- setprop("/systems/pneumatic/precooler-1-temp", 0);
- setprop("/systems/pneumatic/precooler-2-temp", 0);
- setprop("/systems/pneumatic/precooler-1-ovht", 0);
- setprop("/systems/pneumatic/precooler-2-ovht", 0);
+ setprop("controls/pneumatic/switches/bleed1", 1);
+ setprop("controls/pneumatic/switches/bleed2", 1);
+ setprop("controls/pneumatic/switches/bleedapu", 0);
+ setprop("controls/pneumatic/switches/groundair", 0);
+ setprop("controls/pneumatic/switches/pack1", 1);
+ setprop("controls/pneumatic/switches/pack2", 1);
+ setprop("controls/pneumatic/switches/hot-air", 1);
+ setprop("controls/pneumatic/switches/ram-air", 0);
+ setprop("controls/pneumatic/switches/pack-flo", 9); # LO: 7, NORM: 9, HI: 11.
+ setprop("controls/pneumatic/switches/xbleed", 1); # SHUT: 0, AUTO: 1, OPEN: 2.
+ setprop("systems/pneumatic/bleed1", 0);
+ setprop("systems/pneumatic/bleed2", 0);
+ setprop("systems/pneumatic/bleedapu", 0);
+ setprop("systems/pneumatic/groundair", 0);
+ setprop("systems/pneumatic/total-psi", 0);
+ setprop("systems/pneumatic/start-psi", 0);
+ setprop("systems/pneumatic/pack-psi", 0);
+ setprop("systems/pneumatic/pack1", 0);
+ setprop("systems/pneumatic/pack2", 0);
+ setprop("systems/pneumatic/start-psi", 0);
+ setprop("systems/pneumatic/eng1-starter", 0);
+ setprop("systems/pneumatic/eng2-starter", 0);
+ setprop("systems/pneumatic/bleed1-fault", 0);
+ setprop("systems/pneumatic/bleed2-fault", 0);
+ setprop("systems/pneumatic/bleedapu-fault", 0);
+ setprop("systems/pneumatic/hotair-fault", 0);
+ setprop("systems/pneumatic/pack1-fault", 0);
+ setprop("systems/pneumatic/pack2-fault", 0);
+ setprop("systems/pneumatic/xbleed", 0);
+ setprop("systems/pneumatic/xbleed-state", "closed");
+ setprop("systems/pneumatic/starting", 0);
+ setprop("FMGC/internal/dep-arpt", "");
+ altitude = getprop("instrumentation/altimeter/indicated-altitude-ft");
+ setprop("systems/pressurization/mode", "GN");
+ setprop("systems/pressurization/vs", "0");
+ setprop("systems/pressurization/targetvs", "0");
+ setprop("systems/pressurization/vs-norm", "0");
+ setprop("systems/pressurization/auto", 1);
+ setprop("systems/pressurization/deltap", "0");
+ setprop("systems/pressurization/outflowpos", "0");
+ setprop("systems/pressurization/deltap-norm", "0");
+ setprop("systems/pressurization/outflowpos-norm", "0");
+ setprop("systems/pressurization/outflowpos-man", "0.5");
+ setprop("systems/pressurization/outflowpos-man-sw", "0");
+ setprop("systems/pressurization/outflowpos-norm-cmd", "0");
+ setprop("systems/pressurization/cabinalt", altitude);
+ setprop("systems/pressurization/targetalt", altitude);
+ setprop("systems/pressurization/diff-to-target", "0");
+ setprop("systems/pressurization/ditchingpb", 0);
+ setprop("systems/pressurization/targetvs", "0");
+ setprop("systems/pressurization/ambientpsi", "0");
+ setprop("systems/pressurization/cabinpsi", "0");
+ setprop("systems/pressurization/manvs-cmd", "0");
+ setprop("systems/pressurization/pack-1-out-temp", 0);
+ setprop("systems/pressurization/pack-2-out-temp", 0);
+ setprop("systems/pressurization/pack-1-bypass", 0);
+ setprop("systems/pressurization/pack-2-bypass", 0);
+ setprop("systems/pressurization/pack-1-flow", 0);
+ setprop("systems/pressurization/pack-2-flow", 0);
+ setprop("systems/pressurization/pack-1-comp-out-temp", 0);
+ setprop("systems/pressurization/pack-2-comp-out-temp", 0);
+ setprop("systems/pressurization/pack-1-valve", 0);
+ setprop("systems/pressurization/pack-2-valve", 0);
+ setprop("systems/ventilation/cabin/fans", 0); # aircon fans
+ setprop("systems/ventilation/avionics/fan", 0);
+ setprop("systems/ventilation/avionics/extractvalve", "0");
+ setprop("systems/ventilation/avionics/inletvalve", "0");
+ setprop("systems/ventilation/lavatory/extractfan", 0);
+ setprop("systems/ventilation/lavatory/extractvalve", "0");
+ setprop("controls/deice/eng1-on", 0);
+ setprop("controls/deice/eng2-on", 0);
+ setprop("controls/oxygen/masksDeploy", 0);
+ setprop("controls/oxygen/masksDeployMan", 0);
+ setprop("controls/oxygen/masksReset", 0); # this is the TMR RESET pb on the maintenance panel, needs 3D model
+ setprop("controls/oxygen/masksSys", 0);
+ setprop("systems/pneumatic/hp-valve-1-state", 0);
+ setprop("systems/pneumatic/hp-valve-2-state", 0);
+ setprop("systems/pneumatic/hp-valve-1", 0);
+ setprop("systems/pneumatic/hp-valve-2", 0);
+ setprop("systems/pneumatic/eng-valve-1-state", 0);
+ setprop("systems/pneumatic/eng-valve-2-state", 0);
+ setprop("systems/pneumatic/eng-valve-1", 0);
+ setprop("systems/pneumatic/eng-valve-2", 0);
+ setprop("systems/pneumatic/precooler-1-psi", 0);
+ setprop("systems/pneumatic/precooler-2-psi", 0);
+ setprop("systems/pneumatic/precooler-1-temp", 0);
+ setprop("systems/pneumatic/precooler-2-temp", 0);
+ setprop("systems/pneumatic/precooler-1-ovht", 0);
+ setprop("systems/pneumatic/precooler-2-ovht", 0);
},
loop: func() {
- bleed1_sw = getprop("/controls/pneumatic/switches/bleed1");
- bleed2_sw = getprop("/controls/pneumatic/switches/bleed2");
- bleedapu_sw = getprop("/controls/pneumatic/switches/bleedapu");
- pack1_sw = getprop("/controls/pneumatic/switches/pack1");
- pack2_sw = getprop("/controls/pneumatic/switches/pack2");
- hot_air_sw = getprop("/controls/pneumatic/switches/hot-air");
- ram_air_sw = getprop("/controls/pneumatic/switches/ram-air");
- pack_flo_sw = getprop("/controls/pneumatic/switches/pack-flo");
- xbleed_sw = getprop("/controls/pneumatic/switches/xbleed");
- eng1_starter = getprop("/systems/pneumatic/eng1-starter");
- eng2_starter = getprop("/systems/pneumatic/eng2-starter");
- groundair = getprop("/systems/pneumatic/groundair");
- groundair_supp = getprop("/controls/pneumatic/switches/groundair");
- rpmapu = getprop("/systems/apu/rpm");
- stateL = getprop("/engines/engine[0]/state");
- stateR = getprop("/engines/engine[1]/state");
- bleedapu_fail = getprop("/systems/failures/bleed-apu");
- bleedext_fail = getprop("/systems/failures/bleed-ext");
- bleedeng1_fail = getprop("/systems/failures/bleed-eng1");
- bleedeng2_fail = getprop("/systems/failures/bleed-eng2");
- pack1_fail = getprop("/systems/failures/pack1");
- pack2_fail = getprop("/systems/failures/pack2");
- engantiice1 = getprop("/controls/deice/eng1-on");
- engantiice2 = getprop("/controls/deice/eng2-on");
- wowc = getprop("/gear/gear[0]/wow");
- wowl = getprop("/gear/gear[1]/wow");
- wowr = getprop("/gear/gear[2]/wow");
+ bleed1_sw = getprop("controls/pneumatic/switches/bleed1");
+ bleed2_sw = getprop("controls/pneumatic/switches/bleed2");
+ bleedapu_sw = getprop("controls/pneumatic/switches/bleedapu");
+ pack1_sw = getprop("controls/pneumatic/switches/pack1");
+ pack2_sw = getprop("controls/pneumatic/switches/pack2");
+ hot_air_sw = getprop("controls/pneumatic/switches/hot-air");
+ ram_air_sw = getprop("controls/pneumatic/switches/ram-air");
+ pack_flo_sw = getprop("controls/pneumatic/switches/pack-flo");
+ xbleed_sw = getprop("controls/pneumatic/switches/xbleed");
+ eng1_starter = getprop("systems/pneumatic/eng1-starter");
+ eng2_starter = getprop("systems/pneumatic/eng2-starter");
+ groundair = getprop("systems/pneumatic/groundair");
+ groundair_supp = getprop("controls/pneumatic/switches/groundair");
+ rpmapu = getprop("systems/apu/rpm");
+ stateL = getprop("engines/engine[0]/state");
+ stateR = getprop("engines/engine[1]/state");
+ bleedapu_fail = getprop("systems/failures/bleed-apu");
+ bleedext_fail = getprop("systems/failures/bleed-ext");
+ bleedeng1_fail = getprop("systems/failures/bleed-eng1");
+ bleedeng2_fail = getprop("systems/failures/bleed-eng2");
+ pack1_fail = getprop("systems/failures/pack1");
+ pack2_fail = getprop("systems/failures/pack2");
+ engantiice1 = getprop("controls/deice/eng1-on");
+ engantiice2 = getprop("controls/deice/eng2-on");
+ wowc = getprop("gear/gear[0]/wow");
+ wowl = getprop("gear/gear[1]/wow");
+ wowr = getprop("gear/gear[2]/wow");
# Air Sources/PSI
if (rpmapu >= 94.9 and bleedapu_sw and !bleedapu_fail) {
- setprop("/systems/pneumatic/bleedapu", 34);
- if (getprop("/controls/APU/master") == 1) {
- setprop("/systems/apu/bleed-used", 1);
+ setprop("systems/pneumatic/bleedapu", 34);
+ if (getprop("controls/APU/master") == 1) {
+ setprop("systems/apu/bleed-used", 1);
}
} else {
- setprop("/systems/pneumatic/bleedapu", 0);
+ setprop("systems/pneumatic/bleedapu", 0);
}
if (groundair_supp and !bleedext_fail) {
- setprop("/systems/pneumatic/groundair", 39);
+ setprop("systems/pneumatic/groundair", 39);
} else {
- setprop("/systems/pneumatic/groundair", 0);
+ setprop("systems/pneumatic/groundair", 0);
}
- ground = getprop("/systems/pneumatic/groundair");
- bleedapu = getprop("/systems/pneumatic/bleedapu");
+ ground = getprop("systems/pneumatic/groundair");
+ bleedapu = getprop("systems/pneumatic/bleedapu");
if (xbleed_sw == 0) {
- setprop("/systems/pneumatic/xbleed", 0);
+ setprop("systems/pneumatic/xbleed", 0);
} else if (xbleed_sw == 1) {
if (bleedapu >= 11) {
- setprop("/systems/pneumatic/xbleed", 1);
+ setprop("systems/pneumatic/xbleed", 1);
} else {
- setprop("/systems/pneumatic/xbleed", 0);
+ setprop("systems/pneumatic/xbleed", 0);
}
} else if (xbleed_sw == 2) {
- setprop("/systems/pneumatic/xbleed", 1);
+ setprop("systems/pneumatic/xbleed", 1);
}
- xbleed = getprop("/systems/pneumatic/xbleed", 0);
+ xbleed = getprop("systems/pneumatic/xbleed", 0);
if (stateL == 3 and bleed1_sw and !bleedeng1_fail) {
- setprop("/systems/pneumatic/bleed1", 31);
+ setprop("systems/pneumatic/bleed1", 31);
} else {
- setprop("/systems/pneumatic/bleed1", 0);
+ setprop("systems/pneumatic/bleed1", 0);
}
if (stateR == 3 and bleed2_sw and !bleedeng2_fail) {
- setprop("/systems/pneumatic/bleed2", 32);
+ setprop("systems/pneumatic/bleed2", 32);
} else {
- setprop("/systems/pneumatic/bleed2", 0);
+ setprop("systems/pneumatic/bleed2", 0);
}
- bleed1 = getprop("/systems/pneumatic/bleed1");
- bleed2 = getprop("/systems/pneumatic/bleed2");
+ bleed1 = getprop("systems/pneumatic/bleed1");
+ bleed2 = getprop("systems/pneumatic/bleed2");
if (bleed1 >= 11 and (stateR != 3 or !bleed2_sw or bleedeng2_fail) and xbleed == 1) {
- setprop("/systems/pneumatic/bleed2", 31);
+ setprop("systems/pneumatic/bleed2", 31);
}
if (bleed2 >= 11 and (stateL != 3 or !bleed1_sw or bleedeng1_fail) and xbleed == 1) {
- setprop("/systems/pneumatic/bleed1", 32);
+ setprop("systems/pneumatic/bleed1", 32);
}
- bleed1 = getprop("/systems/pneumatic/bleed1");
- bleed2 = getprop("/systems/pneumatic/bleed2");
+ bleed1 = getprop("systems/pneumatic/bleed1");
+ bleed2 = getprop("systems/pneumatic/bleed2");
if (stateL == 1 or stateR == 1 or stateL == 2 or stateR == 2) {
- setprop("/systems/pneumatic/start-psi", 18);
+ setprop("systems/pneumatic/start-psi", 18);
} else {
- setprop("/systems/pneumatic/start-psi", 0);
+ setprop("systems/pneumatic/start-psi", 0);
}
- if (getprop("/controls/engines/engine-start-switch") == 2 and wowc == 1 and (stateL != 3 or stateR != 3)) {
- setprop("/systems/pneumatic/starting", 1);
+ if (getprop("controls/engines/engine-start-switch") == 2 and wowc == 1 and (stateL != 3 or stateR != 3)) {
+ setprop("systems/pneumatic/starting", 1);
} else if (wowc == 1 and eng1_starter == 1 or eng2_starter == 1) {
- setprop("/systems/pneumatic/starting", 1);
+ setprop("systems/pneumatic/starting", 1);
} else {
- setprop("/systems/pneumatic/starting", 0);
+ setprop("systems/pneumatic/starting", 0);
}
- starting = getprop("/systems/pneumatic/starting");
+ starting = getprop("systems/pneumatic/starting");
if (pack1_sw == 1 and (bleed1 >= 11 or bleedapu >= 11 or ground >= 11) and starting == 0 and !pack1_fail) {
- setprop("/systems/pneumatic/pack1", pack_flo_sw);
+ setprop("systems/pneumatic/pack1", pack_flo_sw);
} else {
- setprop("/systems/pneumatic/pack1", 0);
+ setprop("systems/pneumatic/pack1", 0);
}
if (pack2_sw == 1 and (bleed2 >= 11 or (bleedapu >= 11 and xbleed == 1)) and starting == 0 and !pack2_fail) {
- setprop("/systems/pneumatic/pack2", pack_flo_sw);
+ setprop("systems/pneumatic/pack2", pack_flo_sw);
} else {
- setprop("/systems/pneumatic/pack2", 0);
+ setprop("systems/pneumatic/pack2", 0);
}
- pack1 = getprop("/systems/pneumatic/pack1");
- pack2 = getprop("/systems/pneumatic/pack2");
+ pack1 = getprop("systems/pneumatic/pack1");
+ pack2 = getprop("systems/pneumatic/pack2");
if (pack1_sw == 1 and pack2_sw == 1) {
- setprop("/systems/pneumatic/pack-psi", pack1 + pack2);
+ setprop("systems/pneumatic/pack-psi", pack1 + pack2);
} else if (pack1_sw == 0 and pack2_sw == 0) {
- setprop("/systems/pneumatic/pack-psi", 0);
+ setprop("systems/pneumatic/pack-psi", 0);
} else {
- setprop("/systems/pneumatic/pack-psi", pack1 + pack2 + 5);
+ setprop("systems/pneumatic/pack-psi", pack1 + pack2 + 5);
}
- pack_psi = getprop("/systems/pneumatic/pack-psi");
- start_psi = getprop("/systems/pneumatic/start-psi");
+ pack_psi = getprop("systems/pneumatic/pack-psi");
+ start_psi = getprop("systems/pneumatic/start-psi");
if ((bleed1 + bleed2 + bleedapu) > 42) {
- setprop("/systems/pneumatic/total-psi", 42);
+ setprop("systems/pneumatic/total-psi", 42);
} else {
total_psi_calc = ((bleed1 + bleed2 + bleedapu + ground) - start_psi - pack_psi);
- setprop("/systems/pneumatic/total-psi", total_psi_calc);
+ setprop("systems/pneumatic/total-psi", total_psi_calc);
}
if (engantiice1 and bleed1 > 20) { # shut down anti-ice if bleed is lost else turn it on
- setprop("/controls/deice/lengine", 0);
- setprop("/controls/deice/eng1-on", 0);
+ setprop("controls/deice/lengine", 0);
+ setprop("controls/deice/eng1-on", 0);
}
if (engantiice1) { # else turn it on
- setprop("/controls/deice/lengine", 1);
+ setprop("controls/deice/lengine", 1);
}
if (engantiice2 and bleed2 > 20) {
- setprop("/controls/deice/rengine", 0);
- setprop("/controls/deice/eng2-on", 0);
+ setprop("controls/deice/rengine", 0);
+ setprop("controls/deice/eng2-on", 0);
}
if (engantiice2) {
- setprop("/controls/deice/rengine", 1);
+ setprop("controls/deice/rengine", 1);
}
- total_psi = getprop("/systems/pneumatic/total-psi");
- phase = getprop("/FMGC/status/phase");
- pressmode = getprop("/systems/pressurization/mode");
- state1 = getprop("/systems/thrust/state1");
- state2 = getprop("/systems/thrust/state2");
- deltap = getprop("/systems/pressurization/deltap");
- outflow = getprop("/systems/pressurization/outflowpos");
- speed = getprop("/velocities/groundspeed-kt");
- altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
+ total_psi = getprop("systems/pneumatic/total-psi");
+ phase = getprop("FMGC/status/phase");
+ pressmode = getprop("systems/pressurization/mode");
+ state1 = getprop("systems/thrust/state1");
+ state2 = getprop("systems/thrust/state2");
+ deltap = getprop("systems/pressurization/deltap");
+ outflow = getprop("systems/pressurization/outflowpos");
+ speed = getprop("velocities/groundspeed-kt");
+ altitude = getprop("instrumentation/altimeter/indicated-altitude-ft");
airport_arr_elev_ft = getprop("autopilot/route-manager/destination/field-elevation-ft");
- vs = getprop("/systems/pressurization/vs-norm");
- manvs = getprop("/systems/pressurization/manvs-cmd");
- ditch = getprop("/systems/pressurization/ditchingpb");
- outflowpos = getprop("/systems/pressurization/outflowpos");
- cabinalt = getprop("/systems/pressurization/cabinalt");
- targetalt = getprop("/systems/pressurization/targetalt");
- targetvs = getprop("/systems/pressurization/targetvs");
- ambient = getprop("/systems/pressurization/ambientpsi");
- cabinpsi = getprop("/systems/pressurization/cabinpsi");
- pause = getprop("/sim/freeze/master");
- auto = getprop("/systems/pressurization/auto");
+ vs = getprop("systems/pressurization/vs-norm");
+ manvs = getprop("systems/pressurization/manvs-cmd");
+ ditch = getprop("systems/pressurization/ditchingpb");
+ outflowpos = getprop("systems/pressurization/outflowpos");
+ cabinalt = getprop("systems/pressurization/cabinalt");
+ targetalt = getprop("systems/pressurization/targetalt");
+ targetvs = getprop("systems/pressurization/targetvs");
+ ambient = getprop("systems/pressurization/ambientpsi");
+ cabinpsi = getprop("systems/pressurization/cabinpsi");
+ pause = getprop("sim/freeze/master");
+ auto = getprop("systems/pressurization/auto");
- setprop("/systems/pressurization/diff-to-target", targetalt - cabinalt);
- setprop("/systems/pressurization/deltap", cabinpsi - ambient);
+ setprop("systems/pressurization/diff-to-target", targetalt - cabinalt);
+ setprop("systems/pressurization/deltap", cabinpsi - ambient);
if ((pressmode == "GN") and (pressmode != "CL") and (wowl and wowr) and ((state1 == "MCT") or (state1 == "TOGA")) and ((state2 == "MCT") or (state2 == "TOGA"))) {
- setprop("/systems/pressurization/mode", "TO");
+ setprop("systems/pressurization/mode", "TO");
} else if (((!wowl) or (!wowr)) and (speed > 100) and (pressmode == "TO")) {
- setprop("/systems/pressurization/mode", "CL");
+ setprop("systems/pressurization/mode", "CL");
}
if (vs != targetvs and !wowl and !wowr) {
- setprop("/systems/pressurization/vs", targetvs);
+ setprop("systems/pressurization/vs", targetvs);
}
if (cabinalt != targetalt and !wowl and !wowr and !pause and auto) {
- setprop("/systems/pressurization/cabinalt", cabinalt + ((vs / 60) / 10));
+ setprop("systems/pressurization/cabinalt", cabinalt + ((vs / 60) / 10));
} else if (!auto and !pause) {
- setprop("/systems/pressurization/cabinalt", cabinalt + ((manvs / 60) / 10));
+ setprop("systems/pressurization/cabinalt", cabinalt + ((manvs / 60) / 10));
}
if (ditch and auto) {
- setprop("/systems/pressurization/outflowpos", "1");
- setprop("/systems/ventilation/avionics/extractvalve", "1");
- setprop("/systems/ventilation/avionics/inletvalve", "1");
+ setprop("systems/pressurization/outflowpos", "1");
+ setprop("systems/ventilation/avionics/extractvalve", "1");
+ setprop("systems/ventilation/avionics/inletvalve", "1");
}
- dcess = getprop("/systems/electrical/bus/dc-ess");
- acess = getprop("/systems/electrical/bus/ac-ess");
- fanon = getprop("/systems/ventilation/avionics/fan");
+ dcess = getprop("systems/electrical/bus/dc-ess");
+ acess = getprop("systems/electrical/bus/ac-ess");
+ fanon = getprop("systems/ventilation/avionics/fan");
if (dcess > 25 or acess > 110) {
- setprop("/systems/ventilation/avionics/fan", 1);
- setprop("/systems/ventilation/lavatory/extractfan", 1);
+ setprop("systems/ventilation/avionics/fan", 1);
+ setprop("systems/ventilation/lavatory/extractfan", 1);
} else if (dcess == 0 and acess == 0) {
- setprop("/systems/ventilation/avionics/fan", 0);
- setprop("/systems/ventilation/lavatory/extractfan", 0);
+ setprop("systems/ventilation/avionics/fan", 0);
+ setprop("systems/ventilation/lavatory/extractfan", 0);
}
# Fault lights
if (bleedeng1_fail and bleed1_sw) {
- setprop("/systems/pneumatic/bleed1-fault", 1);
+ setprop("systems/pneumatic/bleed1-fault", 1);
} else {
- setprop("/systems/pneumatic/bleed1-fault", 0);
+ setprop("systems/pneumatic/bleed1-fault", 0);
}
if (bleedeng2_fail and bleed2_sw) {
- setprop("/systems/pneumatic/bleed2-fault", 1);
+ setprop("systems/pneumatic/bleed2-fault", 1);
} else {
- setprop("/systems/pneumatic/bleed2-fault", 0);
+ setprop("systems/pneumatic/bleed2-fault", 0);
}
if (bleedapu_fail and bleedapu_sw) {
- setprop("/systems/pneumatic/bleedapu-fault", 1);
+ setprop("systems/pneumatic/bleedapu-fault", 1);
} else {
- setprop("/systems/pneumatic/bleedapu-fault", 0);
+ setprop("systems/pneumatic/bleedapu-fault", 0);
}
if ((pack1_fail and pack1_sw) or (pack1_sw and pack1 <= 5)) {
- setprop("/systems/pneumatic/pack1-fault", 1);
+ setprop("systems/pneumatic/pack1-fault", 1);
} else {
- setprop("/systems/pneumatic/pack1-fault", 0);
+ setprop("systems/pneumatic/pack1-fault", 0);
}
if ((pack2_fail and pack2_sw) or (pack2_sw and pack2 <= 5)) {
- setprop("/systems/pneumatic/pack2-fault", 1);
+ setprop("systems/pneumatic/pack2-fault", 1);
} else {
- setprop("/systems/pneumatic/pack2-fault", 0);
+ setprop("systems/pneumatic/pack2-fault", 0);
}
# Oxygen
if (cabinalt > 13500) {
- setprop("/controls/oxygen/masksDeploy", 1);
- setprop("/controls/oxygen/masksSys", 1);
+ setprop("controls/oxygen/masksDeploy", 1);
+ setprop("controls/oxygen/masksSys", 1);
}
},
};
setlistener("/controls/pneumatic/switches/pack1", func {
- pack1_sw = getprop("/controls/pneumatic/switches/pack1");
+ pack1_sw = getprop("controls/pneumatic/switches/pack1");
if (pack1_sw) {
- setprop("/systems/pneumatic/pack1-fault", 1);
+ setprop("systems/pneumatic/pack1-fault", 1);
}
});
setlistener("/controls/pneumatic/switches/pack2", func {
- pack2_sw = getprop("/controls/pneumatic/switches/pack2");
+ pack2_sw = getprop("controls/pneumatic/switches/pack2");
if (pack2_sw) {
- setprop("/systems/pneumatic/pack2-fault", 1);
+ setprop("systems/pneumatic/pack2-fault", 1);
}
});
setlistener("/controls/deice/eng1-on", func {
- eng1on = getprop("/controls/deice/eng1-on");
+ eng1on = getprop("controls/deice/eng1-on");
if (eng1on) {
flashfault1();
}
});
setlistener("/controls/deice/eng2-on", func {
- eng2on = getprop("/controls/deice/eng2-on");
+ eng2on = getprop("controls/deice/eng2-on");
if (eng2on) {
flashfault2();
}
});
var flashfault1 = func {
- setprop("/controls/deice/eng1-fault", 1);
+ setprop("controls/deice/eng1-fault", 1);
settimer(func {
- setprop("/controls/deice/eng1-fault", 0);
+ setprop("controls/deice/eng1-fault", 0);
}, 0.5);
}
var flashfault2 = func {
- setprop("/controls/deice/eng2-fault", 1);
+ setprop("controls/deice/eng2-fault", 1);
settimer(func {
- setprop("/controls/deice/eng2-fault", 0);
+ setprop("controls/deice/eng2-fault", 0);
}, 0.5);
}
# Oxygen (Cabin)
setlistener("/controls/oxygen/masksDeployMan", func {
- guard = getprop("/controls/oxygen/masksGuard");
- masks = getprop("/controls/oxygen/masksDeployMan");
+ guard = getprop("controls/oxygen/masksGuard");
+ masks = getprop("controls/oxygen/masksDeployMan");
if (guard and masks) {
- setprop("/controls/oxygen/masksDeployMan", 0);
+ setprop("controls/oxygen/masksDeployMan", 0);
} else if (!guard and masks) {
- setprop("/controls/oxygen/masksDeployMan", 1);
- setprop("/controls/oxygen/masksDeploy", 1);
- setprop("/controls/oxygen/masksSys", 1);
+ setprop("controls/oxygen/masksDeployMan", 1);
+ setprop("controls/oxygen/masksDeploy", 1);
+ setprop("controls/oxygen/masksSys", 1);
}
});
setlistener("/controls/oxygen/masksDeployMan", func {
- masks = getprop("/controls/oxygen/masksDeployMan");
- autoMasks = getprop("/controls/oxygen/masksDeploy");
+ masks = getprop("controls/oxygen/masksDeployMan");
+ autoMasks = getprop("controls/oxygen/masksDeploy");
if (!masks) {
- setprop("/controls/oxygen/masksDeployMan", 1);
+ setprop("controls/oxygen/masksDeployMan", 1);
}
});
setlistener("/controls/oxygen/masksDeploy", func {
- masks = getprop("/controls/oxygen/masksDeployMan");
- autoMasks = getprop("/controls/oxygen/masksDeploy");
+ masks = getprop("controls/oxygen/masksDeployMan");
+ autoMasks = getprop("controls/oxygen/masksDeploy");
if (!autoMasks) {
- setprop("/controls/oxygen/masksDeploy", 1);
+ setprop("controls/oxygen/masksDeploy", 1);
}
});
\ No newline at end of file
diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml
index f7bfe05e..d05399f2 100644
--- a/Sounds/A320-common-sound.xml
+++ b/Sounds/A320-common-sound.xml
@@ -1598,6 +1598,22 @@
10
100
+
+
+ Cricket
+ Aircraft/A320-family/Sounds/Cockpit/c-chord.wav
+ once
+ avionics
+
+ /sim/sound/warnings/cchord
+
+
+ /sim/current-view/internal
+ 0.2
+
+ 10
+ 100
+
stall-voice
diff --git a/Systems/instrumentation.xml b/Systems/instrumentation.xml
index 0f0edc75..802a4b12 100644
--- a/Systems/instrumentation.xml
+++ b/Systems/instrumentation.xml
@@ -159,11 +159,6 @@
0.1
-
- marker-beacon
- 0
-
-
heading-indicator
0
@@ -187,6 +182,11 @@
109.9
+
+ marker-beacon
+ 0
+
+
nav
0
diff --git a/gui/dialogs/refuel.nas b/gui/dialogs/refuel.nas
index 33501513..6d82dcc2 100644
--- a/gui/dialogs/refuel.nas
+++ b/gui/dialogs/refuel.nas
@@ -17,17 +17,17 @@ if (pts.Sim.aero.getValue() == "A320-200-CFM") {
}
# Get nodes
-var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1);
-var valve_l_guard = props.globals.getNode("/controls/fuel/refuel/valve-l-guard", 1);
-var valve_c_guard = props.globals.getNode("/controls/fuel/refuel/valve-c-guard", 1);
-var valve_r_guard = props.globals.getNode("/controls/fuel/refuel/valve-r-guard", 1);
-var mode_guard = props.globals.getNode("/controls/fuel/refuel/mode-guard", 1);
-var valve_l = props.globals.getNode("/controls/fuel/refuel/valve-l", 1);
-var valve_c = props.globals.getNode("/controls/fuel/refuel/valve-c", 1);
-var valve_r = props.globals.getNode("/controls/fuel/refuel/valve-r", 1);
-var power = props.globals.getNode("/controls/fuel/refuel/power", 1);
-var test = props.globals.getNode("/controls/fuel/refuel/test", 1);
-var amount = props.globals.getNode("/controls/fuel/refuel/amount", 1);
+var acconfig_weight_kgs = props.globals.getNode("systems/acconfig/options/weight-kgs", 1);
+var valve_l_guard = props.globals.getNode("controls/fuel/refuel/valve-l-guard", 1);
+var valve_c_guard = props.globals.getNode("controls/fuel/refuel/valve-c-guard", 1);
+var valve_r_guard = props.globals.getNode("controls/fuel/refuel/valve-r-guard", 1);
+var mode_guard = props.globals.getNode("controls/fuel/refuel/mode-guard", 1);
+var valve_l = props.globals.getNode("controls/fuel/refuel/valve-l", 1);
+var valve_c = props.globals.getNode("controls/fuel/refuel/valve-c", 1);
+var valve_r = props.globals.getNode("controls/fuel/refuel/valve-r", 1);
+var power = props.globals.getNode("controls/fuel/refuel/power", 1);
+var test = props.globals.getNode("controls/fuel/refuel/test", 1);
+var amount = props.globals.getNode("controls/fuel/refuel/amount", 1);
var refuelClass = {
_fuelLeftAmount: nil,
diff --git a/gui/dialogs/rmp.nas b/gui/dialogs/rmp.nas
index 72f3c7a2..455c430b 100644
--- a/gui/dialogs/rmp.nas
+++ b/gui/dialogs/rmp.nas
@@ -34,8 +34,8 @@ var rmpClass = {
m._prop_vhf2_stby = props.globals.getNode("systems/radio/rmp[" ~ (instance - 1) ~ "]/vhf2-standby");
m._prop_vhf3_stby = props.globals.getNode("systems/radio/rmp[" ~ (instance - 1) ~ "]/vhf3-standby");
- m._prop_display_active = props.globals.getNode("/controls/radio/rmp[" ~ (instance - 1) ~ "]/active-display");
- m._prop_display_standby = props.globals.getNode("/controls/radio/rmp[" ~ (instance - 1) ~ "]/standby-display");
+ m._prop_display_active = props.globals.getNode("controls/radio/rmp[" ~ (instance - 1) ~ "]/active-display");
+ m._prop_display_standby = props.globals.getNode("controls/radio/rmp[" ~ (instance - 1) ~ "]/standby-display");
# Power source depending on RMP number
if (instance == 1) {