diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index feaae20f..bd4ec3f7 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -1248,7 +1248,7 @@ var canvas_lowerECAM_elec = { return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit","BAT1-label","Bat1Volt","Bat1Ampere","BAT2-label","Bat2Volt","Bat2Ampere","BAT1-charge","BAT1-discharge","BAT2-charge","BAT2-discharge","ELEC-Line-DC1-DCBAT","ELEC-Line-DC1-DCESS","ELEC-Line-DC2-DCBAT", "ELEC-Line-DC1-DCESS_DCBAT","ELEC-Line-DC2-DCESS_DCBAT","ELEC-Line-TR1-DC1","ELEC-Line-TR2-DC2","Shed-label","ELEC-Line-ESSTR-DCESS","TR1-label","TR1Volt","TR1Ampere","TR2-label","TR2Volt","TR2Ampere","EMERGEN-group","EmergenVolt","EmergenHz", "ELEC-Line-Emergen-ESSTR","EMERGEN-Label-off","Emergen-Label","EMERGEN-out","ELEC-Line-ACESS-TRESS","ELEC-Line-AC1-TR1","ELEC-Line-AC2-TR2","ELEC-Line-AC1-ACESS","ELEC-Line-AC2-ACESS","ACESS-SHED","ACESS","AC1-in","AC2-in","ELEC-Line-GEN1-AC1","ELEC-Line-GEN2-AC2", - "ELEC-Line-APU-AC1","ELEC-Line-APU-EXT","ELEC-Line-EXT-AC2","APU-out","EXT-out","EXTPWR-group","ExtVolt","ExtHz","APU-content","APU-border","APUGentext","APUGenLoad","APUGenVolt","APUGenHz","APUGEN-off","GEN1-label","Gen1Load","Gen1Volt","Gen1Hz", + "ELEC-Line-APU-AC1","ELEC-Line-APU-EXT","ELEC-Line-EXT-AC2","APU-out","STATINV-group","StatVolt","StatHz","EXT-out","EXTPWR-group","ExtVolt","ExtHz","APU-content","APU-border","APUGentext","APUGenLoad","APUGenVolt","APUGenHz","APUGEN-off","GEN1-label","Gen1Load","Gen1Volt","Gen1Hz", "GEN2-label","Gen2Load","GEN2-off","Gen2Volt","Gen2Hz","ELEC-IDG-1-label","ELEC-IDG-1-num-label","ELEC-IDG-1-Temp","IDG1-LOPR","IDG1-DISC","IDG1-RISE-Value","IDG1-RISE-label","GalleyShed","ELEC-IDG-2-Temp","ELEC-IDG-2-label","ELEC-IDG-2-num-label","IDG2-RISE-label","IDG2-RISE-Value","IDG2-LOPR", "IDG2-DISC","ESSTR-group","ESSTR","ESSTR-Volt","ESSTR-Ampere","BAT1-content","BAT2-content","BAT1-OFF","BAT2-OFF","GEN1-content","GEN2-content","GEN-1-num-label","GEN-2-num-label","GEN1-off","GEN2-off","GEN1-num-label","GEN2-num-label","EXTPWR-label", "ELEC-ACESS-SHED-label","ELEC-DCBAT-label","ELEC-DCESS-label","ELEC-DC2-label","ELEC-DC1-label","ELEC-AC1-label","ELEC-AC2-label","ELEC-ACESS-label","ELEC-Line-ESSTR-DCESS-off","ELEC-Line-Emergen-ESSTR-off"]; @@ -1351,19 +1351,19 @@ var canvas_lowerECAM_elec = { me["TR1Volt"].setText(sprintf("%s", math.round(tr1_v))); me["TR1Ampere"].setText(sprintf("%s", math.round(tr1_a))); - if (tr1_v < 25 or tr1_v > 31 or tr1_a < 5) { + if (tr1_v <= 25 or tr1_v >= 31 or tr1_a <= 5) { me["TR1-label"].setColor(0.7333,0.3803,0); } else { me["TR1-label"].setColor(0.8078,0.8039,0.8078); } - if (tr1_v < 25 or tr1_v > 31) { + if (tr1_v <= 25 or tr1_v >= 31) { me["TR1Volt"].setColor(0.7333,0.3803,0); } else { me["TR1Volt"].setColor(0.0509,0.7529,0.2941); } - if (tr1_a < 5) { + if (tr1_a <= 5) { me["TR1Ampere"].setColor(0.7333,0.3803,0); } else { me["TR1Ampere"].setColor(0.0509,0.7529,0.2941); @@ -1377,19 +1377,19 @@ var canvas_lowerECAM_elec = { me["TR2Volt"].setText(sprintf("%s", math.round(tr2_v))); me["TR2Ampere"].setText(sprintf("%s", math.round(tr2_a))); - if (tr2_v < 25 or tr2_v > 31 or tr2_a < 5) { + if (tr2_v <= 25 or tr2_v >= 31 or tr2_a <= 5) { me["TR2-label"].setColor(0.7333,0.3803,0); } else { me["TR2-label"].setColor(0.8078,0.8039,0.8078); } - if (tr2_v < 25 or tr2_v > 31) { + if (tr2_v <= 25 or tr2_v >= 31) { me["TR2Volt"].setColor(0.7333,0.3803,0); } else { me["TR2Volt"].setColor(0.0509,0.7529,0.2941); } - if (tr2_a < 5) { + if (tr2_a <= 5) { me["TR2Ampere"].setColor(0.7333,0.3803,0); } else { me["TR2Ampere"].setColor(0.0509,0.7529,0.2941); @@ -1403,19 +1403,19 @@ var canvas_lowerECAM_elec = { me["ESSTR-Volt"].setText(sprintf("%s", math.round(essTrvolts))); me["ESSTR-Ampere"].setText(sprintf("%s", math.round(essTramps))); - if (essTrvolts < 25 or essTrvolts > 31 or essTramps < 5) { + if (essTrvolts <= 25 or essTrvolts >= 31 or essTramps <= 5) { me["ESSTR"].setColor(0.7333,0.3803,0); } else { me["ESSTR"].setColor(0.8078,0.8039,0.8078); } - if (essTrvolts < 25 or essTrvolts > 31) { + if (essTrvolts <= 25 or essTrvolts >= 31) { me["ESSTR-Volt"].setColor(0.7333,0.3803,0); } else { me["ESSTR-Volt"].setColor(0.0509,0.7529,0.2941); } - if (essTramps < 5) { + if (essTramps <= 5) { me["ESSTR-Ampere"].setColor(0.7333,0.3803,0); } else { me["ESSTR-Ampere"].setColor(0.0509,0.7529,0.2941); @@ -1439,19 +1439,19 @@ var canvas_lowerECAM_elec = { me["EmergenVolt"].setText(sprintf("%s", math.round(systems.ELEC.Source.EmerGen.voltsRelay.getValue()))); me["EmergenHz"].setText(sprintf("%s", math.round(systems.ELEC.Source.EmerGen.hertz.getValue()))); - if (systems.ELEC.Source.EmerGen.voltsRelay.getValue() > 120 or systems.ELEC.Source.EmerGen.voltsRelay.getValue() < 110 or systems.ELEC.Source.EmerGen.hertz.getValue() > 410 or systems.ELEC.Source.EmerGen.hertz.getValue() < 390) { + if (systems.ELEC.Source.EmerGen.voltsRelay.getValue() >= 120 or systems.ELEC.Source.EmerGen.voltsRelay.getValue() <= 110 or systems.ELEC.Source.EmerGen.hertz.getValue() >= 410 or systems.ELEC.Source.EmerGen.hertz.getValue() <= 390) { me["Emergen-Label"].setColor(0.7333,0.3803,0); } else { me["Emergen-Label"].setColor(0.8078,0.8039,0.8078); } - if (systems.ELEC.Source.EmerGen.voltsRelay.getValue() > 120 or systems.ELEC.Source.EmerGen.voltsRelay.getValue() < 110) { + if (systems.ELEC.Source.EmerGen.voltsRelay.getValue() >= 120 or systems.ELEC.Source.EmerGen.voltsRelay.getValue() <= 110) { me["EmergenVolt"].setColor(0.7333,0.3803,0); } else { me["EmergenVolt"].setColor(0.0509,0.7529,0.2941); } - if (systems.ELEC.Source.EmerGen.hertz.getValue() > 410 or systems.ELEC.Source.EmerGen.hertz.getValue() < 390) { + if (systems.ELEC.Source.EmerGen.hertz.getValue() >= 410 or systems.ELEC.Source.EmerGen.hertz.getValue() <= 390) { me["EmergenHz"].setColor(0.7333,0.3803,0); } else { me["EmergenHz"].setColor(0.0509,0.7529,0.2941); @@ -1469,14 +1469,18 @@ var canvas_lowerECAM_elec = { if (eng1_running.getValue() == 0) { me["ELEC-IDG-1-num-label"].setColor(0.7333,0.3803,0); + me["GEN1-num-label"].setColor(0.7333,0.3803,0); } else { me["ELEC-IDG-1-num-label"].setColor(0.8078,0.8039,0.8078); + me["GEN1-num-label"].setColor(0.8078,0.8039,0.8078); } if (eng2_running.getValue() == 0) { me["ELEC-IDG-2-num-label"].setColor(0.7333,0.3803,0); + me["GEN2-num-label"].setColor(0.7333,0.3803,0); } else { me["ELEC-IDG-2-num-label"].setColor(0.8078,0.8039,0.8078); + me["GEN2-num-label"].setColor(0.8078,0.8039,0.8078); } # IDG 2 @@ -1492,36 +1496,16 @@ var canvas_lowerECAM_elec = { if (systems.ELEC.Switch.gen1.getValue() == 0) { me["GEN1-content"].hide(); me["GEN1-off"].show(); - if (systems.ELEC.Source.IDG1.gcrRelay.getValue()) { - me["GEN1-label"].setColor(0.7333,0.3803,0); - } else { - me["GEN1-label"].setColor(0.8078,0.8039,0.8078); - } - - if (eng1_running.getValue() == 0) { - me["GEN1-num-label"].setColor(0.7333,0.3803,0); - } else { - me["GEN1-num-label"].setColor(0.8078,0.8039,0.8078); - } + me["GEN1-label"].setColor(0.7333,0.3803,0); } else { me["GEN1-content"].show(); me["GEN1-off"].hide(); - # me["Gen1Load"].setText(sprintf("%s", math.round(gen1_load.getValue()))); + + me["Gen1Load"].setText(sprintf("%s", math.round(gen1_load.getValue()))); me["Gen1Volt"].setText(sprintf("%s", math.round(systems.ELEC.Source.IDG1.volts.getValue()))); - - if (systems.ELEC.Source.IDG1.hertz.getValue() == 0) { - me["Gen1Hz"].setText(sprintf("XX")); - } else { - me["Gen1Hz"].setText(sprintf("%s", math.round(systems.ELEC.Source.IDG1.hertz.getValue()))); - } - - if (eng1_running.getValue() == 0) { - me["GEN1-num-label"].setColor(0.7333,0.3803,0); - } else { - me["GEN1-num-label"].setColor(0.8078,0.8039,0.8078); - } - - if (systems.ELEC.Source.IDG1.volts.getValue() > 120 or systems.ELEC.Source.IDG1.volts.getValue() < 110 or systems.ELEC.Source.IDG1.hertz.getValue() > 410 or systems.ELEC.Source.IDG1.hertz.getValue() < 390 or gen1_load.getValue() >= 110) { + me["Gen1Hz"].setText(sprintf("%s", math.round(systems.ELEC.Source.IDG1.hertz.getValue()))); + + if (systems.ELEC.Source.IDG1.volts.getValue() >= 120 or systems.ELEC.Source.IDG1.volts.getValue() <= 110 or systems.ELEC.Source.IDG1.hertz.getValue() >= 410 or systems.ELEC.Source.IDG1.hertz.getValue() < 390 or gen1_load.getValue() >= 110) { me["GEN1-label"].setColor(0.7333,0.3803,0); } else { me["GEN1-label"].setColor(0.8078,0.8039,0.8078); @@ -1533,13 +1517,13 @@ var canvas_lowerECAM_elec = { me["Gen1Load"].setColor(0.0509,0.7529,0.2941); } - if (systems.ELEC.Source.IDG1.volts.getValue() > 120 or systems.ELEC.Source.IDG1.volts.getValue() < 110) { + if (systems.ELEC.Source.IDG1.volts.getValue() >= 120 or systems.ELEC.Source.IDG1.volts.getValue() <= 110) { me["Gen1Volt"].setColor(0.7333,0.3803,0); } else { me["Gen1Volt"].setColor(0.0509,0.7529,0.2941); } - if (systems.ELEC.Source.IDG1.hertz.getValue() > 410 or systems.ELEC.Source.IDG1.hertz.getValue() < 390) { + if (systems.ELEC.Source.IDG1.hertz.getValue() >= 410 or systems.ELEC.Source.IDG1.hertz.getValue() <= 390) { me["Gen1Hz"].setColor(0.7333,0.3803,0); } else { me["Gen1Hz"].setColor(0.0509,0.7529,0.2941); @@ -1550,35 +1534,16 @@ var canvas_lowerECAM_elec = { if (systems.ELEC.Switch.gen2.getValue() == 0) { me["GEN2-content"].hide(); me["GEN2-off"].show(); - if (systems.ELEC.Source.IDG2.gcrRelay.getValue()) { - me["GEN2-label"].setColor(0.7333,0.3803,0); - } else { - me["GEN2-label"].setColor(0.8078,0.8039,0.8078); - } - - if (eng2_running.getValue() == 0) { - me["GEN2-num-label"].setColor(0.7333,0.3803,0); - } else { - me["GEN2-num-label"].setColor(0.8078,0.8039,0.8078); - } + me["GEN2-label"].setColor(0.7333,0.3803,0); } else { me["GEN2-content"].show(); me["GEN2-off"].hide(); - # me["Gen2Load"].setText(sprintf("%s", math.round(gen2_load.getValue()))); + + me["Gen2Load"].setText(sprintf("%s", math.round(gen2_load.getValue()))); me["Gen2Volt"].setText(sprintf("%s", math.round(systems.ELEC.Source.IDG2.volts.getValue()))); - if (systems.ELEC.Source.IDG2.hertz.getValue() == 0) { - me["Gen2Hz"].setText(sprintf("XX")); - } else { - me["Gen2Hz"].setText(sprintf("%s", math.round(systems.ELEC.Source.IDG2.hertz.getValue()))); - } - - if (eng2_running.getValue() == 0) { - me["GEN2-num-label"].setColor(0.7333,0.3803,0); - } else { - me["GEN2-num-label"].setColor(0.8078,0.8039,0.8078); - } - - if (systems.ELEC.Source.IDG2.volts.getValue() > 120 or systems.ELEC.Source.IDG2.volts.getValue() < 110 or systems.ELEC.Source.IDG2.hertz.getValue() > 410 or systems.ELEC.Source.IDG2.hertz.getValue() < 390 or gen2_load.getValue() >= 110) { + me["Gen2Hz"].setText(sprintf("%s", math.round(systems.ELEC.Source.IDG2.hertz.getValue()))); + + if (systems.ELEC.Source.IDG2.volts.getValue() >= 120 or systems.ELEC.Source.IDG2.volts.getValue() <= 110 or systems.ELEC.Source.IDG2.hertz.getValue() >= 410 or systems.ELEC.Source.IDG2.hertz.getValue() < 390 or gen2_load.getValue() >= 110) { me["GEN2-label"].setColor(0.7333,0.3803,0); } else { me["GEN2-label"].setColor(0.8078,0.8039,0.8078); @@ -1590,14 +1555,13 @@ var canvas_lowerECAM_elec = { me["Gen2Load"].setColor(0.0509,0.7529,0.2941); } - - if (systems.ELEC.Source.IDG2.volts.getValue() > 120 or systems.ELEC.Source.IDG2.volts.getValue() < 110) { + if (systems.ELEC.Source.IDG2.volts.getValue() >= 120 or systems.ELEC.Source.IDG2.volts.getValue() <= 110) { me["Gen2Volt"].setColor(0.7333,0.3803,0); } else { me["Gen2Volt"].setColor(0.0509,0.7529,0.2941); } - if (systems.ELEC.Source.IDG2.hertz.getValue() > 410 or systems.ELEC.Source.IDG2.hertz.getValue() < 390) { + if (systems.ELEC.Source.IDG2.hertz.getValue() >= 410 or systems.ELEC.Source.IDG2.hertz.getValue() <= 390) { me["Gen2Hz"].setColor(0.7333,0.3803,0); } else { me["Gen2Hz"].setColor(0.0509,0.7529,0.2941); @@ -1682,6 +1646,16 @@ var canvas_lowerECAM_elec = { } } + # STAT INV + if (systems.ELEC.Relay.relay15XE2.getValue()) { + me["STATINV-group"].show(); + me["StatVolt"].setText(sprintf("%s",systems.ELEC.Source.Inverter.volts.getValue())); + me["StatHertz"].setText(sprintf("%s",systems.ELEC.Source.Inverter.hertz.getValue())); + } else { + me["STATINV-group"].hide(); + } + + # GALLEY if (systems.ELEC.SomeThing.galley.getValue()) { me["GalleyShed"].show(); } else { diff --git a/Models/Instruments/Lower-ECAM/res/elec.svg b/Models/Instruments/Lower-ECAM/res/elec.svg index 585983f2..f9a31f55 100644 --- a/Models/Instruments/Lower-ECAM/res/elec.svg +++ b/Models/Instruments/Lower-ECAM/res/elec.svg @@ -12,7 +12,7 @@ viewBox="0 0 1024 1024" version="1.1" id="svg2" - inkscape:version="0.91 r13725" + inkscape:version="0.92.4 (5da689c313, 2019-01-14)" sodipodi:docname="elec.svg"> @@ -37,14 +37,14 @@ guidetolerance="10" inkscape:pageopacity="1" inkscape:pageshadow="2" - inkscape:window-width="1920" - inkscape:window-height="1027" + inkscape:window-width="1366" + inkscape:window-height="705" id="namedview371" showgrid="true" inkscape:zoom="0.5" - inkscape:cx="455.53074" + inkscape:cx="580.45699" inkscape:cy="693.51145" - inkscape:window-x="1592" + inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" inkscape:current-layer="svg2" @@ -92,18 +92,17 @@ ELEC + style="font-size:48.29243088px;line-height:0;fill:#cecdce;fill-opacity:1;stroke-width:4.02436924px">ELEC BAT 1 + style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle">BAT 1 120000 °C G.LOAD 0.6 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#bb6100;fill-opacity:1">G.LOAD 0.6 OFF 28 V BAT 2 OFF + style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle">OFF 28 0 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b">0 A DC BAT DC 1 + style="font-size:40px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle;fill:#0dc04b;fill-opacity:1">DC 1 DC 2 DC ESS + style="font-size:40px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle;fill:#0dc04b;fill-opacity:1">DC ESS TR 1 28 V TR 2 + style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle">TR 2 28 150 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b">150 AC 1 AC 2 + style="font-size:40px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle;fill:#0dc04b;fill-opacity:1">AC 2 AC ESS GEN OFF + style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle">OFF 0 115 V 400 1 + style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle">1 @@ -1222,15 +1171,14 @@ sodipodi:nodetypes="cc" /> 0 % V 400 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b">400 GEN + style="font-size:36px;line-height:0;text-align:start;letter-spacing:-1.60000002px;text-anchor:start">GEN APU GEN + style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle">APU GEN 0 % V EXT GEN + style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle">EXT GEN V 400 IDG + style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle">IDG 1 °C 25 LO PR DISC + style="font-size:36px;line-height:0;text-align:start;letter-spacing:-1.60000002px;text-anchor:start;fill:#bb6100;fill-opacity:1">DISC 25 RISE IDG 2 + style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle">2 LO PR + style="font-size:36px;line-height:0;text-align:end;letter-spacing:-1.60000002px;text-anchor:end;fill:#bb6100;fill-opacity:1">LO PR 25 RISE + id="tspan3747">  GALLEY SHED ESS TR + style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle">ESS TR 28 V SHED SHED + style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle;fill:#bb6100;fill-opacity:1">SHED EMER GEN 115 V + + + + + + + + STAT INV + 115 + V + 400 + HZ + diff --git a/Nasal/Systems/electrical.nas b/Nasal/Systems/electrical.nas index 98e5e6e2..2849bb63 100644 --- a/Nasal/Systems/electrical.nas +++ b/Nasal/Systems/electrical.nas @@ -89,6 +89,7 @@ var ELEC = { tr1Contactor: props.globals.getNode("/systems/electrical/relay/tr-contactor-1/contact-pos"), tr2Contactor: props.globals.getNode("/systems/electrical/relay/tr-contactor-2/contact-pos"), relay7XB: props.globals.getNode("/systems/electrical/sources/si-1/inverter-control/relay-7xb"), + relay15XE2: props.globals.getNode("/systems/electrical/relay/relay-15XE2/contact-pos"), }, SomeThing: { emerGenSignal: props.globals.getNode("/systems/electrical/some-electric-thingie/emer-gen-operate"), @@ -150,6 +151,10 @@ var ELEC = { hertz: props.globals.getNode("/systems/electrical/sources/idg-2/output-hertz"), volts: props.globals.getNode("/systems/electrical/sources/idg-2/output-volt"), }, + Inverter: { + hertz: props.globals.getNode("/systems/electrical/sources/si-1/output-hertz"), + volts: props.globals.getNode("/systems/electrical/sources/si-1/output-volt"), + }, }, Switch: { acEssFeed: props.globals.getNode("/controls/electrical/switches/ac-ess-feed"),