1
0
Fork 0

Revert "Displays: stop showing self-test on momentary-power down. On first init"

This reverts commit bed1dd5a66.
This commit is contained in:
legoboyvdlp R 2019-10-19 13:37:39 +01:00
parent 040c72ccb6
commit ce62c58c79
4 changed files with 28 additions and 84 deletions

View file

@ -246,8 +246,6 @@ var gen1_load = props.globals.initNode("/systems/electrical/extra/gen1-load", 0,
var gen2_load = props.globals.initNode("/systems/electrical/extra/gen2-load", 0, "DOUBLE"); var gen2_load = props.globals.initNode("/systems/electrical/extra/gen2-load", 0, "DOUBLE");
var du4_test = props.globals.initNode("/instrumentation/du/du4-test", 0, "BOOL"); var du4_test = props.globals.initNode("/instrumentation/du/du4-test", 0, "BOOL");
var du4_test_time = props.globals.initNode("/instrumentation/du/du4-test-time", 0, "DOUBLE"); var du4_test_time = props.globals.initNode("/instrumentation/du/du4-test-time", 0, "DOUBLE");
var du4_off_time = props.globals.initNode("/instrumentation/du/du4-off-time", 0, "DOUBLE");
var du4_off_time_2 = props.globals.initNode("/instrumentation/du/du4-off-time-2", 0, "DOUBLE");
var du4_test_amount = props.globals.initNode("/instrumentation/du/du4-test-amount", 0, "DOUBLE"); var du4_test_amount = props.globals.initNode("/instrumentation/du/du4-test-amount", 0, "DOUBLE");
var canvas_lowerECAM_base = { var canvas_lowerECAM_base = {
@ -273,10 +271,6 @@ var canvas_lowerECAM_base = {
update: func() { update: func() {
elapsedtime = elapsed_sec.getValue(); elapsedtime = elapsed_sec.getValue();
if (ac2.getValue() >= 110) { if (ac2.getValue() >= 110) {
if (du4_off_time.getValue() != 0) {
du4_off_time_2.setValue(elapsedtime - du4_off_time.getValue());
du4_off_time.setValue(0);
}
if (gear0_wow.getValue() == 1) { if (gear0_wow.getValue() == 1) {
if (autoconfig_running.getValue() != 1 and du4_test.getValue() != 1) { if (autoconfig_running.getValue() != 1 and du4_test.getValue() != 1) {
du4_test.setValue(1); du4_test.setValue(1);
@ -292,14 +286,12 @@ var canvas_lowerECAM_base = {
du4_test_amount.setValue(0); du4_test_amount.setValue(0);
du4_test_time.setValue(-100); du4_test_time.setValue(-100);
} }
} elsif (du4_test.getValue() != 0) { } else if (ac1_src.getValue() == "XX" or ac2_src.getValue() == "XX") {
du4_test.setValue(0); du4_test.setValue(0);
du4_off_time.setValue(elapsedtime);
du4_off_time_2.setValue(0);
} }
if (ac2.getValue() >= 110 and lighting_du4.getValue() > 0.01) { if (ac2.getValue() >= 110 and lighting_du4.getValue() > 0.01) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= elapsedtime and du4_off_time_2.getValue() > 0.5) { if (du4_test_time.getValue() + du4_test_amount.getValue() >= elapsedtime) {
lowerECAM_apu.page.hide(); lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide(); lowerECAM_bleed.page.hide();
lowerECAM_cond.page.hide(); lowerECAM_cond.page.hide();

View file

@ -14,25 +14,18 @@ var ND_2_test = nil;
var elapsedtime = 0; var elapsedtime = 0;
# Fetch nodes: # Fetch nodes:
var du1_test_time = props.globals.initNode("/instrumentation/du/du1-test-time", 0.0, "DOUBLE"); var du1_test = props.globals.getNode("/instrumentation/du/du1-test");
var du1_off_time = props.globals.initNode("/instrumentation/du/du1-off-time", 0.0, "DOUBLE"); var du1_test_time = props.globals.getNode("/instrumentation/du/du1-test-time");
var du1_off_time_2 = props.globals.initNode("/instrumentation/du/du1-off-time-2", 0.0, "DOUBLE"); var du1_test_amount = props.globals.getNode("/instrumentation/du/du1-test-amount");
var du1_test_amount = props.globals.initNode("/instrumentation/du/du1-test-amount", 0.0, "DOUBLE"); var du2_test = props.globals.getNode("/instrumentation/du/du2-test");
var du2_test = props.globals.initNode("/instrumentation/du/du2-test", 0, "BOOL"); var du2_test_time = props.globals.getNode("/instrumentation/du/du2-test-time");
var du2_test_time = props.globals.initNode("/instrumentation/du/du2-test-time", 0.0, "DOUBLE"); var du2_test_amount = props.globals.getNode("/instrumentation/du/du2-test-amount");
var du2_off_time = props.globals.initNode("/instrumentation/du/du2-off-time", 0.0, "DOUBLE"); var du5_test = props.globals.getNode("/instrumentation/du/du5-test");
var du2_off_time_2 = props.globals.initNode("/instrumentation/du/du2-off-time-2", 0.0, "DOUBLE"); var du5_test_time = props.globals.getNode("/instrumentation/du/du5-test-time");
var du2_test_amount = props.globals.initNode("/instrumentation/du/du2-test-amount", 0.0, "DOUBLE"); var du5_test_amount = props.globals.getNode("/instrumentation/du/du5-test-amount");
var du5_test = props.globals.initNode("/instrumentation/du/du5-test", 0, "BOOL"); var du6_test = props.globals.getNode("/instrumentation/du/du6-test");
var du5_test_time = props.globals.initNode("/instrumentation/du/du5-test-time", 0.0, "DOUBLE"); var du6_test_time = props.globals.getNode("/instrumentation/du/du6-test-time");
var du5_off_time = props.globals.initNode("/instrumentation/du/du5-off-time", 0.0, "DOUBLE"); var du6_test_amount = props.globals.getNode("/instrumentation/du/du6-test-amount");
var du5_off_time_2 = props.globals.initNode("/instrumentation/du/du5-off-time-2", 0.0, "DOUBLE");
var du5_test_amount = props.globals.initNode("/instrumentation/du/du5-test-amount", 0.0, "DOUBLE");
var du6_test = props.globals.initNode("/instrumentation/du/du6-test", 0, "BOOL");
var du6_test_time = props.globals.initNode("/instrumentation/du/du6-test-time", 0.0, "DOUBLE");
var du6_off_time = props.globals.initNode("/instrumentation/du/du6-off-time", 0.0, "DOUBLE");
var du6_off_time_2 = props.globals.initNode("/instrumentation/du/du6-off-time-2", 0.0, "DOUBLE");
var du6_test_amount = props.globals.initNode("/instrumentation/du/du6-test-amount", 0.0, "DOUBLE");
var cpt_du_xfr = props.globals.getNode("/modes/cpt-du-xfr"); var cpt_du_xfr = props.globals.getNode("/modes/cpt-du-xfr");
var fo_du_xfr = props.globals.getNode("/modes/fo-du-xfr"); var fo_du_xfr = props.globals.getNode("/modes/fo-du-xfr");
var wow0 = props.globals.getNode("/gear/gear[0]/wow"); var wow0 = props.globals.getNode("/gear/gear[0]/wow");
@ -94,10 +87,6 @@ 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/ac-ess-shed") >= 110) { if (getprop("/systems/electrical/bus/ac-ess-shed") >= 110) {
if (du2_off_time.getValue() != 0) {
du2_off_time_2.setValue(elapsedtime - du2_off_time.getValue());
du2_off_time.setValue(0);
}
if (wow0.getValue() == 1) { 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.setValue(1);
@ -113,17 +102,10 @@ var canvas_nd_base = {
du2_test_amount.setValue(0); du2_test_amount.setValue(0);
du2_test_time.setValue(-100); du2_test_time.setValue(-100);
} }
} elsif (du2_test.getValue() != 0) { } else {
du2_test.setValue(0); du2_test.setValue(0);
du2_off_time.setValue(elapsedtime);
du2_off_time_2.setValue(0);
} }
if (getprop("/systems/electrical/bus/ac-2") >= 110) { if (getprop("/systems/electrical/bus/ac-2") >= 110) {
if (du5_off_time.getValue() != 0) {
du5_off_time_2.setValue(elapsedtime - du5_off_time.getValue());
du5_off_time.setValue(0);
}
if (wow0.getValue() == 1) { 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.setValue(1);
@ -139,18 +121,16 @@ var canvas_nd_base = {
du5_test_amount.setValue(0); du5_test_amount.setValue(0);
du5_test_time.setValue(-100); du5_test_time.setValue(-100);
} }
} elsif (du5_test.getValue() != 0) { } else {
du5_test.setValue(0); du5_test.setValue(0);
du5_off_time.setValue(elapsedtime);
du5_off_time_2.setValue(0);
} }
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 and du2_off_time_2.getValue() > 0.5) { if (du2_test_time.getValue() + du2_test_amount.getValue() >= elapsedtime and cpt_du_xfr.getValue() != 1) {
ND_1.page.hide(); ND_1.page.hide();
ND_1_test.page.show(); ND_1_test.page.show();
ND_1_test.update(); ND_1_test.update();
} else if (du1_test_time.getValue() + du1_test_amount.getValue() >= elapsedtime and cpt_du_xfr.getValue() == 1 and du1_off_time_2.getValue() > 0.5) { } else if (du1_test_time.getValue() + du1_test_amount.getValue() >= elapsedtime and cpt_du_xfr.getValue() == 1) {
ND_1.page.hide(); ND_1.page.hide();
ND_1_test.page.show(); ND_1_test.page.show();
ND_1_test.update(); ND_1_test.update();
@ -164,11 +144,11 @@ var canvas_nd_base = {
ND_1.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 and du5_off_time_2.getValue() > 0.5) { if (du5_test_time.getValue() + du5_test_amount.getValue() >= elapsedtime and fo_du_xfr.getValue() != 1) {
ND_2.page.hide(); ND_2.page.hide();
ND_2_test.page.show(); ND_2_test.page.show();
ND_2_test.update(); ND_2_test.update();
} else if (du6_test_time.getValue() + du6_test_amount.getValue() >= elapsedtime and fo_du_xfr.getValue() == 1 and du6_off_time_2.getValue() > 0.5) { } else if (du6_test_time.getValue() + du6_test_amount.getValue() >= elapsedtime and fo_du_xfr.getValue() == 1) {
ND_2.page.hide(); ND_2.page.hide();
ND_2_test.page.show(); ND_2_test.page.show();
ND_2_test.update(); ND_2_test.update();

View file

@ -136,23 +136,15 @@ var track_diff = props.globals.initNode("/instrumentation/pfd/track-hdg-diff", 0
var speed_pred = props.globals.initNode("/instrumentation/pfd/speed-lookahead", 0.0, "DOUBLE"); var speed_pred = props.globals.initNode("/instrumentation/pfd/speed-lookahead", 0.0, "DOUBLE");
var du1_test = props.globals.initNode("/instrumentation/du/du1-test", 0, "BOOL"); var du1_test = props.globals.initNode("/instrumentation/du/du1-test", 0, "BOOL");
var du1_test_time = props.globals.initNode("/instrumentation/du/du1-test-time", 0.0, "DOUBLE"); var du1_test_time = props.globals.initNode("/instrumentation/du/du1-test-time", 0.0, "DOUBLE");
var du1_off_time = props.globals.initNode("/instrumentation/du/du1-off-time", 0.0, "DOUBLE");
var du1_off_time_2 = props.globals.initNode("/instrumentation/du/du1-off-time-2", 0.0, "DOUBLE");
var du1_test_amount = props.globals.initNode("/instrumentation/du/du1-test-amount", 0.0, "DOUBLE"); var du1_test_amount = props.globals.initNode("/instrumentation/du/du1-test-amount", 0.0, "DOUBLE");
var du2_test = props.globals.initNode("/instrumentation/du/du2-test", 0, "BOOL"); var du2_test = props.globals.initNode("/instrumentation/du/du2-test", 0, "BOOL");
var du2_test_time = props.globals.initNode("/instrumentation/du/du2-test-time", 0.0, "DOUBLE"); var du2_test_time = props.globals.initNode("/instrumentation/du/du2-test-time", 0.0, "DOUBLE");
var du2_off_time = props.globals.initNode("/instrumentation/du/du2-off-time", 0.0, "DOUBLE");
var du2_off_time_2 = props.globals.initNode("/instrumentation/du/du2-off-time-2", 0.0, "DOUBLE");
var du2_test_amount = props.globals.initNode("/instrumentation/du/du2-test-amount", 0.0, "DOUBLE"); var du2_test_amount = props.globals.initNode("/instrumentation/du/du2-test-amount", 0.0, "DOUBLE");
var du5_test = props.globals.initNode("/instrumentation/du/du5-test", 0, "BOOL"); var du5_test = props.globals.initNode("/instrumentation/du/du5-test", 0, "BOOL");
var du5_test_time = props.globals.initNode("/instrumentation/du/du5-test-time", 0.0, "DOUBLE"); var du5_test_time = props.globals.initNode("/instrumentation/du/du5-test-time", 0.0, "DOUBLE");
var du5_off_time = props.globals.initNode("/instrumentation/du/du5-off-time", 0.0, "DOUBLE");
var du5_off_time_2 = props.globals.initNode("/instrumentation/du/du5-off-time-2", 0.0, "DOUBLE");
var du5_test_amount = props.globals.initNode("/instrumentation/du/du5-test-amount", 0.0, "DOUBLE"); var du5_test_amount = props.globals.initNode("/instrumentation/du/du5-test-amount", 0.0, "DOUBLE");
var du6_test = props.globals.initNode("/instrumentation/du/du6-test", 0, "BOOL"); var du6_test = props.globals.initNode("/instrumentation/du/du6-test", 0, "BOOL");
var du6_test_time = props.globals.initNode("/instrumentation/du/du6-test-time", 0.0, "DOUBLE"); var du6_test_time = props.globals.initNode("/instrumentation/du/du6-test-time", 0.0, "DOUBLE");
var du6_off_time = props.globals.initNode("/instrumentation/du/du6-off-time", 0.0, "DOUBLE");
var du6_off_time_2 = props.globals.initNode("/instrumentation/du/du6-off-time-2", 0.0, "DOUBLE");
var du6_test_amount = props.globals.initNode("/instrumentation/du/du6-test-amount", 0.0, "DOUBLE"); var du6_test_amount = props.globals.initNode("/instrumentation/du/du6-test-amount", 0.0, "DOUBLE");
var canvas_PFD_base = { var canvas_PFD_base = {
@ -210,10 +202,6 @@ var canvas_PFD_base = {
update: func() { update: func() {
elapsedtime_act = elapsedtime.getValue(); elapsedtime_act = elapsedtime.getValue();
if (acess.getValue() >= 110) { if (acess.getValue() >= 110) {
if (du1_off_time.getValue() != 0) {
du1_off_time_2.setValue(elapsedtime_act - du1_off_time.getValue());
du1_off_time.setValue(0);
}
if (wow0.getValue() == 1) { if (wow0.getValue() == 1) {
if (acconfig.getValue() != 1 and du1_test.getValue() != 1) { if (acconfig.getValue() != 1 and du1_test.getValue() != 1) {
du1_test.setValue(1); du1_test.setValue(1);
@ -229,17 +217,11 @@ var canvas_PFD_base = {
du1_test_amount.setValue(0); du1_test_amount.setValue(0);
du1_test_time.setValue(-100); du1_test_time.setValue(-100);
} }
} elsif (du1_test.getValue() != 0) { } else {
du1_test.setValue(0); du1_test.setValue(0);
du1_off_time.setValue(elapsedtime_act);
du1_off_time_2.setValue(0);
} }
if (ac2.getValue() >= 110) { if (ac2.getValue() >= 110) {
if (du6_off_time.getValue() != 0) {
du6_off_time_2.setValue(elapsedtime_act - du6_off_time.getValue());
du6_off_time.setValue(0);
}
if (wow0.getValue() == 1) { if (wow0.getValue() == 1) {
if (acconfig.getValue() != 1 and du6_test.getValue() != 1) { if (acconfig.getValue() != 1 and du6_test.getValue() != 1) {
du6_test.setValue(1); du6_test.setValue(1);
@ -255,22 +237,20 @@ var canvas_PFD_base = {
du6_test_amount.setValue(0); du6_test_amount.setValue(0);
du6_test_time.setValue(-100); du6_test_time.setValue(-100);
} }
} elsif (du6_test.getValue() != 0) { } else {
du6_test.setValue(0); du6_test.setValue(0);
du6_off_time.setValue(elapsedtime_act);
du6_off_time_2.setValue(0);
} }
if (acconfig_mismatch.getValue() == "0x000") { if (acconfig_mismatch.getValue() == "0x000") {
PFD_1_mismatch.page.hide(); PFD_1_mismatch.page.hide();
PFD_2_mismatch.page.hide(); PFD_2_mismatch.page.hide();
if (acess.getValue() >= 110 and du1_lgt.getValue() > 0.01) { if (acess.getValue() >= 110 and du1_lgt.getValue() > 0.01) {
if (du1_test_time.getValue() + du1_test_amount.getValue() >= elapsedtime_act and cpt_du_xfr.getValue() != 1 and du1_off_time_2.getValue() > 0.5) { if (du1_test_time.getValue() + du1_test_amount.getValue() >= elapsedtime_act and cpt_du_xfr.getValue() != 1) {
PFD_1_test.update(); PFD_1_test.update();
updateL = 0; updateL = 0;
PFD_1.page.hide(); PFD_1.page.hide();
PFD_1_test.page.show(); PFD_1_test.page.show();
} else if (du2_test_time.getValue() + du2_test_amount.getValue() >= elapsedtime_act and cpt_du_xfr.getValue() == 1 and du2_off_time_2.getValue() > 0.5) { } else if (du2_test_time.getValue() + du2_test_amount.getValue() >= elapsedtime_act and cpt_du_xfr.getValue() == 1) {
PFD_1_test.update(); PFD_1_test.update();
updateL = 0; updateL = 0;
PFD_1.page.hide(); PFD_1.page.hide();
@ -288,12 +268,12 @@ var canvas_PFD_base = {
PFD_1.page.hide(); PFD_1.page.hide();
} }
if (ac2.getValue() >= 110 and du6_lgt.getValue() > 0.01) { if (ac2.getValue() >= 110 and du6_lgt.getValue() > 0.01) {
if (du6_test_time.getValue() + du6_test_amount.getValue() >= elapsedtime_act and fo_du_xfr.getValue() != 1 and du6_off_time_2.getValue() > 0.5) { if (du6_test_time.getValue() + du6_test_amount.getValue() >= elapsedtime_act and fo_du_xfr.getValue() != 1) {
PFD_2_test.update(); PFD_2_test.update();
updateR = 0; updateR = 0;
PFD_2.page.hide(); PFD_2.page.hide();
PFD_2_test.page.show(); PFD_2_test.page.show();
} else if (du5_test_time.getValue() + du5_test_amount.getValue() >= elapsedtime_act and fo_du_xfr.getValue() == 1 and du5_off_time_2.getValue() > 0.5) { } else if (du5_test_time.getValue() + du5_test_amount.getValue() >= elapsedtime_act and fo_du_xfr.getValue() == 1) {
PFD_2_test.update(); PFD_2_test.update();
updateR = 0; updateR = 0;
PFD_2.page.hide(); PFD_2.page.hide();

View file

@ -27,8 +27,6 @@ var N1_thr_2 = props.globals.initNode("/ECAM/Upper/N1thr[1]", 0, "DOUBLE");
var N1_lim = props.globals.initNode("/ECAM/Upper/N1ylim", 0, "DOUBLE"); var N1_lim = props.globals.initNode("/ECAM/Upper/N1ylim", 0, "DOUBLE");
var du3_test = props.globals.initNode("/instrumentation/du/du3-test", 0, "BOOL"); var du3_test = props.globals.initNode("/instrumentation/du/du3-test", 0, "BOOL");
var du3_test_time = props.globals.initNode("/instrumentation/du/du3-test-time", 0.0, "DOUBLE"); var du3_test_time = props.globals.initNode("/instrumentation/du/du3-test-time", 0.0, "DOUBLE");
var du3_off_time = props.globals.initNode("/instrumentation/du/du3-off-time", 0.0, "DOUBLE");
var du3_off_time_2 = props.globals.initNode("/instrumentation/du/du3-off-time-2", 0.0, "DOUBLE");
var du3_test_amount = props.globals.initNode("/instrumentation/du/du3-test-amount", 0.0, "DOUBLE"); var du3_test_amount = props.globals.initNode("/instrumentation/du/du3-test-amount", 0.0, "DOUBLE");
# Fetch nodes: # Fetch nodes:
@ -139,10 +137,6 @@ var canvas_upperECAM_base = {
elapsedtime = et.getValue(); elapsedtime = et.getValue();
if (acess.getValue() >= 110) { if (acess.getValue() >= 110) {
if (du3_off_time.getValue() != 0) {
du3_off_time_2.setValue(elapsedtime - du3_off_time.getValue());
du3_off_time.setValue(0);
}
if (wow0.getValue() == 1) { if (wow0.getValue() == 1) {
if (acconfig.getValue() != 1 and du3_test.getValue() != 1) { if (acconfig.getValue() != 1 and du3_test.getValue() != 1) {
du3_test.setValue(1); du3_test.setValue(1);
@ -158,15 +152,13 @@ var canvas_upperECAM_base = {
du3_test_amount.setValue(0); du3_test_amount.setValue(0);
du3_test_time.setValue(-100); du3_test_time.setValue(-100);
} }
} elsif (du3_test.getValue() != 0) { } else {
du3_test.setValue(0); du3_test.setValue(0);
du3_off_time.setValue(elapsedtime);
du3_off_time_2.setValue(0);
} }
cur_eng_option = eng_option.getValue(); cur_eng_option = eng_option.getValue();
if (acess.getValue() >= 110 and du3_lgt.getValue() > 0.01) { if (acess.getValue() >= 110 and du3_lgt.getValue() > 0.01) {
if (du3_test_time.getValue() + du3_test_amount.getValue() >= elapsedtime and du3_off_time_2.getValue() > 0.5) { if (du3_test_time.getValue() + du3_test_amount.getValue() >= elapsedtime) {
upperECAM_cfm_eis2.page.hide(); upperECAM_cfm_eis2.page.hide();
upperECAM_iae_eis2.page.hide(); upperECAM_iae_eis2.page.hide();
upperECAM_test.page.show(); upperECAM_test.page.show();