From cb46cd82630d4ed8ace037a10959f50369ead258 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 5 May 2017 17:04:15 +0100 Subject: [PATCH] add generators and the generator HZ --- Models/Instruments/ECAM/page-elec.xml | 121 +++++++++++++++++++++++++- Nasal/electrical.nas | 8 +- 2 files changed, 125 insertions(+), 4 deletions(-) diff --git a/Models/Instruments/ECAM/page-elec.xml b/Models/Instruments/ECAM/page-elec.xml index 451c2436..2aa9fec5 100644 --- a/Models/Instruments/ECAM/page-elec.xml +++ b/Models/Instruments/ECAM/page-elec.xml @@ -214,7 +214,6 @@ - text GEN1-volts @@ -250,7 +249,6 @@ - text GEN2-volts @@ -582,7 +580,126 @@ + + + text + GEN1-hz + + 0 + 1.0 + 0 + + helvetica_bold + 11 + + + number-value + /systems/electrical/bus/gen1-hz + %3.0f + + + + + y-shift + -68 + + + x-shift + -117 + + + + + /controls/electrical/switches/gen1 + 1 + + + + + text + GEN2-hz + + 0 + 1.0 + 0 + + helvetica_bold + 11 + + + number-value + /systems/electrical/bus/gen2-hz + %3.0f + + + + + y-shift + -68 + + + x-shift + 91 + + + + + /controls/electrical/switches/gen2 + 1 + + + + + gen1off + true + 44 + 55 + + Aircraft/A320Family/Models/Instruments/ECAM/res/elec-gen1off.png + + + + y-shift + -48 + + + x-shift + -103 + + + + + /controls/electrical/switches/gen1 + 0 + + + + + gen2off + true + 44 + 55 + + Aircraft/A320Family/Models/Instruments/ECAM/res/elec-gen2off.png + + + + y-shift + -48 + + + x-shift + 106 + + + + + /controls/electrical/switches/gen2 + 0 + + + diff --git a/Nasal/electrical.nas b/Nasal/electrical.nas index 000ba561..f24ef5a0 100644 --- a/Nasal/electrical.nas +++ b/Nasal/electrical.nas @@ -35,8 +35,8 @@ var elec_init = func { setprop("/systems/electrical/bus/dc-ess", 0); setprop("/systems/electrical/bus/ac1", 0); setprop("/systems/electrical/bus/ac2", 0); - setprop("/systems/electrical/bus/ac1-hz", 0); - setprop("/systems/electrical/bus/ac2-hz", 0); + setprop("/systems/electrical/bus/gen1-hz", 0); + setprop("/systems/electrical/bus/gen2-hz", 0); setprop("/systems/electrical/bus/ac-ess", 0); setprop("/systems/electrical/extra/ext-volts", 0); setprop("/systems/electrical/extra/apu-volts", 0); @@ -151,12 +151,14 @@ var master_elec = func { } else if (stateL == 3 and gen1_sw) { setprop("/systems/electrical/bus/ac1", ac_volt_std); setprop("/systems/electrical/bus/ac-ess", ac_volt_std); + setprop("/systems/electrical/bus/gen1-hz", ac_hz_std); setprop("/systems/electrical/bus/dc1", dc_volt_std); setprop("/systems/electrical/bus/dc-ess", dc_volt_std); setprop("/systems/electrical/bus/dc1-amps", dc_amps_std); } else if (apu_ext_crosstie_sw == 1 and xtieL) { setprop("/systems/electrical/bus/ac1", ac_volt_std); setprop("/systems/electrical/bus/ac-ess", ac_volt_std); + setprop("/systems/electrical/bus/gen1-hz", ac_hz_std); setprop("/systems/electrical/bus/dc1", dc_volt_std); setprop("/systems/electrical/bus/dc-ess", dc_volt_std); setprop("/systems/electrical/bus/dc1-amps", dc_amps_std); @@ -196,12 +198,14 @@ var master_elec = func { } else if (stateR == 3 and gen2_sw) { setprop("/systems/electrical/bus/ac2", ac_volt_std); setprop("/systems/electrical/bus/ac-ess", ac_volt_std); + setprop("/systems/electrical/bus/gen2-hz", ac_hz_std); setprop("/systems/electrical/bus/dc2", dc_volt_std); setprop("/systems/electrical/bus/dc-ess", dc_volt_std); setprop("/systems/electrical/bus/dc2-amps", dc_amps_std); } else if (apu_ext_crosstie_sw == 1 and xtieR) { setprop("/systems/electrical/bus/ac2", ac_volt_std); setprop("/systems/electrical/bus/ac-ess", ac_volt_std); + setprop("/systems/electrical/bus/gen2-hz", ac_hz_std); setprop("/systems/electrical/bus/dc2", dc_volt_std); setprop("/systems/electrical/bus/dc-ess", dc_volt_std); setprop("/systems/electrical/bus/dc2-amps", dc_amps_std);