From cfb9b2eae340c991f82ad6a0a96940dd34bb9850 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Tue, 31 Oct 2017 12:09:28 +0000 Subject: [PATCH] Add battery indications to ECAM, rename all objects --- Models/Instruments/Lower-ECAM/Lower-ECAM.nas | 28 +- Models/Instruments/Lower-ECAM/res/elec.svg | 613 +++++++++++-------- 2 files changed, 398 insertions(+), 243 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index f81d5ee2..4344d767 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -1151,9 +1151,35 @@ var canvas_lowerECAM_elec = { return m; }, getKeys: func() { - return ["TAT","SAT","GW"]; + return ["TAT","SAT","GW","BAT1volts","BAT1amps","BAT1v","BAT1a","BAT1off"]; }, update: func() { + if (getprop("/controls/electrical/switches/battery1") == 0) { + me["BAT1volts"].hide(); + me["BAT1amps"].hide(); + me["BAT1v"].hide(); + me["BAT1a"].hide(); + me["BAT1off"].show(); + } else { + me["BAT1volts"].show(); + me["BAT1amps"].show(); + me["BAT1v"].show(); + me["BAT1a"].show(); + me["BAT1off"].hide(); + } + if (getprop("/controls/electrical/switches/battery2") == 0) { + me["BAT2volts"].hide(); + me["BAT2amps"].hide(); + me["BAT2v"].hide(); + me["BAT2a"].hide(); + me["BAT2off"].show(); + } else { + me["BAT2volts"].show(); + me["BAT2amps"].show(); + me["BAT2v"].show(); + me["BAT2a"].show(); + me["BAT2off"].hide(); + } me.updateBottomStatus(); }, }; diff --git a/Models/Instruments/Lower-ECAM/res/elec.svg b/Models/Instruments/Lower-ECAM/res/elec.svg index 90d4728c..46ae97a1 100644 --- a/Models/Instruments/Lower-ECAM/res/elec.svg +++ b/Models/Instruments/Lower-ECAM/res/elec.svg @@ -41,9 +41,9 @@ inkscape:window-height="706" id="namedview371" showgrid="false" - inkscape:zoom="0.32153204" - inkscape:cx="594.51813" - inkscape:cy="568.67245" + inkscape:zoom="0.49" + inkscape:cx="838.86158" + inkscape:cy="803.35319" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" @@ -53,25 +53,28 @@ id="grid5153" /> + sodipodi:nodetypes="cccccccc" + inkscape:label="#path4406" /> + id="ACESSrect" + style="opacity:1;fill:#898989;fill-opacity:1;stroke:#898989;stroke-width:2.76148129;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#rect4228" /> + y="487.30753" + inkscape:label="#rect4220" /> + sodipodi:nodetypes="cccccc" + inkscape:label="#path4311" /> GEN 0 1 + style="fill:none;fill-rule:evenodd;stroke:#cdcecd;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#path4349" /> + id="ACbustie" + inkscape:connector-curvature="0" + inkscape:label="#path4351" /> + id="GEN2connector" + inkscape:connector-curvature="0" + inkscape:label="#path4355" /> + sodipodi:nodetypes="cccccccc" + inkscape:label="#path4357" /> + style="fill:none;fill-rule:evenodd;stroke:#11ba50;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#path4362" /> + sodipodi:nodetypes="cccccccc" + inkscape:label="#path4364" /> + sodipodi:nodetypes="cc" + inkscape:label="#path4226" /> + style="fill:none;fill-rule:evenodd;stroke:#11ba50;stroke-width:2.51326656;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#path4238" /> + id="AC2rect" + style="opacity:1;fill:#898989;fill-opacity:1;stroke:#898989;stroke-width:2.4000001;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#rect4240" /> + sodipodi:nodetypes="ccccccccc" + inkscape:label="#path4246" /> + sodipodi:nodetypes="ccccc" + inkscape:label="#path4251" /> + style="fill:none;fill-rule:evenodd;stroke:#cdcecd;stroke-width:2.61324215;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#path4275" /> + id="APUgenconnector" + inkscape:label="#path4277" /> HZ + id="APUgenlabel" + inkscape:label="#text4306" /> + sodipodi:nodetypes="cc" + inkscape:label="#path4266" /> + sodipodi:nodetypes="ccccc" + inkscape:label="#path4268" /> + sodipodi:nodetypes="cc" + inkscape:label="#path4270" /> + sodipodi:nodetypes="cc" + inkscape:label="#path4272" /> + style="fill:none;fill-rule:evenodd;stroke:#cdcecd;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#path4271" /> + style="fill:none;fill-rule:evenodd;stroke:#11ba50;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#path4273" /> + sodipodi:nodetypes="cc" + inkscape:label="#path4276" /> + sodipodi:nodetypes="ccccc" + inkscape:label="#path4278" /> + sodipodi:nodetypes="ccccc" + inkscape:label="#path4280" /> + id="ESSTRtoDCESSconnector" + inkscape:label="#path4282" /> + sodipodi:nodetypes="cccccccc" + inkscape:label="#path4288" /> + sodipodi:nodetypes="cc" + inkscape:label="#path4279" /> + sodipodi:nodetypes="ccccc" + inkscape:label="#path4281" /> + id="DC1rect" + style="opacity:1;fill:#898989;fill-opacity:1;stroke:#898989;stroke-width:2.4000001;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#rect4283" /> DC 1 + y="211.23915" + inkscape:label="#rect4289" /> + id="DCESSrect" + style="opacity:1;fill:#898989;fill-opacity:1;stroke:#898989;stroke-width:2.4000001;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#rect4300" /> + id="TR1label" + inkscape:label="#text4380" /> + id="TR2text" + inkscape:label="#text4388" /> EMER GEN + y="128.68787" + inkscape:label="#rect4335" /> + sodipodi:nodetypes="cc" + inkscape:label="#path4342" /> + sodipodi:nodetypes="cc" + inkscape:label="#path4344" /> + sodipodi:nodetypes="ccc" + inkscape:label="#path4346" /> + sodipodi:nodetypes="ccccc" + inkscape:label="#path4348" /> + id="BAT1text" + inkscape:label="#text4366" /> + style="fill:none;fill-rule:evenodd;stroke:#cdcecd;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#path4374" /> + id="BAT2text" + inkscape:label="#text4393" /> + sodipodi:nodetypes="ccccccc" + inkscape:label="#path4401" /> OFF + sodipodi:nodetypes="cc" + inkscape:label="#path4418" /> + sodipodi:nodetypes="cc" + inkscape:label="#path4420" /> 1 +