WHEEL ECAM: Major improvements. Some problems, which Josh will fix tonight

This commit is contained in:
Jonathan Redpath 2017-10-21 20:50:02 +01:00
parent 8c54f18a46
commit 61864bd64f
2 changed files with 140 additions and 36 deletions

View file

@ -19,6 +19,13 @@ var autobrakemode = 0;
var nosegear = 0;
var leftgear = 0;
var rightgear = 0;
var leftdoor = 0;
var rightdoor = 0;
var nosedoor = 0;
var gearlvr = 0;
var askidsw = 0;
var brakemode = 0;
var accum = 0;
setprop("/systems/electrical/extra/apu-load", 0);
setprop("/systems/electrical/extra/apu-volts", 0);
@ -685,9 +692,9 @@ var canvas_lowerECAM_wheel = {
return m;
},
getKeys: func() {
return ["TAT","SAT","GW","leftdoor","rightdoor","nosegeardoorL","nosegeardoorR","autobrk","autobrkind","NWS","altnbrk","normbrk","spoiler1Rex","spoiler1Rrt","spoiler2Rex","spoiler2Rrt","spoiler3Rex","spoiler3Rrt","spoiler4Rex","spoiler4Rrt","spoiler5Rex","spoiler5Rrt","spoiler1Lex","spoiler1Lrt",
"spoiler2Lex","spoiler2Lrt","spoiler3Lex","spoiler3Lrt","spoiler4Lex","spoiler4Lrt","spoiler5Lex","spoiler5Lrt","spoiler1Rf","spoiler2Rf","spoiler3Rf","spoiler4Rf","spoiler5Rf","spoiler1Lf","spoiler2Lf","spoiler3Lf","spoiler4Lf","spoiler5Lf",
"braketemp1","braketemp2","braketemp3","braketemp4","leftuplock","noseuplock","rightuplock","Triangle-Left1","Triangle-Left2","Triangle-Nose1","Triangle-Nose2","Triangle-Right1","Triangle-Right2"];
return ["TAT","SAT","GW","lgctltext","NORMbrk","NWStext","leftdoor","rightdoor","nosegeardoorL","nosegeardoorR","autobrk","autobrkind","NWS","NWSrect","normbrk-rect","altnbrk","normbrkhyd","spoiler1Rex","spoiler1Rrt","spoiler2Rex","spoiler2Rrt","spoiler3Rex","spoiler3Rrt","spoiler4Rex","spoiler4Rrt","spoiler5Rex","spoiler5Rrt","spoiler1Lex","spoiler1Lrt",
"spoiler2Lex","spoiler2Lrt","spoiler3Lex","spoiler3Lrt","spoiler4Lex","spoiler4Lrt","spoiler5Lex","spoiler5Lrt","spoiler1Rf","spoiler2Rf","spoiler3Rf","spoiler4Rf","spoiler5Rf","spoiler1Lf","spoiler2Lf","spoiler3Lf","spoiler4Lf","spoiler5Lf","ALTNbrk","altnbrkhyd","altnbrk-rect",
"antiskidtext","brakearrow","acuupress_text","accuonlyarrow","accuonly","braketemp1","normbrkhyd","braketemp2","braketemp3","braketemp4","leftuplock","noseuplock","rightuplock","Triangle-Left1","Triangle-Left2","Triangle-Nose1","Triangle-Nose2","Triangle-Right1","Triangle-Right2","BSCUrect1","BSCUrect2","BSCU1","BSCU2"];
},
update: func() {
blue_psi = getprop("/systems/hydraulic/blue-psi");
@ -700,7 +707,99 @@ var canvas_lowerECAM_wheel = {
leftdoor = getprop("/systems/hydraulic/gear/door-left");
rightdoor = getprop("/systems/hydraulic/gear/door-right");
nosedoor = getprop("/systems/hydraulic/gear/door-nose");
gearlvr = getprop("/controls/gear/gear-down");
askidsw = getprop("/systems/hydraulic/brakes/askidnwssw");
brakemode = getprop("/systems/hydraulic/brakes/mode");
accum = getprop("/systems/hydraulic/brakes/accumulator-pressure-psi");
# L/G CTL
if ((leftgear == 0 or nosegear == 0 or rightgear == 0 and gearlvr == 0) or (leftgear == 1 or nosegear == 1 or rightgear == 1 and gearlvr == 1)) {
me["lgctltext"].hide();
} else {
me["lgctltext"].show();
}
# NWS / Antiskid / Brakes
if (askidsw and yellow_psi >= 1500) {
me["NWStext"].hide();
me["NWS"].hide();
me["NWSrect"].hide();
me["antiskidtext"].hide();
me["BSCUrect1"].hide();
me["BSCUrect2"].hide();
me["BSCU1"].hide();
me["BSCU2"].hide();
} else if (!askidsw and yellow_psi >= 1500) {
me["NWStext"].show();
me["NWS"].show();
me["NWS"].setColor(0.0667,0.7294,0.3137);
me["NWSrect"].show();
me["antiskidtext"].show();
me["antiskidtext"].setColor(0.7333,0.3803,0);
me["BSCUrect1"].show();
me["BSCUrect2"].show();
me["BSCU1"].show();
me["BSCU2"].show();
} else {
me["NWStext"].show();
me["NWS"].show();
me["NWS"].setColor(0.7333,0.3803,0);
me["NWSrect"].show();
me["antiskidtext"].show();
me["antiskidtext"].setColor(0.7333,0.3803,0);
me["BSCUrect1"].show();
me["BSCUrect2"].show();
me["BSCU1"].show();
me["BSCU2"].show();
}
if (green_psi >= 1500 and brakemode == 1) {
me["NORMbrk"].hide();
me["normbrk-rect"].hide();
me["normbrkhyd"].hide();
} else if (green_psi >= 1500 and askidsw) {
me["NORMbrk"].show();
me["normbrk-rect"].show();
me["NORMbrk"].setColor(0.7333,0.3803,0);
me["normbrkhyd"].setColor(0.0667,0.7294,0.3137);
} else if (green_psi < 1500 or !askidsw) {
me["NORMbrk"].show();
me["normbrk-rect"].show();
me["NORMbrk"].setColor(0.7333,0.3803,0);
me["normbrkhyd"].setColor(0.7333,0.3803,0);
} else if (green
if (brakemode != 2) {
me["ALTNbrk"].hide();
me["altnbrk-rect"].hide();
me["altnbrkhyd"].hide();
} else if (yellow_psi >= 1500) {
me["ALTNbrk"].show();
me["altnbrk-rect"].show();
me["altnbrkhyd"].setColor(0.0667,0.7294,0.3137);
} else {
me["ALTNbrk"].show();
me["altnbrk-rect"].show();
me["altnbrkhyd"].setColor(0.7333,0.3803,0);
}
if (brakemode == 2 and accum < 200 and yellow_psi < 1500) {
me["accupress_text"].show();
me["brakearrow"].hide();
me["acuupress_text"].setColor(0.7333,0.3803,0);
} else if (brakemode == 2 and accum > 200 and yellow_psi >= 1500){
me["accupress_text"].show();
me["brakearrow"].show();
me["acuupress_text"].setColor(0.0667,0.7294,0.3137);
} else if (brakemode == 2 and accum > 200 and yellow_psi < 1500) {
me["accuonlyarrow"].show();
me["accuonly"].show();
me["brakearrow"].hide();
me["accupress_text"].hide();
} else {
me["accuonlyarrow"].hide();
me["accuonly"].hide();
}
# Gear Doors
me["leftdoor"].setRotation(getprop("/ECAM/Lower/door-left")*D2R);
@ -1019,21 +1118,6 @@ var canvas_lowerECAM_wheel = {
me["spoiler5Rf"].hide();
}
# Hydraulic Boxes
if (getprop("/systems/hydraulic/green-psi") >= 1500) {
me["normbrk"].hide();
} else {
me["normbrk"].setColor(0.7333,0.3803,0);
}
if (getprop("/systems/hydraulic/yellow-psi") >= 1500) {
me["altnbrk"].hide();
me["NWS"].hide();
} else {
me["altnbrk"].setColor(0.7333,0.3803,0);
me["NWS"].setColor(0.7333,0.3803,0);
}
# Hide not yet implemented stuff
me["braketemp1"].hide();
me["braketemp2"].hide();
@ -1042,7 +1126,7 @@ var canvas_lowerECAM_wheel = {
me["leftuplock"].hide();
me["noseuplock"].hide();
me["rightuplock"].hide();
me.updateBottomStatus();
},
};

View file

@ -37,14 +37,14 @@
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1030"
inkscape:window-width="1366"
inkscape:window-height="706"
id="namedview371"
showgrid="true"
inkscape:zoom="5.5988375"
inkscape:cx="668.95781"
inkscape:cy="1036.1247"
inkscape:window-x="1592"
inkscape:zoom="1.9815047"
inkscape:cx="935.60614"
inkscape:cy="515.73628"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2">
@ -658,55 +658,55 @@
inkscape:connector-curvature="0"
sodipodi:nodetypes="csc" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#11ba50;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 631.89134,319.32173 c -9.60616,5.62651 -23.82997,8.88082 -38.54106,8.81793 -14.71108,-0.0629 -28.26086,-3.43595 -36.7147,-9.13967"
id="noseARCr"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csc" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#11ba50;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 791.82029,716.82172 c -9.60617,5.62651 -23.82999,8.88083 -38.54108,8.81793 -14.71108,-0.0629 -28.26086,-3.43594 -36.71469,-9.13967"
id="bottomarc3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csc" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#11ba50;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 953.64778,716.82172 c -9.60617,5.62651 -23.82998,8.88083 -38.54107,8.81793 -14.71109,-0.0629 -28.26087,-3.43594 -36.7147,-9.13967"
id="bottomarc4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csc" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#11ba50;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 311.65244,716.82172 c -9.60617,5.62651 -23.82999,8.88082 -38.54107,8.81792 -14.71109,-0.0629 -28.26087,-3.43594 -36.7147,-9.13966"
id="bottomarc2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csc" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#11ba50;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 152.53518,716.82172 c -9.60618,5.62651 -23.82999,8.88082 -38.54107,8.81793 -14.711089,-0.0629 -28.260867,-3.43595 -36.714701,-9.13967"
id="bottomarc1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csc" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#11ba50;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 309.1338,588.67824 c -9.60617,-5.62651 -23.82998,-8.88083 -38.54107,-8.81793 -14.71109,0.0629 -28.26087,3.43594 -36.7147,9.13967"
id="toparc2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csc" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#11ba50;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 152.10042,588.99998 c -9.60617,-5.62651 -23.82998,-8.88083 -38.54106,-8.81793 -14.71109,0.0629 -28.260878,3.43594 -36.714703,9.13967"
id="toparc1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csc" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#11ba50;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 953.64777,588.67824 c -9.60617,-5.62651 -23.82998,-8.88083 -38.54107,-8.81793 -14.71109,0.0629 -28.26086,3.43595 -36.71469,9.13967"
id="toparc4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csc" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#11ba50;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.60787535;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 791.82029,588.67824 c -9.60617,-5.62651 -23.82999,-8.88082 -38.54107,-8.81792 -14.71109,0.0629 -28.26087,3.43594 -36.7147,9.13966"
id="toparc3"
inkscape:connector-curvature="0"
@ -995,7 +995,7 @@
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:#11ba50;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="425.9541"
y="575.56732"
id="normbrk"
id="normbrkhyd"
transform="scale(0.92732085,1.0783754)"
inkscape:label="#text4355-7"><tspan
sodipodi:role="line"
@ -1092,7 +1092,7 @@
<text
inkscape:label="#text4355-7"
transform="scale(0.92732085,1.0783754)"
id="altnbrk"
id="altnbrkhyd"
y="620.81592"
x="427.90295"
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:#11ba50;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
@ -1150,4 +1150,24 @@
id="path4311"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sssss" />
<text
inkscape:label="#text4289"
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:#11ba50;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="455.59897"
y="707.69037"
id="accuonly"
sodipodi:linespacing="0%"><tspan
style="font-size:32px;line-height:1.25"
sodipodi:role="line"
id="tspan4312"
x="455.59897"
y="707.69037">ACCU ONLY</tspan></text>
<path
inkscape:label="#path4358"
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="accuonlyarrow"
d="m 455.91296,703.17921 -18.9725,-0.0474 -0.21778,-9.82525 -6.1844,0.0643 8.27299,-9.57748 7.82221,9.2942 -6.04447,0.16094 0.17459,6.94753 15.16732,0.13679 z"
style="fill:#11ba50;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</svg>

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 62 KiB