From 317120d3191f962e169fc39869373d105be91a14 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Fri, 8 Nov 2019 18:33:31 +0000 Subject: [PATCH] ECAM memos about fuel --- Nasal/ECAM/ECAM-logic.nas | 24 +++++++++++++++--------- Nasal/ECAM/ECAM-messages.nas | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index b531b6a6..4f87bdac 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -1335,43 +1335,49 @@ var messages_config_memo = func { var messages_memo = func { phaseVar = phaseNode.getValue(); - if (getprop("/services/fuel-truck/enable") == 1) { + if (getprop("/services/fuel-truck/enable") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { refuelg.active = 1; } else { refuelg.active = 0; } - if (getprop("/controls/flight/speedbrake-arm") == 1) { + if (getprop("/controls/flight/speedbrake-arm") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { gnd_splrs.active = 1; } else { gnd_splrs.active = 0; } - if (getprop("/controls/lighting/seatbelt-sign") == 1) { + if (getprop("/controls/lighting/seatbelt-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { seatbelts.active = 1; } else { seatbelts.active = 0; } - if (getprop("/controls/lighting/no-smoking-sign") == 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed! + if (getprop("/controls/lighting/no-smoking-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed! nosmoke.active = 1; } else { nosmoke.active = 0; } - if (getprop("/controls/lighting/strobe") == 0 and getprop("/gear/gear[1]/wow") == 0) { # todo: use gear branch properties + if (getprop("/controls/lighting/strobe") == 0 and getprop("/gear/gear[1]/wow") == 0 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # todo: use gear branch properties strobe_lt_off.active = 1; } else { strobe_lt_off.active = 0; } + + if (systems.FUEL.Valves.transfer1.getValue() == 1 or systems.FUEL.Valves.transfer2.getValue() == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { + outr_tk_fuel_xfrd.active = 1; + } else { + outr_tk_fuel_xfrd.active = 0; + } - if (getprop("/consumables/fuel/total-fuel-lbs") < 6000) { # assuming US short ton 2000lb + if (getprop("/consumables/fuel/total-fuel-lbs") < 6000 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # assuming US short ton 2000lb fob_3T.active = 1; } else { fob_3T.active = 0; } - if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1) { + if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { gpws_flap_mode_off.active = 1; } else { gpws_flap_mode_off.active = 0; @@ -1542,7 +1548,7 @@ var messages_right_memo = func { auto_brk_max.active = 0; } - if (getprop("/systems/fuel/valves/crossfeed-valve") == 1 and getprop("/controls/fuel/switches/crossfeed") == 1) { + if (getprop("/systems/fuel/valves/crossfeed-valve") != 0 and getprop("/controls/fuel/switches/crossfeed") == 1) { fuelx.active = 1; } else { fuelx.active = 0; @@ -1560,7 +1566,7 @@ var messages_right_memo = func { gpws_flap3.active = 0; } - if (phaseVar >= 2 and phaseVar <= 9 and getprop("/systems/fuel/only-use-ctr-tank") == 1 and getprop("/systems/electrical/bus/ac-1") >= 115 and getprop("/systems/electrical/bus/ac-2") >= 115) { + if (phaseVar >= 2 and phaseVar <= 9 and systems.electrical.Bus.ac1.getValue() >= 110 and systems.electrical.Bus.ac2.getValue() >= 110 and (getprop("/systems/fuel/feed-center-1") or getprop("/systems/fuel/feed-center-2"))) { ctr_tk_feedg.active = 1; } else { ctr_tk_feedg.active = 0; diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas index 5f69f8cf..54832420 100644 --- a/Nasal/ECAM/ECAM-messages.nas +++ b/Nasal/ECAM/ECAM-messages.nas @@ -267,7 +267,7 @@ var leftmemos = std.Vector.new([ var seatbelts = warning.new(msg: "SEAT BELTS" ), var nosmoke = warning.new(msg: "NO SMOKING" ), var strobe_lt_off = warning.new(msg: "STROBE LT OFF" ), - var outr_tk_fuel_xfrd = warning.new(msg: "OUTR TK FUEL XFRD" ), # Not yet implemented + var outr_tk_fuel_xfrd = warning.new(msg: "OUTR TK FUEL XFRD" ), var fob_3T = warning.new(msg: "FOB BELOW 3T" ), var gpws_flap_mode_off = warning.new(msg: "GPWS FLAP MODE OFF" ), var atc_datalink_stby = warning.new(msg: "ATC DATALINK STBY" ), # Not yet implemented