1
0
Fork 0

Proper APU valve display on fuel page

This commit is contained in:
legoboyvdlp R 2020-04-17 21:56:12 +01:00
parent 37d0c86167
commit 04fb699371
4 changed files with 50 additions and 20 deletions

View file

@ -2294,7 +2294,7 @@ var canvas_lowerECAM_fuel = {
getKeys: func() {
return["TAT","SAT","GW","UTCh","UTCm","GW-weight-unit","FUEL-Pump-Left-1","FUEL-Pump-Left-2","FUEL-Pump-Center-1","FUEL-Pump-Center-2","FUEL-Pump-Right-1","FUEL-Pump-Right-2","FUEL-Left-blocked","FUEL-Right-blocked","FUEL-Center-blocked","FUEL-Left-Transfer",
"FUEL-Right-Transfer","FUEL-Left-Outer-Inacc","FUEL-Left-Inner-Inacc","FUEL-Center-Inacc","FUEL-Right-Inner-Inacc","FUEL-Right-Outer-Inacc","FUEL-Left-Outer-quantity","FUEL-Left-Inner-quantity","FUEL-Center-quantity","FUEL-Right-Inner-quantity",
"FUEL-Right-Outer-quantity","FUEL-On-Board","FUEL-Flow-per-min","FUEL-APU-arrow","FUEL-APU-label","FUEL-used-1","FUEL-used-both","FUEL-used-2","FUEL-ENG-Master-1","FUEL-ENG-Master-2","FUEL-XFEED","FUEL-XFEED-pipes","FUEL-Left-Outer-temp",
"FUEL-Right-Outer-quantity","FUEL-On-Board","FUEL-Flow-per-min","FUEL-APU-arrow","FUEL-APU-line","FUEL-APU-label","FUEL-used-1","FUEL-used-both","FUEL-used-2","FUEL-ENG-Master-1","FUEL-ENG-Master-2","FUEL-XFEED","FUEL-XFEED-pipes","FUEL-Left-Outer-temp",
"FUEL-Left-Inner-temp","FUEL-Right-Inner-temp","FUEL-Right-Outer-temp","FUEL-Pump-Left-1-Closed","FUEL-Pump-Left-1-Open","FUEL-Pump-Left-2-Closed","FUEL-Pump-Left-2-Open","FUEL-Pump-Center-1-Open","FUEL-Pump-Center-1-Closed","FUEL-Pump-Center-2-Closed",
"FUEL-Pump-Center-2-Open","FUEL-Pump-Right-1-Closed","FUEL-Pump-Right-1-Open","FUEL-Pump-Right-2-Closed","FUEL-Pump-Right-2-Open","FUEL-ENG-1-label","FUEL-ENG-2-label","FUEL-ENG-1-pipe","FUEL-ENG-2-pipe","ENG1idFFlow","ENG2idFFlow","FUEL-used-1","FUEL-used-2","FUEL-used-both",
"Fused-weight-unit","FFlow-weight-unit","FOB-weight-unit"];
@ -2528,6 +2528,30 @@ var canvas_lowerECAM_fuel = {
} else {
me["FUEL-Center-blocked"].hide();
}
# APU
if (systems.FUEL.Valves.apu.getValue() == 1 and systems.APUNodes.Controls.master.getValue() and !systems.APUNodes.Controls.fire.getValue()) {
me["FUEL-APU-label"].setColor(0.8078, 0.8039, 0.8078);
me["FUEL-APU-line"].setColor(0.0509,0.7529,0.2941);
me["FUEL-APU-arrow"].setColor(0.0509,0.7529,0.2941);
me["FUEL-APU-line"].show();
me["FUEL-APU-arrow"].show();
} elsif (systems.FUEL.Valves.apu.getValue() == 1 and (!systems.APUNodes.Controls.master.getValue() or systems.APUNodes.Controls.fire.getValue())) {
me["FUEL-APU-label"].setColor(0.7333,0.3803,0);
me["FUEL-APU-line"].setColor(0.7333,0.3803,0);
me["FUEL-APU-arrow"].setColor(0.7333,0.3803,0);
me["FUEL-APU-line"].show();
me["FUEL-APU-arrow"].show();
} elsif (systems.FUEL.Valves.apu.getValue() != 1 and (systems.APUNodes.Controls.master.getValue() or systems.APUNodes.Controls.fire.getValue())) {
me["FUEL-APU-label"].setColor(0.7333,0.3803,0);
me["FUEL-APU-line"].hide();
me["FUEL-APU-arrow"].hide();
} else {
me["FUEL-APU-label"].setColor(0.8078, 0.8039, 0.8078);
me["FUEL-APU-arrow"].setColor(0.8078, 0.8039, 0.8078);
me["FUEL-APU-line"].hide();
me["FUEL-APU-arrow"].show();
}
# Hide not yet implemented features
# TODO add them

View file

@ -961,25 +961,21 @@
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.45647562;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-9-8" />
</g>
<g
id="FUEL-APU-arrow"
inkscape:label="#g5828">
<rect
ry="0"
transform="matrix(0,1,-1,0,0,0)"
y="-261.75253"
x="232.60442"
height="18.894773"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-0-0-42"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.09431255;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccccsc"
inkscape:connector-curvature="0"
id="path5824"
d="m 209.24999,234.99999 15.75,-7.5 16.5,-8.25 v 17.25 l 0,15.30854 c 0,0 -1.69343,-0.68362 -19.69533,-10.2091 -11.05467,-5.84944 -12.55467,-6.59944 -12.55467,-6.59944 z"
style="fill:none;stroke:#0dc04b;stroke-width:2.77499986;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.80000019;stroke-dasharray:none;stroke-opacity:1" />
</g>
<rect
ry="0"
transform="matrix(0,1,-1,0,0,0)"
y="-261.75253"
x="232.60442"
height="18.894773"
width="5.3955846"
id="FUEL-APU-line"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.09431255;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccccsc"
inkscape:connector-curvature="0"
id="FUEL-APU-arrow"
d="m 209.24999,234.99999 15.75,-7.5 16.5,-8.25 v 17.25 l 0,15.30854 c 0,0 -1.69343,-0.68362 -19.69533,-10.2091 -11.05467,-5.84944 -12.55467,-6.59944 -12.55467,-6.59944 z"
style="fill:none;stroke:#0dc04b;stroke-width:2.77499986;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.80000019;stroke-dasharray:none;stroke-opacity:1" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75"

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View file

@ -6,6 +6,7 @@
var APUNodes = {
Controls: {
master: props.globals.getNode("controls/apu/master"),
fire: props.globals.getNode("controls/apu/fire-btn"),
bleed: props.globals.getNode("controls/pneumatic/switches/bleedapu"),
},
Oil: {
@ -55,6 +56,11 @@ var APU = {
me.signals.bleedWasUsed = 0;
me.signals.fault = 0;
me.signals.autoshutdown = 0;
checkApuStartTimer.stop();
apuStartTimer.stop();
apuStartTimer2.stop();
shutdownTimer.stop();
cooldownTimer.stop();
},
new: func() {
var a = { parents:[APU] };
@ -73,6 +79,8 @@ var APU = {
# Routines to do with state
powerOn: func() {
# just in case
me.resetStuff();
# apu able to receive emergency stop or start signals
me.setState(1);
me.fuelValveCmd.setValue(1);
@ -203,6 +211,7 @@ var APU = {
me.signals.fault = 1;
me.setState(0);
} elsif (me.state >= 4) {
me.fuelValveCmd.setValue(0);
me.autoStop();
}
},

View file

@ -27,6 +27,7 @@ var FUEL = {
allOff: props.globals.getNode("systems/fuel/pumps/all-eng-pump-off"),
},
Valves: {
apu: props.globals.getNode("systems/fuel/valves/apu-lp-valve"),
crossfeed: props.globals.getNode("systems/fuel/valves/crossfeed-valve"),
lpValve1: props.globals.getNode("systems/fuel/valves/engine-1-lp-valve"),
lpValve2: props.globals.getNode("systems/fuel/valves/engine-2-lp-valve"),