From 8bf1035d0d6931775b683f7693f780669700f74c Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sat, 18 Apr 2020 00:51:16 +0100 Subject: [PATCH] Acconfig... --- AircraftConfig/acconfig.nas | 2 +- Nasal/ECAM/ECAM-logic.nas | 2 +- Nasal/Systems/APU.nas | 26 +++++++++----------------- Systems/a320-electrical.xml | 2 -- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index d7bb1a9e..6a125ee1 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -347,7 +347,7 @@ var beforestart = func { props.globals.getNode("controls/electrical/switches/bat-1").setValue(1); props.globals.getNode("controls/electrical/switches/bat-2").setValue(1); setprop("controls/apu/master", 1); - systems.APUController.APU.startCommand(1); + systems.APUController.APU.startCommand(); var apu_rpm_chk = setlistener("/engines/engine[2]/n1", func { if (getprop("engines/engine[2]/n1") >= 98) { removelistener(apu_rpm_chk); diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index c818bf70..f921ab66 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -887,7 +887,7 @@ var messages_priority_3 = func { } # EMER CONFIG - if (getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !dualFailNode.getBoolValue() and phaseVar != 4 and phaseVar != 8 and emerconfig.clearFlag == 0) { + if (getprop("systems/electrical/some-electric-thingie/emer-elec-config") and !dualFailNode.getBoolValue() and phaseVar != 4 and phaseVar != 8 and emerconfig.clearFlag == 0 and !getprop("systems/acconfig/autoconfig-running")) { emerconfig.active = 1; if (getprop("systems/hydraulic/sources/rat/position") != 0 and emerconfigMinRat.clearFlag == 0) { diff --git a/Nasal/Systems/APU.nas b/Nasal/Systems/APU.nas index 05e9323f..553c13b5 100644 --- a/Nasal/Systems/APU.nas +++ b/Nasal/Systems/APU.nas @@ -26,7 +26,7 @@ var APU = { listenStopSignal: 0, bleedTime: 0, cooldownEndTime: 0, - startFast: 0, + fastStart: 0, warnings: { lowOilLevel: 0, }, @@ -57,7 +57,6 @@ var APU = { me.signals.bleedWasUsed = 0; me.signals.fault = 0; me.signals.autoshutdown = 0; - me.startFast = 0; checkApuStartTimer.stop(); apuStartTimer.stop(); apuStartTimer2.stop(); @@ -96,15 +95,18 @@ var APU = { }, 3); settimer(func() { me.checkOil }, 8); }, - startCommand: func(fast = 0) { + startCommand: func(fast) { if (me.listenSignals and (me.state == 1 or me.state == 2)) { me.signals.startInProgress.setValue(1); - me.startFast = fast; me.setState(3); checkApuStartTimer.start(); + me.fastStart = fast; } }, - checkApuStart: func(fast) { + checkApuStart: func() { + if (me.fastStart) { + me.inletFlap.setpos(1); + } if (pts.APU.rpm.getValue() < 7 and me.fuelValvePos.getValue() and me.inletFlapPos.getValue() == 1 and me.signals.oilTestComplete and !me.warnings.lowOilLevel) { me.setState(4); me.listenStopSignal = 1; @@ -114,16 +116,6 @@ var APU = { }, startSequence: func() { me.GenericControls.starter.setValue(1); - if (me.startFast) { - setprop("controls/engines/engine[2]/cutoff", 0); - setprop("engines/engine[2]/out-of-fuel", 0); - setprop("engines/engine[2]/run", 1); - - setprop("engines/engine[2]/cutoff", 0); - setprop("engines/engine[2]/starter", 0); - - setprop("fdm/jsbsim/propulsion/set-running", 0); - } apuStartTimer.start(); }, waitStart: func() { @@ -266,13 +258,13 @@ setlistener("controls/apu/master", func() { APUController.APU.stop(); } } -}, 0, 1); +}, 0, 0); setlistener("controls/pneumatic/switches/bleedapu", func() { if (APUController.APU != nil) { APUController.APU.signals.bleedWasUsed = 1; } -}, 0, 1); +}, 0, 0); var checkMasterThreeMinTimer = maketimer(0.1, func() { if (!APUNodes.Controls.master.getValue()) { diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml index 4f83e3d2..ed623d1b 100644 --- a/Systems/a320-electrical.xml +++ b/Systems/a320-electrical.xml @@ -1307,10 +1307,8 @@ /systems/electrical/bus/ac-1 lt 110 /systems/electrical/bus/ac-2 lt 110 - /systems/acconfig/autoconfig-running ne 1 - /systems/acconfig/autoconfig-running ne 1 /systems/electrical/relay/ext-epc/contact-pos eq 0 /controls/electrical/switches/gen-1 eq 0