From 6385473d1cab0c7f6b20763a8338a9d8bd9cac12 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Wed, 29 Nov 2017 11:14:13 -0500 Subject: [PATCH] A3XX: Fix DU Test not skipped properly in AutoConfig --- AircraftConfig/acconfig.nas | 11 ----------- Models/Instruments/Lower-ECAM/Lower-ECAM.nas | 5 ++++- Models/Instruments/ND/canvas/ND.nas | 10 ++++++++-- Models/Instruments/PFD/PFD.nas | 10 ++++++++-- Models/Instruments/Upper-ECAM/Upper-ECAM.nas | 5 ++++- revision.txt | 2 +- 6 files changed, 25 insertions(+), 18 deletions(-) diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index f2444767..277bc49d 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -169,15 +169,6 @@ var systemsReset = func { 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 # ################ @@ -296,7 +287,6 @@ var beforestart_b = func { setprop("/controls/adirs/mcducbtn", 1); setprop("/controls/lighting/beacon", 1); setprop("/controls/lighting/nav-lights-switch", 1); - skipDUTest(); setprop("/controls/gear/brake-left", 0); setprop("/controls/gear/brake-right", 0); setprop("/systems/acconfig/autoconfig-running", 0); @@ -370,7 +360,6 @@ var taxi_b = func { setprop("/controls/adirs/mcducbtn", 1); setprop("/controls/lighting/beacon", 1); setprop("/controls/lighting/nav-lights-switch", 1); - skipDUTest(); settimer(taxi_c, 2); } var taxi_c = func { diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index 371f473c..b0f7caa0 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -89,9 +89,12 @@ var canvas_lowerECAM_base = { update: func() { elapsedtime = getprop("/sim/time/elapsed-sec"); 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-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") { setprop("/instrumentation/du/du4-test", 0); diff --git a/Models/Instruments/ND/canvas/ND.nas b/Models/Instruments/ND/canvas/ND.nas index d48b2d56..29d36084 100644 --- a/Models/Instruments/ND/canvas/ND.nas +++ b/Models/Instruments/ND/canvas/ND.nas @@ -77,13 +77,19 @@ var canvas_nd_base = { update: func() { elapsedtime = getprop("/sim/time/elapsed-sec"); 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-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-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 { setprop("/instrumentation/du/du2-test", 0); diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 0f07e044..46a2be2b 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -131,17 +131,23 @@ var canvas_PFD_base = { update: func() { elapsedtime = getprop("/sim/time/elapsed-sec"); 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-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 { setprop("/instrumentation/du/du1-test", 0); } 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-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 { setprop("/instrumentation/du/du6-test", 0); diff --git a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas index a94dd568..f0698406 100644 --- a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas +++ b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas @@ -50,9 +50,12 @@ var canvas_upperECAM_base = { update: func() { elapsedtime = getprop("/sim/time/elapsed-sec"); 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-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 { setprop("/instrumentation/du/du3-test", 0); diff --git a/revision.txt b/revision.txt index 0cb4e881..8c1dae6b 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4043 \ No newline at end of file +4044 \ No newline at end of file