From 05386e64b3e67f5bdddbd0c3b9414035ce7ef654 Mon Sep 17 00:00:00 2001
From: Joshua Davidson <joshuadavidson2000@gmail.com>
Date: Thu, 26 Oct 2017 10:51:27 -0400
Subject: [PATCH] A32X: FMGC: SRS engaging in wrong phases

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

diff --git a/Nasal/PFD_FMA.nas b/Nasal/PFD_FMA.nas
index f60e0ad1..97cf03ec 100644
--- a/Nasal/PFD_FMA.nas
+++ b/Nasal/PFD_FMA.nas
@@ -106,7 +106,8 @@ var loopFMA = maketimer(0.05, func {
 	var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
 	var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
 	var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
-	if ((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)))) {
+	var wow = getprop("/gear/gear[0]/wow");
+	if (wow and ((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83))))) {
 		# RWY Engagement would go here, but automatic ILS selection is not simulated yet.
 		if (getprop("/FMGC/internal/v2-set") == 1 and getprop("/it-autoflight/output/vert") != 7) {
 			setprop("/it-autoflight/input/vert", 7);
diff --git a/revision.txt b/revision.txt
index 249f5c6f..966f6062 100644
--- a/revision.txt
+++ b/revision.txt
@@ -1 +1 @@
-3014
\ No newline at end of file
+3015
\ No newline at end of file