Sim: Fix bugs in lighting

This commit is contained in:
Joshua Davidson 2018-11-07 17:18:17 -05:00
parent aae575169b
commit d2c39ef389
8 changed files with 9 additions and 7 deletions

View file

@ -599,6 +599,8 @@
<du4 type="double">1</du4>
<du5 type="double">1</du5>
<du6 type="double">1</du6>
<mcdu1 type="double">1</mcdu1>
<mcdu2 type="double">1</mcdu2>
</DU>
<beacon type="bool">0</beacon>
<interior type="double">0</interior>

View file

@ -110,7 +110,7 @@ var canvas_lowerECAM_base = {
setprop("/instrumentation/du/du4-test", 0);
}
if (getprop("/systems/electrical/bus/ac2") >= 110 and getprop("/controls/lighting/DU/du4") > 0) {
if (getprop("/systems/electrical/bus/ac2") >= 110 and getprop("/controls/lighting/DU/du4") > 0.01) {
if (getprop("/instrumentation/du/du4-test-time") + getprop("/instrumentation/du/du4-test-amount") >= elapsedtime) {
lowerECAM_apu.page.hide();
lowerECAM_bleed.page.hide();

View file

@ -246,7 +246,7 @@ var canvas_PFD_base = {
if (acconfig_mismatch.getValue() == "0x000") {
PFD_1_mismatch.page.hide();
PFD_2_mismatch.page.hide();
if (acess.getValue() >= 110 and du1_lgt.getValue() > 0) {
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) {
PFD_1_test.update();
updateL = 0;
@ -269,7 +269,7 @@ var canvas_PFD_base = {
PFD_1_test.page.hide();
PFD_1.page.hide();
}
if (ac2.getValue() >= 110 and du6_lgt.getValue() > 0) {
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) {
PFD_2_test.update();
updateR = 0;

View file

@ -138,7 +138,7 @@ var canvas_upperECAM_base = {
}
cur_eng_option = eng_option.getValue();
if (acess.getValue() >= 110 and du3_lgt.getValue() > 0) {
if (acess.getValue() >= 110 and du3_lgt.getValue() > 0.01) {
if (du3_test_time.getValue() + du3_test_amount.getValue() >= elapsedtime) {
upperECAM_cfm_eis2.page.hide();
upperECAM_iae_eis2.page.hide();

View file

@ -5,7 +5,6 @@
##############################################
var MCDU_init = func {
setprop("/MCDU[0]/brightness", "1.0");
MCDU_reset(); # Reset MCDU, clears data
}

View file

@ -5,7 +5,6 @@
##############################################
var MCDU_init = func {
setprop("/MCDU[1]/brightness", "1.0");
MCDU_reset(); # Reset MCDU, clears data
}

View file

@ -48,6 +48,8 @@ var variousReset = func {
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", 0);
setprop("/controls/switching/ATTHDG", 0);
setprop("/controls/switching/AIRDATA", 0);

View file

@ -1 +1 @@
4691
4692