From 476bae9fa6ef00830ff3929cabf3d9d06ff6dbed Mon Sep 17 00:00:00 2001
From: Joshua Davidson <joshuadavidson2000@gmail.com>
Date: Tue, 26 Sep 2017 14:56:35 -0400
Subject: [PATCH] A32X: Electrical bugfix

---
 Nasal/electrical.nas | 5 +++--
 revision.txt         | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Nasal/electrical.nas b/Nasal/electrical.nas
index 37c27e4c..e58e2939 100644
--- a/Nasal/electrical.nas
+++ b/Nasal/electrical.nas
@@ -169,8 +169,6 @@ var master_elec = func {
 	extpwr_on = getprop("/controls/switches/cart");
 	stateL = getprop("/engines/engine[0]/state");
 	stateR = getprop("/engines/engine[1]/state");
-	xtieL = getprop("/controls/electrical/xtie/xtieL");
-	xtieR = getprop("/controls/electrical/xtie/xtieR");
 	ac1 = getprop("/systems/electrical/bus/ac1");
 	ac2 = getprop("/systems/electrical/bus/ac2");
 	ac_ess = getprop("/systems/electrical/bus/ac-ess");
@@ -231,6 +229,9 @@ var master_elec = func {
 		setprop("/controls/electrical/xtie/xtieL", 0);
 	}
 	
+	xtieL = getprop("/controls/electrical/xtie/xtieL");
+	xtieR = getprop("/controls/electrical/xtie/xtieR");
+	
 	# Left DC bus yes?
 	if (stateL == 3 and gen1_sw and !gen1_fail) {
 		setprop("/systems/electrical/bus/dc1", dc_volt_std);
diff --git a/revision.txt b/revision.txt
index 93682b45..e4a36c37 100644
--- a/revision.txt
+++ b/revision.txt
@@ -1 +1 @@
-1538
\ No newline at end of file
+1539
\ No newline at end of file