From 8d1a79871a9022693aadd27e1c70aeef2dd48d8e Mon Sep 17 00:00:00 2001
From: Joshua Davidson <joshuadavidson2000@gmail.com>
Date: Wed, 22 Nov 2017 13:36:14 -0500
Subject: [PATCH] A3XX: FADEC: Add Approach Idle, and other Idle limit tweaks

---
 Systems/fadec-cfm.xml | 23 +++++++++++++++++++----
 Systems/fadec-iae.xml | 23 +++++++++++++++++++----
 revision.txt          |  2 +-
 3 files changed, 39 insertions(+), 9 deletions(-)

diff --git a/Systems/fadec-cfm.xml b/Systems/fadec-cfm.xml
index f6bc50ad..820b9c7c 100644
--- a/Systems/fadec-cfm.xml
+++ b/Systems/fadec-cfm.xml
@@ -18,10 +18,25 @@
 		<update-interval-secs type="double">0.05</update-interval-secs>
 		<input>
 			<condition>
-				<greater-than-equals>
-					<property>/position/gear-agl-ft</property>
-					<value>50</value>
-				</greater-than-equals>
+				<and>
+					<not-equals>
+						<property>/controls/flight/flap-lever</property>
+						<value>0</value>
+					</not-equals>
+					<equals>
+						<property>/gear/gear[0]/wow</property>
+						<value>0</value>
+					</equals>
+				</and>
+			</condition>
+			<value>0.1</value>
+		</input>
+		<input>
+			<condition>
+				<equals>
+					<property>/gear/gear[0]/wow</property>
+					<value>0</value>
+				</equals>
 			</condition>
 			<expression>
 				<table>
diff --git a/Systems/fadec-iae.xml b/Systems/fadec-iae.xml
index 95c59e33..0e7cfb95 100644
--- a/Systems/fadec-iae.xml
+++ b/Systems/fadec-iae.xml
@@ -18,10 +18,25 @@
 		<update-interval-secs type="double">0.05</update-interval-secs>
 		<input>
 			<condition>
-				<greater-than-equals>
-					<property>/position/gear-agl-ft</property>
-					<value>50</value>
-				</greater-than-equals>
+				<and>
+					<not-equals>
+						<property>/controls/flight/flap-lever</property>
+						<value>0</value>
+					</not-equals>
+					<equals>
+						<property>/gear/gear[0]/wow</property>
+						<value>0</value>
+					</equals>
+				</and>
+			</condition>
+			<value>0.1</value>
+		</input>
+		<input>
+			<condition>
+				<equals>
+					<property>/gear/gear[0]/wow</property>
+					<value>0</value>
+				</equals>
 			</condition>
 			<expression>
 				<table>
diff --git a/revision.txt b/revision.txt
index 0cdf739f..97a9aea0 100644
--- a/revision.txt
+++ b/revision.txt
@@ -1 +1 @@
-4028
\ No newline at end of file
+4029
\ No newline at end of file