System: ZFW field is not clearable

This commit is contained in:
Joshua Davidson 2018-04-04 12:45:40 -04:00
parent c648913441
commit 59b9512ad4
2 changed files with 10 additions and 12 deletions

View file

@ -8,12 +8,11 @@ var initInputB = func(key) {
var scratchpad = getprop("/MCDU[0]/scratchpad");
if (key == "R1") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/zfw", 0);
setprop("/FMGC/internal/zfwcg", 55.1); # 25KG default
setprop("/FMGC/internal/zfw-set", 0);
setprop("/FMGC/internal/zfwcg-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
} else {
var tfs = size(scratchpad);
if (tfs == 0) {

View file

@ -8,12 +8,11 @@ var initInputB = func(key) {
var scratchpad = getprop("/MCDU[1]/scratchpad");
if (key == "R1") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/zfw", 0);
setprop("/FMGC/internal/zfwcg", 55.1); # 25KG default
setprop("/FMGC/internal/zfw-set", 0);
setprop("/FMGC/internal/zfwcg-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} else {
var tfs = size(scratchpad);
if (tfs == 0) {