1
0
Fork 0

Disable buggy clearing for baro/radio

This commit is contained in:
Matthew Maring 2020-04-18 21:22:36 -04:00 committed by Jonathan Redpath
parent a1051d03c6
commit 1b1687afb1
3 changed files with 22 additions and 19 deletions

View file

@ -193,8 +193,9 @@ var dest_mag = props.globals.getNode("FMGC/internal/dest-mag", 1);
var dest_wind = props.globals.getNode("FMGC/internal/dest-wind", 1);
var vapp_speed_set = props.globals.getNode("FMGC/internal/vapp-speed-set", 1);
var final = props.globals.getNode("FMGC/internal/final", 1);
var mda = props.globals.getNode("FMGC/internal/radio", 1);
var dh = props.globals.getNode("FMGC/internal/baro", 1);
var radio = props.globals.getNode("FMGC/internal/radio", 1);
var baro = props.globals.getNode("FMGC/internal/baro", 1);
var radio_no = props.globals.getNode("FMGC/internal/radio-no", 1);
var ldg_config_3_set = props.globals.getNode("FMGC/internal/ldg-config-3-set", 1);
var ldg_config_f_set = props.globals.getNode("FMGC/internal/ldg-config-f-set", 1);

View file

@ -832,7 +832,7 @@ var canvas_PFD_base = {
}
#me["dhReached"].hide();
} else if (getprop("FMGC/internal/radio-no")) {
me["FMA_dh"].setText("RADIO");
me["FMA_dh"].setText("BARO");
me["FMA_dh"].show();
me["FMA_dhn"].setText("100");
me["FMA_dhn"].show();

View file

@ -82,18 +82,12 @@ var perfAPPRInput = func(key, i) {
}
} else if (key == "L6") {
setprop("MCDU[" ~ i ~ "]/page", "PERFDES");
} else if (key == "R4") {
if (scratchpad == "" and ldg_config_f_set.getValue() == 1 and ldg_config_3_set.getValue() == 0) {
setprop("FMGC/internal/ldg-config-3-set", 1);
setprop("FMGC/internal/ldg-config-f-set", 0);
} else {
notAllowed(i);
}
} else if (key == "R2") {
if (scratchpad == "CLR") {
setprop("FMGC/internal/baro", -1);
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else if (int(scratchpad) != nil and scratchpad >= getprop("FMGC/internal/ldg-elev") and scratchpad <= 5000 + getprop("FMGC/internal/ldg-elev")) {
# if (scratchpad == "CLR") {
# setprop("FMGC/internal/baro", -1);
# setprop("MCDU[" ~ i ~ "]/scratchpad", "");
# } else
if (int(scratchpad) != nil and scratchpad >= getprop("FMGC/internal/ldg-elev") and scratchpad <= 5000 + getprop("FMGC/internal/ldg-elev")) {
if (getprop("FMGC/internal/radio-no") == 0) {
setprop("FMGC/internal/radio", -1);
}
@ -103,11 +97,12 @@ var perfAPPRInput = func(key, i) {
notAllowed(i);
}
} else if (key == "R3") {
if (scratchpad == "CLR") {
setprop("FMGC/internal/radio", -1);
setprop("FMGC/internal/radio-no", 0);
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
} else if (scratchpad == "NO") {
# if (scratchpad == "CLR") {
# setprop("FMGC/internal/radio", -1);
# setprop("FMGC/internal/radio-no", 0);
# setprop("MCDU[" ~ i ~ "]/scratchpad", "");
# } else
if (scratchpad == "NO") {
setprop("FMGC/internal/radio", -1);
setprop("FMGC/internal/radio-no", 1);
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
@ -119,6 +114,13 @@ var perfAPPRInput = func(key, i) {
} else {
notAllowed(i);
}
} else if (key == "R4") {
if (scratchpad == "" and ldg_config_f_set.getValue() == 1 and ldg_config_3_set.getValue() == 0) {
setprop("FMGC/internal/ldg-config-3-set", 1);
setprop("FMGC/internal/ldg-config-f-set", 0);
} else {
notAllowed(i);
}
} else if (key == "R5") {
if (scratchpad == "" and ldg_config_3_set.getValue() == 1 and ldg_config_f_set.getValue() == 0) {
setprop("FMGC/internal/ldg-config-3-set", 0);