From 59b9512ad414faa0ebd141ed7083b43ae061e4b9 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Wed, 4 Apr 2018 12:45:40 -0400 Subject: [PATCH] System: ZFW field is not clearable --- Nasal/MCDU1/INITB.nas | 11 +++++------ Nasal/MCDU2/INITB.nas | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Nasal/MCDU1/INITB.nas b/Nasal/MCDU1/INITB.nas index 06f6fd39..29de161a 100644 --- a/Nasal/MCDU1/INITB.nas +++ b/Nasal/MCDU1/INITB.nas @@ -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) { diff --git a/Nasal/MCDU2/INITB.nas b/Nasal/MCDU2/INITB.nas index 0b0558a3..cb587f8d 100644 --- a/Nasal/MCDU2/INITB.nas +++ b/Nasal/MCDU2/INITB.nas @@ -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) {