From 192ef3a4d9ef83edbe6647da2ae6247529d7be70 Mon Sep 17 00:00:00 2001 From: Matthew Maring <56924612+hayden2000@users.noreply.github.com> Date: Mon, 18 May 2020 15:18:17 -0400 Subject: [PATCH] Fuel now updates for all revisions + clearing a discontinuity --- Nasal/FMGC/flightplan.nas | 5 +++++ Nasal/MCDU/F-PLN.nas | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Nasal/FMGC/flightplan.nas b/Nasal/FMGC/flightplan.nas index de9e315a..31924d1e 100644 --- a/Nasal/FMGC/flightplan.nas +++ b/Nasal/FMGC/flightplan.nas @@ -647,6 +647,11 @@ var flightPlanController = { append(wpDistancePrev[n], props.globals.initNode("/FMGC/flightplan[" ~ n ~ "]/wp[" ~ counter ~ "]/distance-from-prev", 0, "DOUBLE")); } me.updatePlans(); + # push update to fuel + if (getprop("/FMGC/internal/block-confirmed")) { + setprop("/FMGC/internal/fuel-calculating", 0); + setprop("/FMGC/internal/fuel-calculating", 1); + } canvas_nd.A3XXRouteDriver.triggerSignal("fp-added"); }, diff --git a/Nasal/MCDU/F-PLN.nas b/Nasal/MCDU/F-PLN.nas index 5be722cd..9ed2d6ce 100644 --- a/Nasal/MCDU/F-PLN.nas +++ b/Nasal/MCDU/F-PLN.nas @@ -391,6 +391,11 @@ var fplnPage = { # this one is only created once, and then updated - remember th if (index == 6) { if (fmgc.flightPlanController.temporaryFlag[me.computer]) { fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0); + # push update to fuel + if (getprop("/FMGC/internal/block-confirmed")) { + setprop("/FMGC/internal/fuel-calculating", 0); + setprop("/FMGC/internal/fuel-calculating", 1); + } } else { if (canvas_mcdu.myLatRev[me.computer] != nil) { canvas_mcdu.myLatRev[me.computer].del();