From ebe67398a2c91d6b84cb1bfab73b7ac682954c2c Mon Sep 17 00:00:00 2001 From: Matthew Maring <56924612+hayden2000@users.noreply.github.com> Date: Tue, 26 May 2020 15:45:07 -0400 Subject: [PATCH] Fix block fuel if using auto-start --- Nasal/MCDU/FUELPRED.nas | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Nasal/MCDU/FUELPRED.nas b/Nasal/MCDU/FUELPRED.nas index 60acef4c..f76cdfbc 100644 --- a/Nasal/MCDU/FUELPRED.nas +++ b/Nasal/MCDU/FUELPRED.nas @@ -151,6 +151,14 @@ var fuelPredInput = func(key, i) { var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs"); setprop("/FMGC/internal/zfw", sprintf("%3.1f", math.round(zfw / 1000, 0.1))); setprop("/FMGC/internal/zfw-set", 1); + if (getprop("/FMGC/internal/block-set") != 1) { + setprop("/FMGC/internal/block", num(getprop("consumables/fuel/total-fuel-lbs") / 1000)); + setprop("/FMGC/internal/block-set", 1); + setprop("/FMGC/internal/fuel-request-set", 1); + setprop("/FMGC/internal/fuel-calculating", 1); + setprop("/FMGC/internal/block-calculating", 0); + setprop("/FMGC/internal/block-confirmed", 1); + } } else if (tfs >= 2 and tfs <= 11 and find("/", scratchpad) != -1) { var zfwi = split("/", scratchpad); var zfwcg = num(zfwi[0]);