1
0
Fork 0

Finally fix the electrical system display bug!

This commit is contained in:
legoboyvdlp R 2021-05-12 15:27:13 +01:00
parent 53439c3cb6
commit 3d68a55ef0
4 changed files with 33 additions and 10 deletions

View file

@ -203,6 +203,7 @@ var canvas_lowerECAM_base = {
getKeys: func() {
return [];
},
du4OffTimer: 0,
updateDu4: func() {
var elapsedtime = pts.Sim.Time.elapsedSec.getValue();
@ -224,9 +225,12 @@ var canvas_lowerECAM_base = {
du4_test_time.setValue(-100);
}
}
} else {
me.du4OffTimer = 0;
du4_offtime.setValue(0);
} elsif (me.du4OffTimer == 0) {
du4_test.setValue(0);
du4_offtime.setValue(elapsedtime);
me.du4OffTimer = 1;
du4_offtime.setValue(elapsedtime_act);
}
},
update: func() {

View file

@ -87,6 +87,7 @@ var canvas_nd_base = {
getKeys: func() {
return [];
},
du2OffTimer: 0,
updateDu2: func() {
var elapsedtime = getprop("sim/time/elapsed-sec");
if (getprop("systems/electrical/bus/ac-ess-shed") >= 110) {
@ -107,11 +108,15 @@ var canvas_nd_base = {
du2_test_time.setValue(-100);
}
}
} else {
me.du2OffTimer = 0;
du2_offtime.setValue(0);
} elsif (me.du2OffTimer == 0) {
du2_test.setValue(0);
du2_offtime.setValue(elapsedtime);
me.du2OffTimer = 1;
du2_offtime.setValue(elapsedtime_act);
}
},
du5OffTimer: 0,
updateDu5: func() {
var elapsedtime = getprop("sim/time/elapsed-sec");
if (getprop("systems/electrical/bus/ac-2") >= 110) {
@ -132,11 +137,13 @@ var canvas_nd_base = {
du5_test_time.setValue(-100);
}
}
} else {
me.du5OffTimer = 0;
du5_offtime.setValue(0);
} elsif (me.du5OffTimer == 0) {
du5_test.setValue(0);
du5_offtime.setValue(elapsedtime);
me.du5OffTimer = 1;
du5_offtime.setValue(elapsedtime_act);
}
},
update: func() {
var elapsedtime = getprop("sim/time/elapsed-sec");

View file

@ -220,6 +220,7 @@ var canvas_PFD_base = {
"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","ILS_HDG_R","ILS_HDG_L",
"ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError"];
},
du1OffTimer: 0,
updateDu1: func() {
var elapsedtime_act = elapsedtime.getValue();
if (systems.ELEC.Bus.acEss.getValue() >= 110) {
@ -240,11 +241,15 @@ var canvas_PFD_base = {
du1_test_time.setValue(-100);
}
}
} else {
me.du1OffTimer = 0;
du1_offtime.setValue(0);
} elsif (me.du1OffTimer == 0) {
du1_test.setValue(0);
me.du1OffTimer = 1;
du1_offtime.setValue(elapsedtime_act);
}
},
du6OffTimer: 0,
updateDu6: func() {
var elapsedtime_act = elapsedtime.getValue();
if (systems.ELEC.Bus.ac2.getValue() >= 110) {
@ -265,8 +270,11 @@ var canvas_PFD_base = {
du6_test_time.setValue(-100);
}
}
} else {
me.du6OffTimer = 0;
du6_offtime.setValue(0);
} elsif (me.du6OffTimer == 0) {
du6_test.setValue(0);
me.du6OffTimer = 1;
du6_offtime.setValue(elapsedtime_act);
}
},

View file

@ -913,6 +913,7 @@ var canvas_upperECAM = {
me["Test_text"].show();
}
},
du3OffTimer: 0,
powerTransient: func() {
if (systems.ELEC.Bus.acEss.getValue() >= 110) {
if (du3_offtime.getValue() + 3 < pts.Sim.Time.elapsedSec.getValue()) {
@ -932,8 +933,11 @@ var canvas_upperECAM = {
du3_test_time.setValue(-100);
}
}
} else {
me.du3OffTimer = 0;
du3_offtime.setValue(0);
} elsif (me.du3OffTimer == 0) {
du3_test.setValue(0);
me.du3OffTimer = 1;
du3_offtime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
},