From 1da96f3c326d0da741ac00787b660f897416c42e Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Sun, 11 Jun 2017 00:17:34 -0400 Subject: [PATCH] A3XX: Fix bug in Electrical, thanks swm! --- Nasal/electrical.nas | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Nasal/electrical.nas b/Nasal/electrical.nas index dd7c1bfa..45671384 100644 --- a/Nasal/electrical.nas +++ b/Nasal/electrical.nas @@ -277,6 +277,14 @@ var master_elec = func { setprop("/systems/electrical/extra/apu-hz", 0); } + if (stateL == 3 and gen1_sw and !gen1_fail) { + setprop("/systems/electrical/extra/gen1-volts", ac_volt_std); + setprop("/systems/electrical/bus/gen1-hz", ac_hz_std); + } else { + setprop("/systems/electrical/extra/gen1-volts", 0); + setprop("/systems/electrical/bus/gen1-hz", 0); + } + if (stateR == 3 and gen2_sw and !gen2_fail) { setprop("/systems/electrical/extra/gen2-volts", ac_volt_std); setprop("/systems/electrical/bus/gen2-hz", ac_hz_std);