A3XX: Fix DU Test not skipped properly in AutoConfig

This commit is contained in:
Joshua Davidson 2017-11-29 11:14:13 -05:00
parent ff8451c20a
commit 6385473d1c
6 changed files with 25 additions and 18 deletions

View file

@ -169,15 +169,6 @@ var systemsReset = func {
libraries.variousReset(); libraries.variousReset();
} }
var skipDUTest = func {
setprop("/instrumentation/du/du1-test-time", getprop("/instrumentation/du/du1-test-time") - 35);
setprop("/instrumentation/du/du2-test-time", getprop("/instrumentation/du/du2-test-time") - 35);
setprop("/instrumentation/du/du3-test-time", getprop("/instrumentation/du/du3-test-time") - 35);
setprop("/instrumentation/du/du4-test-time", getprop("/instrumentation/du/du4-test-time") - 35);
setprop("/instrumentation/du/du5-test-time", getprop("/instrumentation/du/du5-test-time") - 35);
setprop("/instrumentation/du/du6-test-time", getprop("/instrumentation/du/du6-test-time") - 35);
}
################ ################
# Panel States # # Panel States #
################ ################
@ -296,7 +287,6 @@ var beforestart_b = func {
setprop("/controls/adirs/mcducbtn", 1); setprop("/controls/adirs/mcducbtn", 1);
setprop("/controls/lighting/beacon", 1); setprop("/controls/lighting/beacon", 1);
setprop("/controls/lighting/nav-lights-switch", 1); setprop("/controls/lighting/nav-lights-switch", 1);
skipDUTest();
setprop("/controls/gear/brake-left", 0); setprop("/controls/gear/brake-left", 0);
setprop("/controls/gear/brake-right", 0); setprop("/controls/gear/brake-right", 0);
setprop("/systems/acconfig/autoconfig-running", 0); setprop("/systems/acconfig/autoconfig-running", 0);
@ -370,7 +360,6 @@ var taxi_b = func {
setprop("/controls/adirs/mcducbtn", 1); setprop("/controls/adirs/mcducbtn", 1);
setprop("/controls/lighting/beacon", 1); setprop("/controls/lighting/beacon", 1);
setprop("/controls/lighting/nav-lights-switch", 1); setprop("/controls/lighting/nav-lights-switch", 1);
skipDUTest();
settimer(taxi_c, 2); settimer(taxi_c, 2);
} }
var taxi_c = func { var taxi_c = func {

View file

@ -89,9 +89,12 @@ var canvas_lowerECAM_base = {
update: func() { update: func() {
elapsedtime = getprop("/sim/time/elapsed-sec"); elapsedtime = getprop("/sim/time/elapsed-sec");
if (getprop("/systems/electrical/bus/ac1") >= 110 and getprop("/systems/electrical/bus/ac2") >= 110) { if (getprop("/systems/electrical/bus/ac1") >= 110 and getprop("/systems/electrical/bus/ac2") >= 110) {
if (getprop("/instrumentation/du/du4-test") != 1) { if (getprop("/systems/acconfig/autoconfig-running") != 1 and getprop("/instrumentation/du/du4-test") != 1) {
setprop("/instrumentation/du/du4-test", 1); setprop("/instrumentation/du/du4-test", 1);
setprop("/instrumentation/du/du4-test-time", getprop("/sim/time/elapsed-sec")); setprop("/instrumentation/du/du4-test-time", getprop("/sim/time/elapsed-sec"));
} else if (getprop("/systems/acconfig/autoconfig-running") == 1 and getprop("/instrumentation/du/du4-test") != 1) {
setprop("/instrumentation/du/du4-test", 1);
setprop("/instrumentation/du/du4-test-time", getprop("/sim/time/elapsed-sec") - 35);
} }
} else if (getprop("/systems/electrical/ac1-src") == "XX" or getprop("/systems/electrical/ac2-src") == "XX") { } else if (getprop("/systems/electrical/ac1-src") == "XX" or getprop("/systems/electrical/ac2-src") == "XX") {
setprop("/instrumentation/du/du4-test", 0); setprop("/instrumentation/du/du4-test", 0);

View file

@ -77,13 +77,19 @@ var canvas_nd_base = {
update: func() { update: func() {
elapsedtime = getprop("/sim/time/elapsed-sec"); elapsedtime = getprop("/sim/time/elapsed-sec");
if (getprop("/systems/electrical/bus/ac1") >= 110 and getprop("/systems/electrical/bus/ac2") >= 110) { if (getprop("/systems/electrical/bus/ac1") >= 110 and getprop("/systems/electrical/bus/ac2") >= 110) {
if (getprop("/instrumentation/du/du2-test") != 1) { if (getprop("/systems/acconfig/autoconfig-running") != 1 and getprop("/instrumentation/du/du2-test") != 1) {
setprop("/instrumentation/du/du2-test", 1); setprop("/instrumentation/du/du2-test", 1);
setprop("/instrumentation/du/du2-test-time", getprop("/sim/time/elapsed-sec")); setprop("/instrumentation/du/du2-test-time", getprop("/sim/time/elapsed-sec"));
} else if (getprop("/systems/acconfig/autoconfig-running") == 1 and getprop("/instrumentation/du/du2-test") != 1) {
setprop("/instrumentation/du/du2-test", 1);
setprop("/instrumentation/du/du2-test-time", getprop("/sim/time/elapsed-sec") - 35);
} }
if (getprop("/instrumentation/du/du5-test") != 1) { if (getprop("/systems/acconfig/autoconfig-running") != 1 and getprop("/instrumentation/du/du5-test") != 1) {
setprop("/instrumentation/du/du5-test", 1); setprop("/instrumentation/du/du5-test", 1);
setprop("/instrumentation/du/du5-test-time", getprop("/sim/time/elapsed-sec")); setprop("/instrumentation/du/du5-test-time", getprop("/sim/time/elapsed-sec"));
} else if (getprop("/systems/acconfig/autoconfig-running") == 1 and getprop("/instrumentation/du/du5-test") != 1) {
setprop("/instrumentation/du/du5-test", 1);
setprop("/instrumentation/du/du5-test-time", getprop("/sim/time/elapsed-sec") - 35);
} }
} else { } else {
setprop("/instrumentation/du/du2-test", 0); setprop("/instrumentation/du/du2-test", 0);

View file

@ -131,17 +131,23 @@ var canvas_PFD_base = {
update: func() { update: func() {
elapsedtime = getprop("/sim/time/elapsed-sec"); elapsedtime = getprop("/sim/time/elapsed-sec");
if (getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/ac2") >= 110) { if (getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/ac2") >= 110) {
if (getprop("/instrumentation/du/du1-test") != 1) { if (getprop("/systems/acconfig/autoconfig-running") != 1 and getprop("/instrumentation/du/du1-test") != 1) {
setprop("/instrumentation/du/du1-test", 1); setprop("/instrumentation/du/du1-test", 1);
setprop("/instrumentation/du/du1-test-time", getprop("/sim/time/elapsed-sec")); setprop("/instrumentation/du/du1-test-time", getprop("/sim/time/elapsed-sec"));
} else if (getprop("/systems/acconfig/autoconfig-running") == 1 and getprop("/instrumentation/du/du1-test") != 1) {
setprop("/instrumentation/du/du1-test", 1);
setprop("/instrumentation/du/du1-test-time", getprop("/sim/time/elapsed-sec") - 35);
} }
} else { } else {
setprop("/instrumentation/du/du1-test", 0); setprop("/instrumentation/du/du1-test", 0);
} }
if (getprop("/systems/electrical/bus/ac1") >= 110 and getprop("/systems/electrical/bus/ac2") >= 110) { if (getprop("/systems/electrical/bus/ac1") >= 110 and getprop("/systems/electrical/bus/ac2") >= 110) {
if (getprop("/instrumentation/du/du6-test") != 1) { if (getprop("/systems/acconfig/autoconfig-running") != 1 and getprop("/instrumentation/du/du6-test") != 1) {
setprop("/instrumentation/du/du6-test", 1); setprop("/instrumentation/du/du6-test", 1);
setprop("/instrumentation/du/du6-test-time", getprop("/sim/time/elapsed-sec")); setprop("/instrumentation/du/du6-test-time", getprop("/sim/time/elapsed-sec"));
} else if (getprop("/systems/acconfig/autoconfig-running") == 1 and getprop("/instrumentation/du/du6-test") != 1) {
setprop("/instrumentation/du/du6-test", 1);
setprop("/instrumentation/du/du6-test-time", getprop("/sim/time/elapsed-sec") - 35);
} }
} else { } else {
setprop("/instrumentation/du/du6-test", 0); setprop("/instrumentation/du/du6-test", 0);

View file

@ -50,9 +50,12 @@ var canvas_upperECAM_base = {
update: func() { update: func() {
elapsedtime = getprop("/sim/time/elapsed-sec"); elapsedtime = getprop("/sim/time/elapsed-sec");
if (getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/ac2") >= 110) { if (getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/ac2") >= 110) {
if (getprop("/instrumentation/du/du3-test") != 1) { if (getprop("/systems/acconfig/autoconfig-running") != 1 and getprop("/instrumentation/du/du3-test") != 1) {
setprop("/instrumentation/du/du3-test", 1); setprop("/instrumentation/du/du3-test", 1);
setprop("/instrumentation/du/du3-test-time", getprop("/sim/time/elapsed-sec")); setprop("/instrumentation/du/du3-test-time", getprop("/sim/time/elapsed-sec"));
} else if (getprop("/systems/acconfig/autoconfig-running") == 1 and getprop("/instrumentation/du/du3-test") != 1) {
setprop("/instrumentation/du/du3-test", 1);
setprop("/instrumentation/du/du3-test-time", getprop("/sim/time/elapsed-sec") - 35);
} }
} else { } else {
setprop("/instrumentation/du/du3-test", 0); setprop("/instrumentation/du/du3-test", 0);

View file

@ -1 +1 @@
4043 4044