1
0
Fork 0

Merge branch 'dev' into 3D

This commit is contained in:
Jonathan Redpath 2021-12-31 16:34:21 +00:00
commit 64774b2b8e
8 changed files with 393 additions and 49 deletions

View file

@ -1294,7 +1294,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(eng1FailRelight);
}
if (warningNodes.Logic.eng1Shutdown.getValue() and eng1ShutDown.clearFlag == 0) {
if (warningNodes.Logic.eng1Shutdown.getValue() and !warningNodes.Logic.eng1Fail.getValue() and eng1ShutDown.clearFlag == 0) {
eng1ShutDown.active = 1;
if (phaseVar2 != 4 and phaseVar2 != 5 and systems.fireButtons[0].getValue() == 0 and (systems.PNEU.Valves.wingLeft.getValue() or systems.PNEU.Valves.wingRight.getValue())) {
@ -1501,7 +1501,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(eng2FailRelight);
}
if (warningNodes.Logic.eng2Shutdown.getValue() and eng2ShutDown.clearFlag == 0) {
if (warningNodes.Logic.eng2Shutdown.getValue() and !warningNodes.Logic.eng2Fail.getValue() and eng2ShutDown.clearFlag == 0) {
eng2ShutDown.active = 1;
if (phaseVar2 != 4 and phaseVar2 != 5 and systems.fireButtons[1].getValue() == 0 and (systems.PNEU.Valves.wingLeft.getValue() or systems.PNEU.Valves.wingRight.getValue())) {
@ -2950,18 +2950,19 @@ var messages_priority_2 = func {
if (wingIceSysFault.clearFlag == 0 and warningNodes.Logic.waiSysfault.getBoolValue() and (phaseVar2 <= 2 or phaseVar2 >= 9 or phaseVar2 == 6)) {
wingIceSysFault.active = 1;
if ((warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and warningNodes.Logic.procWaiShutdown.getValue() == 1) {
if (wingIceSysFaultXbld.clearFlag == 0 and (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and warningNodes.Logic.procWaiShutdown.getValue() == 1) {
wingIceSysFaultXbld.active = 1;
} else {
ECAM_controller.warningReset(wingIceSysFaultXbld);
}
if ((warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and wing_pb.getValue()) {
if (wingIceSysFaultOff.clearFlag == 0 and (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and wing_pb.getValue()) {
wingIceSysFaultOff.active = 1;
} else {
ECAM_controller.warningReset(wingIceSysFaultOff);
}
if (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) {
if (wingIceSysFaultIcing.clearFlag == 0 and (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue())) {
wingIceSysFaultIcing.active = 1;
} else {
ECAM_controller.warningReset(wingIceSysFaultIcing);
@ -2973,10 +2974,158 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(wingIceSysFaultIcing);
}
if (wingIceLOpen.clearFlag == 0 and warningNodes.Logic.waiLopen.getBoolValue() and (phaseVar2 <= 3 or phaseVar2 >= 9 or phaseVar2 == 6)) {
wingIceLOpen.active = 1;
if (wingIceLOpenOff.clearFlag == 0 and wing_pb.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 9)) {
wingIceLOpenOff.active = 1;
} else {
ECAM_controller.warningReset(wingIceLOpenOff);
}
if (FWC.Timer.gnd.getValue() == 1) {
if (wingIceLOpenEngOff.clearFlag == 0 and systems.PNEU.Switch.bleed1.getBoolValue()) {
wingIceLOpenEngOff.active = 1;
} else {
ECAM_controller.warningReset(wingIceLOpenEngOff);
}
if (wingIceLOpenXbld.clearFlag == 0 and systems.PNEU.Valves.crossbleed.getValue() != 0) {
wingIceLOpenXbld.active = 1;
} else {
ECAM_controller.warningReset(wingIceLOpenXbld);
}
if (wingIceLOpenApuOff.clearFlag == 0 and systems.PNEU.Valves.apu.getValue() != 0) {
wingIceLOpenApuOff.active = 1;
} else {
ECAM_controller.warningReset(wingIceLOpenApuOff);
}
} else {
ECAM_controller.warningReset(wingIceLOpenEngOff);
ECAM_controller.warningReset(wingIceLOpenXbld);
ECAM_controller.warningReset(wingIceLOpenApuOff);
}
if (wingIceLOpenFlt.clearFlag == 0 and phaseVar2 != 9 and phaseVar2 != 10 and (wing_pb.getValue() == 0 or FWC.Timer.gnd.getValue() == 1)) {
wingIceLOpenFlt.active = 1;
} else {
ECAM_controller.warningReset(wingIceLOpenFlt);
}
if (FWC.Timer.gnd.getValue() != 1) {
if (wingIceLOpenEngOn.clearFlag == 0 and !systems.PNEU.Switch.bleed1.getBoolValue()) {
wingIceLOpenEngOn.active = 1;
} else {
ECAM_controller.warningReset(wingIceLOpenEngOn);
}
if (wingIceLOpenIceReq.clearFlag == 0 and !wing_pb.getValue()) {
wingIceLOpenIceReq.active = 1;
} else {
ECAM_controller.warningReset(wingIceLOpenIceReq);
}
if (wingIceLOpenThrust.clearFlag == 0 and systems.PNEU.Switch.bleed1.getBoolValue() and !wing_pb.getValue()) {
wingIceLOpenThrust.active = 1;
} else {
ECAM_controller.warningReset(wingIceLOpenThrust);
}
} else {
ECAM_controller.warningReset(wingIceLOpenEngOn);
ECAM_controller.warningReset(wingIceLOpenIceReq);
ECAM_controller.warningReset(wingIceLOpenThrust);
}
} else {
ECAM_controller.warningReset(wingIceLOpen);
ECAM_controller.warningReset(wingIceLOpenOff);
ECAM_controller.warningReset(wingIceLOpenEngOff);
ECAM_controller.warningReset(wingIceLOpenXbld);
ECAM_controller.warningReset(wingIceLOpenApuOff);
ECAM_controller.warningReset(wingIceLOpenFlt);
ECAM_controller.warningReset(wingIceLOpenEngOn);
ECAM_controller.warningReset(wingIceLOpenIceReq);
ECAM_controller.warningReset(wingIceLOpenThrust);
}
if (wingIceROpen.clearFlag == 0 and warningNodes.Logic.waiRopen.getBoolValue() and (phaseVar2 <= 3 or phaseVar2 >= 9 or phaseVar2 == 6)) {
wingIceROpen.active = 1;
if (wingIceROpenOff.clearFlag == 0 and wing_pb.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 9)) {
wingIceROpenOff.active = 1;
} else {
ECAM_controller.warningReset(wingIceROpenOff);
}
if (FWC.Timer.gnd.getValue() == 1) {
if (wingIceROpenEngOff.clearFlag == 0 and systems.PNEU.Switch.bleed2.getBoolValue()) {
wingIceROpenEngOff.active = 1;
} else {
ECAM_controller.warningReset(wingIceROpenEngOff);
}
if (wingIceROpenXbld.clearFlag == 0 and systems.PNEU.Valves.crossbleed.getValue() != 0) {
wingIceROpenXbld.active = 1;
} else {
ECAM_controller.warningReset(wingIceROpenXbld);
}
if (wingIceROpenApuOff.clearFlag == 0 and systems.PNEU.Valves.apu.getValue() != 0) {
wingIceROpenApuOff.active = 1;
} else {
ECAM_controller.warningReset(wingIceROpenApuOff);
}
} else {
ECAM_controller.warningReset(wingIceROpenEngOff);
ECAM_controller.warningReset(wingIceROpenXbld);
ECAM_controller.warningReset(wingIceROpenApuOff);
}
if (wingIceROpenFlt.clearFlag == 0 and phaseVar2 != 9 and phaseVar2 != 10 and (wing_pb.getValue() == 0 or FWC.Timer.gnd.getValue() == 1)) {
wingIceROpenFlt.active = 1;
} else {
ECAM_controller.warningReset(wingIceROpenFlt);
}
if (FWC.Timer.gnd.getValue() != 1) {
if (wingIceROpenEngOn.clearFlag == 0 and !systems.PNEU.Switch.bleed2.getBoolValue()) {
wingIceROpenEngOn.active = 1;
} else {
ECAM_controller.warningReset(wingIceROpenEngOn);
}
if (wingIceROpenIceReq.clearFlag == 0 and !wing_pb.getValue()) {
wingIceROpenIceReq.active = 1;
} else {
ECAM_controller.warningReset(wingIceROpenIceReq);
}
if (wingIceROpenThrust.clearFlag == 0 and systems.PNEU.Switch.bleed2.getBoolValue() and !wing_pb.getValue()) {
wingIceROpenThrust.active = 1;
} else {
ECAM_controller.warningReset(wingIceROpenThrust);
}
} else {
ECAM_controller.warningReset(wingIceROpenEngOn);
ECAM_controller.warningReset(wingIceROpenIceReq);
ECAM_controller.warningReset(wingIceROpenThrust);
}
} else {
ECAM_controller.warningReset(wingIceROpen);
ECAM_controller.warningReset(wingIceROpenOff);
ECAM_controller.warningReset(wingIceROpenEngOff);
ECAM_controller.warningReset(wingIceROpenXbld);
ECAM_controller.warningReset(wingIceROpenApuOff);
ECAM_controller.warningReset(wingIceROpenFlt);
ECAM_controller.warningReset(wingIceROpenEngOn);
ECAM_controller.warningReset(wingIceROpenIceReq);
ECAM_controller.warningReset(wingIceROpenThrust);
}
if (wingIceOpenGnd.clearFlag == 0 and warningNodes.Logic.waiGndFlight.getValue() and (phaseVar2 <= 2 or phaseVar2 >= 9)) {
wingIceOpenGnd.active = 1;
if (pts.Gear.wow[1].getValue() and wing_pb.getValue()) {
if (FWC.Timer.gnd.getValue() == 1 and wing_pb.getValue()) {
wingIceOpenGndShut.active = 1;
} else {
ECAM_controller.warningReset(wingIceOpenGndShut);

View file

@ -543,20 +543,9 @@ var warnings = std.Vector.new([
var fac2FaultSuccess = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
var fac2FaultFacOff = warning.new(msg: " -FAC 2..............OFF", colour: "c"),
var yawDamper1Fault = warning.new(msg: "AUTO FLT YAW DAMPER 1", colour: "a", isMainMsg: 1),
var yawDamper2Fault = warning.new(msg: "AUTO FLT YAW DAMPER 2", colour: "a", isMainMsg: 1),
# var rudTrim1Fault = warning.new(msg: "AUTO FLT RUD TRIM1 FAULT", colour: "a", isMainMsg: 1), not implemented
# var rudTrim2Fault = warning.new(msg: "AUTO FLT RUD TRIM2 FAULT", colour: "a", isMainMsg: 1), not implemented
var rudTravLimSys1Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 1", colour: "a", isMainMsg: 1),
var rudTravLimSys2Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 2", colour: "a", isMainMsg: 1),
# FCU fault
var fcuFault = warning.new(msg: "AUTO FLT FCU 1+2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var fcuFaultBaro = warning.new(msg: " -PFD BARO REF: STD ONLY", colour: "c"),
var fcuFault1 = warning.new(msg: "AUTO FLT FCU 1 FAULT", colour: "a", isMainMsg: 1),
var fcuFault1Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"),
var fcuFault2 = warning.new(msg: "AUTO FLT FCU 2 FAULT", colour: "a", isMainMsg: 1),
var fcuFault2Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"),
# FUEL
var wingLoLvl = warning.new(msg: "FUEL L+R WING TK LO LVL", colour: "a", aural: 1, light: 1, isMainMsg: 1),
@ -691,7 +680,6 @@ var warnings = std.Vector.new([
var wingIceLOpenEngOff = warning.new(msg: " -ENG1 BLEED.........OFF", colour: "c"),
var wingIceLOpenXbld = warning.new(msg: " -X BLEED...........SHUT", colour: "c"),
var wingIceLOpenApuOff = warning.new(msg: " -APU BLEED..........OFF", colour: "c"),
var wingIceLOpenSpacer = warning.new(msg: " ", colour: "c"),
var wingIceLOpenFlt = warning.new(msg: " WAI AVAIL IN FLT", colour: "c"),
var wingIceLOpenEngOn = warning.new(msg: " -ENG1 BLEED.........OFF", colour: "c"),
var wingIceLOpenIceReq = warning.new(msg: " -WING ANTI ICE..AS RQRD", colour: "c"),
@ -701,13 +689,24 @@ var warnings = std.Vector.new([
var wingIceROpenEngOff = warning.new(msg: " -ENG2 BLEED.........OFF", colour: "c"),
var wingIceROpenXbld = warning.new(msg: " -X BLEED...........SHUT", colour: "c"),
var wingIceROpenApuOff = warning.new(msg: " -APU BLEED..........OFF", colour: "c"),
var wingIceROpenSpacer = warning.new(msg: " ", colour: "c"),
var wingIceROpenFlt = warning.new(msg: " WAI AVAIL IN FLT", colour: "c"),
var wingIceROpenEngOn = warning.new(msg: " -ENG2 BLEED.........OFF", colour: "c"),
var wingIceROpenIceReq = warning.new(msg: " -WING ANTI ICE..AS RQRD", colour: "c"),
var wingIceROpenThrust = warning.new(msg: " THRUST LIM PENALTY", colour: "c"),
var wingIceOpenGnd = warning.new(msg: "WING A.ICE OPEN ON GND", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var wingIceOpenGndShut = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"),
var yawDamper1Fault = warning.new(msg: "AUTO FLT YAW DAMPER 1", colour: "a", isMainMsg: 1),
var yawDamper2Fault = warning.new(msg: "AUTO FLT YAW DAMPER 2", colour: "a", isMainMsg: 1),
# var rudTrim1Fault = warning.new(msg: "AUTO FLT RUD TRIM1 FAULT", colour: "a", isMainMsg: 1), not implemented
# var rudTrim2Fault = warning.new(msg: "AUTO FLT RUD TRIM2 FAULT", colour: "a", isMainMsg: 1), not implemented
var rudTravLimSys1Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 1", colour: "a", isMainMsg: 1),
var rudTravLimSys2Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 2", colour: "a", isMainMsg: 1),
var fcuFault1 = warning.new(msg: "AUTO FLT FCU 1 FAULT", colour: "a", isMainMsg: 1),
var fcuFault1Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"),
var fcuFault2 = warning.new(msg: "AUTO FLT FCU 2 FAULT", colour: "a", isMainMsg: 1),
var fcuFault2Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"),
var wingIceLHiPr = warning.new(msg: "WING A.ICE L HI PR", colour: "a", isMainMsg: 1),
var wingIceLHiPrThrust = warning.new(msg: " THRUST LIM PENTALTY", colour: "c"),
var wingIceRHiPr = warning.new(msg: "WING A.ICE R HI PR", colour: "a", isMainMsg: 1),

View file

@ -90,6 +90,8 @@ var warningNodes = {
bleed2LoTempPack: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-pack"),
bleed2WaiAvail: props.globals.initNode("/ECAM/warnings/logic/bleed-2-wai-avail"),
waiSysfault: props.globals.initNode("/ECAM/warnings/logic/wing-anti-ice-sys-fault"),
waiLopen: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-left-open"),
waiRopen: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-right-open"),
waiLclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-left-closed"),
waiRclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-right-closed"),
procWaiShutdown: props.globals.initNode("/ECAM/warnings/logic/proc-wai-shutdown-output"),

View file

@ -1188,8 +1188,7 @@ setlistener("/systems/navigation/adr/operating-3", func() {
setlistener("/FMGC/internal/block-calculating", func() {
if (timer3blockFuel.isRunning) {
FMGCInternal.blockFuelTime = -99;
timer3blockFuel.start();
FMGCInternal.blockFuelTime = pts.Sim.Time.elapsedSec.getValue();
timer3blockFuel.stop();
}
if (FMGCInternal.blockFuelTime == -99) {
@ -1202,8 +1201,7 @@ setlistener("/FMGC/internal/block-calculating", func() {
setlistener("/FMGC/internal/fuel-calculating", func() {
if (timer5fuelPred.isRunning) {
FMGCInternal.fuelPredTime = -99;
timer5fuelPred.start();
FMGCInternal.fuelPredTime = pts.Sim.Time.elapsedSec.getValue();
timer5fuelPred.stop();
}
if (FMGCInternal.fuelPredTime == -99) {

View file

@ -1559,7 +1559,12 @@ var button = func(btn, i, event = "") {
} else if (btn == "DOT") {
mcdu_scratchpad.scratchpads[i].addChar(".");
} else if (btn == "PLUSMINUS") {
if (right(mcdu_scratchpad.scratchpads[i].scratchpad, 1) == "-") {
mcdu_scratchpad.scratchpads[i].clear();
mcdu_scratchpad.scratchpads[i].addChar("+");
} else {
mcdu_scratchpad.scratchpads[i].addChar("-");
}
} else {
mcdu_scratchpad.scratchpads[i].addChar(btn);
}

View file

@ -208,14 +208,14 @@
<rate_limit sense="incr">0.04</rate_limit> <!-- 25 seconds -->
</actuator>
<actuator name="/ECAM/warnings/logic/wing-anti-ice-left-closed-set">
<actuator name="/ECAM/warnings/logic/wing-anti-ice-left-closed-set-timer">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/wing-anti-ice-left-closed-set-input</input>
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.066666</rate_limit> <!-- 15 seconds -->
</actuator>
<actuator name="/ECAM/warnings/logic/wing-anti-ice-right-closed-set">
<actuator name="/ECAM/warnings/logic/wing-anti-ice-right-closed-set-timer">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/wing-anti-ice-right-closed-set-input</input>
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
@ -361,6 +361,20 @@
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.5</rate_limit> <!-- 2 seconds -->
</actuator>
<actuator name="/ECAM/warnings/logic/wing-anti-ice-left-open-set-15">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/wing-anti-ice-left-open-set-15-input</input>
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.06666666666</rate_limit> <!-- 15 seconds -->
</actuator>
<actuator name="/ECAM/warnings/logic/wing-anti-ice-right-open-set-15">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/wing-anti-ice-right-open-set-15-input</input>
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.06666666666</rate_limit> <!-- 15 seconds -->
</actuator>
</channel>
<channel name="ECAM" execrate="16">
@ -786,7 +800,7 @@
<switch name="/ECAM/warnings/logic/wai-ground-pulse-set">
<default value="0"/>
<test logic="AND" value="1">
/gear/gear[1]/wow eq 0
/ECAM/timer/ground-calc ne 1
/controls/ice-protection/wing eq 1
</test>
</switch>
@ -805,13 +819,20 @@
/ECAM/warnings/logic/wai-ground-pulse-set eq 1
</test>
<test logic="AND">
/gear/gear[1]/wow eq 1
/ECAM/timer/ground-calc eq 1
/ECAM/warnings/timer/wing-anti-ice-25 ne 1
</test>
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-left-closed-set">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/logic/wing-anti-ice-left-closed-set-timer eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-right-closed-set-input">
<default value="0"/>
<test logic="AND" value="1">
@ -833,6 +854,14 @@
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-right-closed-set">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/logic/wing-anti-ice-right-closed-set-timer eq 1
</test>
</switch>
<switch name="/ECAM/warnings/timer/phase-1-input">
<default value="0"/>
<test value="1">
@ -868,7 +897,7 @@
<defualt value="0"/>
<test logic="AND" value="1">
/controls/ice-protection/wing eq 1
/gear/gear[1]/wow eq 1
/ECAM/timer/ground-calc eq 1
/ECAM/warnings/logic/wai-on eq 1
</test>
</switch>
@ -889,14 +918,14 @@
/controls/engines/engine[1]/fire-btn eq 0
/ECAM/warnings/logic/wai-ground-pulse eq 1
/ECAM/warnings/logic/wai-ground-pulse-set eq 1
<test logic="OR">
<test logic="OR"> <!-- XOR -->
<test logic="AND">
/engines/engine[0]/state eq 3
/engines/engine[1]/state ne 3 <!-- TODO this must use ENG 1 FAIL from the ECAM warning see page 2856 of ESLD -->
/ECAM/warnings/logic/eng/eng-1-shutdown eq 1
/ECAM/warnings/logic/eng/eng-2-shutdown eq 0
</test>
<test logic="AND">
/engines/engine[0]/state ne 3
/engines/engine[1]/state eq 3
/ECAM/warnings/logic/eng/eng-1-shutdown eq 0
/ECAM/warnings/logic/eng/eng-2-shutdown eq 1
</test>
</test>
</test>
@ -931,6 +960,20 @@
</test>
</switch>
<switch name="/ECAM/warnings/logic/phase-6-pulse-input">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warning-phase eq 6
</test>
</switch>
<switch name="/ECAM/warnings/logic/phase-9-pulse-input">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warning-phase eq 9
</test>
</switch>
<switch name="/ECAM/warnings/logic/wai-phase-9-pulse-input">
<default value="0"/>
<test logic="AND" value="1">
@ -959,11 +1002,106 @@
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-left-open-set-15-input">
<default value="0"/>
<test logic="AND" value="1">
/systems/pneumatics/valves/wing-ice-1 ne 0
<test logic="OR">
/ECAM/warnings/logic/wai-on eq 0
<!--<test logic="AND">
/ECAM/warnings/logic/wai-on eq 1
/ECAM/timer/ground-calc eq 1
PREC = 1
</test>-->
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-left-open-set">
<default value="0"/>
<test logic="AND" value="1">
/systems/electrical/bus/dc-ess-shed ge 25
/ECAM/warnings/logic/wing-anti-ice-left-open-set-15 eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-left-open-reset">
<default value="0"/>
<test logic="OR" value="1">
/systems/pneumatics/valves/wing-ice-1 eq 0
/ECAM/warnings/timer/phase-1 eq 1
<test logic="AND">
<test logic="AND">
/ECAM/warnings/logic/wai-phase-9-pulse-input eq 1
/ECAM/warnings/logic/wai-phase-9-pulse eq 1
</test>
/systems/pneumatics/valves/wing-ice-1 ne 0
/controls/pneumatics/switches/bleed-1 eq 1
</test>
<test logic="AND">
/systems/pneumatics/valves/wing-ice-1 ne 0
/controls/pneumatics/switches/bleed-1 eq 0
<test logic="AND">
/ECAM/warnings/logic/wai-phase-9-pulse-input eq 1
/ECAM/warnings/logic/wai-phase-9-pulse eq 1
</test>
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-right-open-set-15-input">
<default value="0"/>
<test logic="AND" value="1">
/systems/pneumatics/valves/wing-ice-2 ne 0
<test logic="OR">
/ECAM/warnings/logic/wai-on eq 0
<!--<test logic="AND">
/ECAM/warnings/logic/wai-on eq 1
/ECAM/timer/ground-calc eq 1
PREC = 1
</test>-->
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-right-open-set">
<default value="0"/>
<test logic="AND" value="1">
/systems/electrical/bus/dc-ess-shed ge 25
/ECAM/warnings/logic/wing-anti-ice-right-open-set-15 eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-right-open-reset">
<default value="0"/>
<test logic="OR" value="1">
/systems/pneumatics/valves/wing-ice-2 eq 0
/ECAM/warnings/timer/phase-1 eq 1
<test logic="AND">
<test logic="AND">
/ECAM/warnings/logic/wai-phase-9-pulse-input eq 1
/ECAM/warnings/logic/wai-phase-9-pulse eq 1
</test>
/systems/pneumatics/valves/wing-ice-2 ne 0
/controls/pneumatics/switches/bleed-2 eq 1
</test>
<test logic="AND">
/systems/pneumatics/valves/wing-ice-2 ne 0
/controls/pneumatics/switches/bleed-2 eq 0
<test logic="AND">
/ECAM/warnings/logic/wai-phase-9-pulse-input eq 1
/ECAM/warnings/logic/wai-phase-9-pulse eq 1
</test>
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-hi-pr-left-input">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/logic/wai-on eq 1
/systems/pneumatics/psi/engine-1-psi gt 49 <!-- rando number -->
/systems/pneumatics/psi/engine-1-psi gt 49
</test>
</switch>

View file

@ -459,13 +459,13 @@
<switch name="/systems/pneumatics/valves/wing-ice-1-power">
<default value="0"/>
<test logic="AND" value="1">
<test logic="AND" value="10">
/systems/startup-power-valves eq 1
</test>
<test logic="OR" value="0">
/systems/failures/icing/wing-left-valve eq 1
</test>
<test logic="AND" value="0.5">
<test logic="AND" value="0.333">
<test logic="OR">
/systems/electrical/bus/dc-ess-shed lt 25
/systems/pneumatics/psi/engine-1-psi le 1
@ -473,7 +473,7 @@
/systems/pneumatics/valves/wing-ice-1-cmd eq 0
/systems/pneumatics/valves/wing-ice-1 ne 0
</test>
<test logic="AND" value="2">
<test logic="AND" value="0.333">
/systems/electrical/bus/dc-ess-shed ge 25
</test>
</switch>
@ -501,13 +501,13 @@
<switch name="/systems/pneumatics/valves/wing-ice-2-power">
<default value="0"/>
<test logic="AND" value="1">
<test logic="AND" value="10">
/systems/startup-power-valves eq 1
</test>
<test logic="OR" value="0">
/systems/failures/icing/wing-right-valve eq 1
</test>
<test logic="AND" value="0.5">
<test logic="AND" value="0.333">
<test logic="OR">
/systems/electrical/bus/dc-ess-shed lt 25
/systems/pneumatics/psi/engine-2-psi le 1
@ -515,7 +515,7 @@
/systems/pneumatics/valves/wing-ice-2-cmd eq 0
/systems/pneumatics/valves/wing-ice-2 ne 0
</test>
<test logic="AND" value="2">
<test logic="AND" value="0.333">
/systems/electrical/bus/dc-ess-shed ge 25
</test>
</switch>
@ -540,13 +540,13 @@
<switch name="/systems/pneumatics/valves/engine-ice-1-power">
<default value="0"/>
<test logic="AND" value="1">
<test logic="AND" value="10">
/systems/startup-power-valves eq 1
</test>
<test logic="OR" value="0">
/systems/failures/icing/engine-left-valve eq 1
</test>
<test logic="AND" value="0.50">
<test logic="AND" value="0.5">
<test logic="OR">
/systems/electrical/bus/dc-1 lt 25
/systems/pneumatics/source/engine-1-hp-psi lt 7
@ -554,7 +554,7 @@
/systems/pneumatics/valves/engine-ice-1-cmd eq 1
/systems/pneumatics/valves/engine-ice-1 ne 1
</test>
<test logic="AND" value="1.0">
<test logic="AND" value="0.5">
/systems/electrical/bus/dc-1 ge 25
</test>
</switch>
@ -579,13 +579,13 @@
<switch name="/systems/pneumatics/valves/engine-ice-2-power">
<default value="0"/>
<test logic="AND" value="1">
<test logic="AND" value="10">
/systems/startup-power-valves eq 1
</test>
<test logic="OR" value="0">
/systems/failures/icing/engine-right-valve eq 1
</test>
<test logic="AND" value="0.50">
<test logic="AND" value="0.5">
<test logic="OR">
/systems/electrical/bus/dc-2 lt 25
/systems/pneumatics/source/engine-2-hp-psi lt 7
@ -593,7 +593,7 @@
/systems/pneumatics/valves/engine-ice-2-cmd eq 1
/systems/pneumatics/valves/engine-ice-2 ne 1
</test>
<test logic="AND" value="1.0">
<test logic="AND" value="0.5">
/systems/electrical/bus/dc-2 ge 25
</test>
</switch>
@ -1297,8 +1297,11 @@
<switch name="/controls/ice-protection/wingfault">
<default value="0"/>
<test logic="OR" value="1">
/systems/pneumatics/valves/wing-ice-1 ne /controls/ice-protection/wing
/systems/pneumatics/valves/wing-ice-2 ne /controls/ice-protection/wing
/ECAM/warnings/logic/wing-anti-ice-sys-fault eq 1
/ECAM/warnings/flipflop/wing-anti-ice-left-open eq 1
/ECAM/warnings/flipflop/wing-anti-ice-right-open eq 1
/systems/pneumatics/valves/wing-ice-1 ne /systems/pneumatics/valves/wing-ice-1-cmd
/systems/pneumatics/valves/wing-ice-2 ne /systems/pneumatics/valves/wing-ice-2-cmd
/systems/electrical/bus/dc-ess-shed lt 25
</test>
</switch>

View file

@ -597,6 +597,28 @@
<output>/ECAM/warnings/logic/wai-phase-9-pulse</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>1.0</value>
</time>
<S>
<not><property>/ECAM/warnings/logic/phase-6-pulse-input</property></not>
</S>
<output>/ECAM/warnings/logic/phase-6-pulse</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>1.0</value>
</time>
<S>
<not><property>/ECAM/warnings/logic/phase-9-pulse-input</property></not>
</S>
<output>/ECAM/warnings/logic/phase-9-pulse</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
@ -708,6 +730,34 @@
<output>/ECAM/warnings/logic/wing-anti-ice-flipflop</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<equals>
<property>/ECAM/warnings/logic/wing-anti-ice-left-open-set</property>
<value>1</value>
</equals>
</S>
<R>
<property>/ECAM/warnings/logic/wing-anti-ice-left-open-reset</property>
</R>
<output>/ECAM/warnings/flipflop/wing-anti-ice-left-open</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<equals>
<property>/ECAM/warnings/logic/wing-anti-ice-right-open-set</property>
<value>1</value>
</equals>
</S>
<R>
<property>/ECAM/warnings/logic/wing-anti-ice-right-open-reset</property>
</R>
<output>/ECAM/warnings/flipflop/wing-anti-ice-right-open</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>