From 8da6258c2cad00749b78d1d30915e2aede3160b0 Mon Sep 17 00:00:00 2001 From: Matthew Maring <56924612+hayden2000@users.noreply.github.com> Date: Mon, 18 May 2020 12:35:42 -0400 Subject: [PATCH] Correct fuel prediction animation --- Models/Instruments/MCDU/MCDU.nas | 18 ++++++++++++------ Nasal/MCDU/INITB.nas | 4 ++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 82bff375..71335925 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -1577,12 +1577,18 @@ var canvas_MCDU_base = { me["Simple_L6"].setText("---.-"); me["Simple_R2"].hide(); me["INITB_Block"].show(); - me["Simple_R3S"].show(); - me["Simple_R3"].show(); - me["Simple_R3S"].setText("FUEL"); - me["Simple_R3"].setText("PLANNING "); - me["Simple_R3_Arrow"].show(); - me["Simple_R3_Arrow"].setColor(AMBER); + if (zfwSet.getValue() == 1) { + me["Simple_R3S"].show(); + me["Simple_R3"].show(); + me["Simple_R3S"].setText("FUEL"); + me["Simple_R3"].setText("PLANNING "); + me["Simple_R3_Arrow"].show(); + me["Simple_R3_Arrow"].setColor(AMBER); + } else { + me["Simple_R3S"].hide(); + me["Simple_R3"].hide(); + me["Simple_R3_Arrow"].hide(); + } me["Simple_R4"].setText("---.-/---.-"); me["Simple_R6"].setText("---.-/----"); diff --git a/Nasal/MCDU/INITB.nas b/Nasal/MCDU/INITB.nas index 92f80d7a..0b3a66b8 100644 --- a/Nasal/MCDU/INITB.nas +++ b/Nasal/MCDU/INITB.nas @@ -250,10 +250,10 @@ var initInputB = func(key, i) { } } } else if (key == "R3") { - if (scratchpad == "" and !getprop("/FMGC/internal/fuel-request-set")) { + if (scratchpad == "" and getprop("/FMGC/internal/zfw-set") and !getprop("/FMGC/internal/fuel-request-set")) { setprop("/FMGC/internal/fuel-request-set", 1); setprop("/FMGC/internal/block-calculating", 1); - } else if (scratchpad == "" and getprop("/FMGC/internal/fuel-request-set") and !getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/block-calculating")) { + } else if (scratchpad == "" and getprop("/FMGC/internal/zfw-set") and getprop("/FMGC/internal/fuel-request-set") and !getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/block-calculating")) { setprop("/FMGC/internal/block-confirmed", 1); setprop("/FMGC/internal/fuel-calculating", 1); } else {