1
0
Fork 0
This commit is contained in:
Jonathan Redpath 2022-04-23 12:34:52 +01:00
parent 016bd67766
commit ecb430f621
2 changed files with 53 additions and 51 deletions

View file

@ -33,16 +33,16 @@ var canvas_lowerECAMPageWheel =
obj.update_items = [
props.UpdateManager.FromHashList(["gearPosNorm","gearPosNorm1","gearPosNorm2","gearLever"], nil, func(val) {
if (val.gearLever and (val.gearPosNorm != 1 or val.gearPosNorm1 != 1 or val.gearPosNorm2 != 1)) {
props.UpdateManager.FromHashList(["gearPosNorm","gearPosNorm1","gearPosNorm2","gearLever"], 0.01, func(val) {
if (val.gearLever and (val.gearPosNorm <= 0.99 or val.gearPosNorm1 <= 0.99 or val.gearPosNorm2 <= 0.99)) {
obj["lgctltext"].show();
} elsif (!val.gearLever and (val.gearPosNorm != 0 or val.gearPosNorm1 != 0 or val.gearPosNorm2 != 0)) {
} elsif (!val.gearLever and (val.gearPosNorm >= 0.01 or val.gearPosNorm1 >= 0.01 or val.gearPosNorm2 >= 0.01)) {
obj["lgctltext"].show();
} else {
obj["lgctltext"].hide();
}
}),
props.UpdateManager.FromHashValue("gearPosNorm", nil, func(val) {
props.UpdateManager.FromHashValue("gearPosNorm", 0.01, func(val) {
if (val < 0.2) {
obj["Triangle-Nose1"].hide();
obj["Triangle-Nose2"].hide();
@ -51,7 +51,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Nose2"].show();
}
if (val == 1) {
if (val >= 0.99) {
obj["Triangle-Nose1"].setColor(0.0509,0.7529,0.2941);
obj["Triangle-Nose2"].setColor(0.0509,0.7529,0.2941);
} else {
@ -59,7 +59,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Nose2"].setColor(1,0,0);
}
}),
props.UpdateManager.FromHashValue("gearPosNorm1", nil, func(val) {
props.UpdateManager.FromHashValue("gearPosNorm1", 0.01, func(val) {
if (val < 0.2) {
obj["Triangle-Left1"].hide();
obj["Triangle-Left2"].hide();
@ -68,7 +68,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Left2"].show();
}
if (val == 1) {
if (val >= 0.99) {
obj["Triangle-Left1"].setColor(0.0509,0.7529,0.2941);
obj["Triangle-Left2"].setColor(0.0509,0.7529,0.2941);
} else {
@ -76,7 +76,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Left2"].setColor(1,0,0);
}
}),
props.UpdateManager.FromHashValue("gearPosNorm2", nil, func(val) {
props.UpdateManager.FromHashValue("gearPosNorm2", 0.01, func(val) {
if (val < 0.2) {
obj["Triangle-Right1"].hide();
obj["Triangle-Right2"].hide();
@ -85,7 +85,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Right2"].show();
}
if (val == 1) {
if (val >= 0.99) {
obj["Triangle-Right1"].setColor(0.0509,0.7529,0.2941);
obj["Triangle-Right2"].setColor(0.0509,0.7529,0.2941);
} else {
@ -93,7 +93,7 @@ var canvas_lowerECAMPageWheel =
obj["Triangle-Right2"].setColor(1,0,0);
}
}),
props.UpdateManager.FromHashList(["yellow","green","NWSSwitch","brakesMode","val.accumPressPsiPressPsi","leftBrakeFCS","rightBrakeFCS"], nil, func(val) {
props.UpdateManager.FromHashList(["yellow","green","accumPressPsi","brakesMode","NWSSwitch"], 1, func(val) {
if (val.NWSSwitch and val.yellow >= 1500) {
obj["NWStext"].hide();
obj["NWS"].hide();
@ -125,18 +125,6 @@ var canvas_lowerECAMPageWheel =
obj["BSCU2"].hide();
}
if (val.green >= 1500) {
obj["normbrkhyd"].setColor(0.0509,0.7529,0.2941);
} else {
obj["normbrkhyd"].setColor(0.7333,0.3803,0);
}
if (val.yellow >= 1500) {
obj["altnbrkhyd"].setColor(0.0509,0.7529,0.2941);
} else {
obj["altnbrkhyd"].setColor(0.7333,0.3803,0);
}
if (!val.NWSSwitch or val.green < 1500) {
obj["NORMbrk"].show();
obj["normbrk-rect"].show();
@ -161,7 +149,7 @@ var canvas_lowerECAMPageWheel =
obj["ALTNbrk"].setColor(0.0509,0.7529,0.2941);
}
}
if (val.brakesMode == 2 and val.accumPressPsi < 200 and val.yellow < 1500) {
obj["accuonlyarrow"].hide();
obj["accuonly"].hide();
@ -185,7 +173,22 @@ var canvas_lowerECAMPageWheel =
obj["brakearrow"].hide();
obj["accupress_text"].hide();
}
}),
props.UpdateManager.FromHashValue("green", 1, func(val) {
if (val >= 1500) {
obj["normbrkhyd"].setColor(0.0509,0.7529,0.2941);
} else {
obj["normbrkhyd"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("yellow", 1, func(val) {
if (val >= 1500) {
obj["altnbrkhyd"].setColor(0.0509,0.7529,0.2941);
} else {
obj["altnbrkhyd"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["brakesMode","leftBrakeFCS","rightBrakeFCS"], 0.1, func(val) {
if (val.brakesMode == 1) {
obj["releaseL1"].hide();
obj["releaseL2"].hide();
@ -196,7 +199,7 @@ var canvas_lowerECAMPageWheel =
obj["releaseR3"].hide();
obj["releaseR4"].hide();
} else { # Display if the brakes are released and in alternate braking
if (val.leftBrakeFCS == 0) {
if (val.leftBrakeFCS <= 0.1) {
obj["releaseL1"].show();
obj["releaseL2"].show();
obj["releaseL3"].show();
@ -208,7 +211,7 @@ var canvas_lowerECAMPageWheel =
obj["releaseL4"].hide();
}
if (val.rightBrakeFCS == 0) {
if (val.rightBrakeFCS <= 0.1) {
obj["releaseR1"].show();
obj["releaseR2"].show();
obj["releaseR3"].show();
@ -221,7 +224,7 @@ var canvas_lowerECAMPageWheel =
}
}
}),
props.UpdateManager.FromHashList(["brakeAutobrkMode","NWSSwitch"], nil, func(val) {
props.UpdateManager.FromHashList(["brakeAutobrkMode","NWSSwitch"], 1, func(val) {
if (val.brakeAutobrkMode == 0) {
obj["autobrkind"].hide();
} elsif (val.brakeAutobrkMode == 1) {
@ -319,15 +322,15 @@ var canvas_lowerECAMPageWheel =
props.UpdateManager.FromHashValue("wheelRightDoor", 0.5, func(val) {
obj["rightdoor"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("wheelLeftDoorPos", 0.01, func(val) {
if (val == 0) {
props.UpdateManager.FromHashValue("wheelLeftDoorPos", 0.1, func(val) {
if (val <= 0.1) {
obj["leftdoor"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["leftdoor"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("wheelNoseDoorPos", 0.01, func(val) {
if (val == 0) {
props.UpdateManager.FromHashValue("wheelNoseDoorPos", 0.1, func(val) {
if (val <= 0.1) {
obj["nosegeardoorL"].setColorFill(0.0509,0.7529,0.2941);
obj["nosegeardoorR"].setColorFill(0.0509,0.7529,0.2941);
} else {
@ -335,8 +338,8 @@ var canvas_lowerECAMPageWheel =
obj["nosegeardoorR"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("wheelRightDoorPos", 0.01, func(val) {
if (val == 0) {
props.UpdateManager.FromHashValue("wheelRightDoorPos", 0.1, func(val) {
if (val <= 0.1) {
obj["rightdoor"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["rightdoor"].setColorFill(0.7333,0.3803,0);
@ -432,7 +435,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler5Rex"].show();
}
}),
props.UpdateManager.FromHashList(["spoilerL1Failure","spoilerL1","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL1Failure","spoilerL1","green"], 0.5, func(val) {
if (val.spoilerL1Failure or val.green < 1500) {
obj["spoiler1Lex"].setColor(0.7333,0.3803,0);
obj["spoiler1Lrt"].setColor(0.7333,0.3803,0);
@ -447,7 +450,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler1Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL2Failure","spoilerL2","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL2Failure","spoilerL2","yellow"], 0.5, func(val) {
if (val.spoilerL2Failure or val.yellow < 1500) {
obj["spoiler2Lex"].setColor(0.7333,0.3803,0);
obj["spoiler2Lrt"].setColor(0.7333,0.3803,0);
@ -462,7 +465,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler2Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL3Failure","spoilerL3","blue"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL3Failure","spoilerL3","blue"], 0.5, func(val) {
if (val.spoilerL3Failure or val.blue < 1500) {
obj["spoiler3Lex"].setColor(0.7333,0.3803,0);
obj["spoiler3Lrt"].setColor(0.7333,0.3803,0);
@ -477,7 +480,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler3Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL4Failure","spoilerL4","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL4Failure","spoilerL4","yellow"], 0.5, func(val) {
if (val.spoilerL4Failure or val.yellow < 1500) {
obj["spoiler4Lex"].setColor(0.7333,0.3803,0);
obj["spoiler4Lrt"].setColor(0.7333,0.3803,0);
@ -492,7 +495,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler4Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL5Failure","spoilerL5","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerL5Failure","spoilerL5","green"], 0.5, func(val) {
if (val.spoilerL5Failure or val.green < 1500) {
obj["spoiler5Lex"].setColor(0.7333,0.3803,0);
obj["spoiler5Lrt"].setColor(0.7333,0.3803,0);
@ -507,7 +510,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler5Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR1Failure","spoilerR1","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR1Failure","spoilerR1","green"], 0.5, func(val) {
if (val.spoilerR1Failure or val.green < 1500) {
obj["spoiler1Rex"].setColor(0.7333,0.3803,0);
obj["spoiler1Rrt"].setColor(0.7333,0.3803,0);
@ -522,7 +525,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler1Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR2Failure","spoilerR2","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR2Failure","spoilerR2","yellow"], 0.5, func(val) {
if (val.spoilerR2Failure or val.yellow < 1500) {
obj["spoiler2Rex"].setColor(0.7333,0.3803,0);
obj["spoiler2Rrt"].setColor(0.7333,0.3803,0);
@ -537,7 +540,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler2Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR3Failure","spoilerR3","blue"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR3Failure","spoilerR3","blue"], 0.5, func(val) {
if (val.spoilerR3Failure or val.blue < 1500) {
obj["spoiler3Rex"].setColor(0.7333,0.3803,0);
obj["spoiler3Rrt"].setColor(0.7333,0.3803,0);
@ -552,7 +555,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler3Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR4Failure","spoilerR4","yellow"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR4Failure","spoilerR4","yellow"], 0.5, func(val) {
if (val.spoilerR4Failure or val.yellow < 1500) {
obj["spoiler4Rex"].setColor(0.7333,0.3803,0);
obj["spoiler4Rrt"].setColor(0.7333,0.3803,0);
@ -567,7 +570,7 @@ var canvas_lowerECAMPageWheel =
obj["spoiler4Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR5Failure","spoilerR5","green"], nil, func(val) {
props.UpdateManager.FromHashList(["spoilerR5Failure","spoilerR5","green"], 0.5, func(val) {
if (val.spoilerR5Failure or val.green < 1500) {
obj["spoiler5Rex"].setColor(0.7333,0.3803,0);
obj["spoiler5Rrt"].setColor(0.7333,0.3803,0);

View file

@ -5,7 +5,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="wheel.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
@ -22,7 +22,6 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@ -38,12 +37,12 @@
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="986"
inkscape:window-height="974"
id="namedview371"
showgrid="true"
inkscape:zoom="1.8101934"
inkscape:cx="932.77328"
inkscape:cy="542.48348"
inkscape:zoom="0.9050967"
inkscape:cx="483.92619"
inkscape:cy="964.53782"
inkscape:window-x="-11"
inkscape:window-y="-11"
inkscape:window-maximized="1"
@ -323,13 +322,13 @@
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="434.00464"
x="420.50464"
y="552.28931"
id="antiskidtext"
inkscape:label="#text4269"><tspan
sodipodi:role="line"
id="tspan4271"
x="434.00464"
x="420.50464"
y="552.28931"
style="font-size:32px;line-height:1.25">ANTI SKID</tspan></text>
<text

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB