diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index f7464784..c2e57973 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -904,7 +904,9 @@ setlistener("systems/navigation/adr/operating-3", func() { # Calculate Block Fuel setlistener("/FMGC/internal/block-calculating", func() { if (timer3blockFuel.isRunning) { - timer3blockFuel.stop(); + setprop("/FMGC/internal/block-fuel-time", -99); + timer3blockFuel.start(); + setprop("/FMGC/internal/block-fuel-time", pts.Sim.Time.elapsedSec.getValue()); } if (getprop("/FMGC/internal/block-fuel-time") == -99) { @@ -964,8 +966,10 @@ var timer3blockFuel = maketimer(1, func() { if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/block-fuel-time") + 3) { setprop("/FMGC/internal/block", sprintf("%3.1f", math.round(getprop("/consumables/fuel/total-fuel-lbs") / 1000, 0.1))); setprop("/FMGC/internal/block-set", 1); - setprop("/FMGC/internal/zfw", sprintf("%3.1f", math.round((getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs")) / 1000, 0.1))); - setprop("/FMGC/internal/zfw-set", 1); + if (!getprop("/FMGC/internal/zfw-set")) { + setprop("/FMGC/internal/zfw", sprintf("%3.1f", math.round((getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs")) / 1000, 0.1))); + setprop("/FMGC/internal/zfw-set", 1); + } setprop("/FMGC/internal/block-calculating", 0); setprop("/FMGC/internal/block-fuel-time", -99); timer3blockFuel.stop(); diff --git a/Nasal/MCDU/INITB.nas b/Nasal/MCDU/INITB.nas index 607da04b..35dc4d12 100644 --- a/Nasal/MCDU/INITB.nas +++ b/Nasal/MCDU/INITB.nas @@ -10,6 +10,8 @@ var initInputB = func(key, i) { setprop("/FMGC/internal/taxi-fuel-set", 0); if (getprop("/FMGC/internal/block-confirmed")) { setprop("/FMGC/internal/fuel-calculating", 1); + } else if (getprop("/FMGC/internal/fuel-request-set")) { + setprop("/FMGC/internal/block-calculating", 1); } setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0); setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); @@ -160,6 +162,8 @@ var initInputB = func(key, i) { setprop("/FMGC/internal/zfw-set", 1); if (getprop("/FMGC/internal/block-confirmed")) { setprop("/FMGC/internal/fuel-calculating", 1); + } else if (getprop("/FMGC/internal/fuel-request-set")) { + setprop("/FMGC/internal/block-calculating", 1); } } if ((zfwcg != nil and zfwcgs >= 1 and zfwcgs <= 5 and zfwcg > 0 and zfwcg <= 99.9) or (zfw != nil and zfws >= 1 and zfws <= 5 and zfw > 0 and zfw <= 999.9)) {