From 040c72ccb68ba27278a1428ae90b452f05d52d35 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sat, 19 Oct 2019 13:37:16 +0100 Subject: [PATCH] Bugfix electrical system --- Models/Instruments/Lower-ECAM/Lower-ECAM.nas | 4 ++-- Nasal/ECAM.nas | 2 +- Systems/a320-electrical.xml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index 75c2d94b..ff809dd6 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -1701,7 +1701,7 @@ var canvas_lowerECAM_elec = { me["ELEC-Line-AC2-ACESS"].hide(); } - if (tr1_fault.getValue() != 1) { + if (getprop("/systems/electrical/relay/tr-contactor-1/contact-pos") == 1) { if (ac1.getValue() < 110) { me["ELEC-Line-AC1-TR1"].setColorFill(0.7333,0.3803,0); } else { @@ -1714,7 +1714,7 @@ var canvas_lowerECAM_elec = { me["ELEC-Line-TR1-DC1"].hide(); } - if (tr2_fault.getValue() != 1) { + if (getprop("/systems/electrical/relay/tr-contactor-2/contact-pos") == 1) { if (ac2.getValue() < 110) { me["ELEC-Line-AC2-TR2"].setColorFill(0.7333,0.3803,0); } else { diff --git a/Nasal/ECAM.nas b/Nasal/ECAM.nas index 6e0276a2..10affcfe 100644 --- a/Nasal/ECAM.nas +++ b/Nasal/ECAM.nas @@ -249,7 +249,7 @@ var ECAM = { setprop("/ECAM/warning-phase", 3); } else if (phase == 3 and speed >= 80) { setprop("/ECAM/warning-phase", 4); - } else if (phase == 4 and getprop("/fdm/jsbsim/position/wow") == 0) { # Liftoff + } else if ((phase >= 2 and phase <= 4) and getprop("/fdm/jsbsim/position/wow") == 0) { # Liftoff setprop("/ECAM/warning-phase", 5); } else if (phase == 5 and getprop("/position/gear-agl-ft") >= 1500) { setprop("/ECAM/warning-phase", 6); diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml index d7ee8371..127e6951 100644 --- a/Systems/a320-electrical.xml +++ b/Systems/a320-electrical.xml @@ -519,6 +519,7 @@ + /controls/APU/master eq 1 /controls/electrical/switches/apu eq 1 /systems/electrical/sources/apu/output-volt ge 110 /systems/electrical/sources/apu/output-volt lt 130 @@ -992,7 +993,7 @@ /systems/electrical/relay/tr-contactor-2/output lt 25 /systems/electrical/relay/emer-glc/output ge 110 - /systems/electrical/sources/ess-tr/output-volt ge 110 + /systems/electrical/sources/ess-tr/output-volt ge 25