From de03bd75bd1b16876c8b4ff2e28677d5f9ad8e7c Mon Sep 17 00:00:00 2001
From: curt <curt>
Date: Tue, 12 Oct 1999 03:29:10 +0000
Subject: [PATCH] Default to no force-disengage of autopilot for now.

---
 src/Autopilot/autopilot.cxx | 39 ++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 18 deletions(-)

diff --git a/src/Autopilot/autopilot.cxx b/src/Autopilot/autopilot.cxx
index 40efd1634..f3ab8e734 100644
--- a/src/Autopilot/autopilot.cxx
+++ b/src/Autopilot/autopilot.cxx
@@ -1160,27 +1160,30 @@ int fgAPRun( void ) {
     double lat = fgAPget_latitude();
     double lon = fgAPget_longitude();
 
-	// see if somebody else has changed them
+#ifdef FG_FORCE_AUTO_DISENGAGE
+    // see if somebody else has changed them
     if( fabs(aileron - APData->old_aileron) > APData->disengage_threshold ||
-	fabs(elevator - APData->old_elevator) > APData->disengage_threshold ||		
-	fabs(elevator_trim - APData->old_elevator_trim) > APData->disengage_threshold ||		
+	fabs(elevator - APData->old_elevator) > APData->disengage_threshold ||
+	fabs(elevator_trim - APData->old_elevator_trim) > 
+	APData->disengage_threshold ||		
 	fabs(rudder - APData->old_rudder) > APData->disengage_threshold )
-	{
-	    // if controls changed externally turn autopilot off
-	    APData->waypoint_hold = false ;     // turn the target hold off
-	    APData->heading_hold = false ;      // turn the heading hold off
-	    APData->altitude_hold = false ;     // turn the altitude hold off
-	    APData->terrain_follow = false;     // turn the terrain_follow hold off
-	    //		APData->auto_throttle = false;      // turn the auto_throttle off
+    {
+	// if controls changed externally turn autopilot off
+	APData->waypoint_hold = false ;     // turn the target hold off
+	APData->heading_hold = false ;      // turn the heading hold off
+	APData->altitude_hold = false ;     // turn the altitude hold off
+	APData->terrain_follow = false;     // turn the terrain_follow hold off
+	// APData->auto_throttle = false;      // turn the auto_throttle off
 
-		// stash this runs control settings
-	    APData->old_aileron = aileron;
-	    APData->old_elevator = elevator;
-	    APData->old_elevator_trim = elevator_trim;
-	    APData->old_rudder = rudder;
-		
-	    return(0);
-	}
+	// stash this runs control settings
+	APData->old_aileron = aileron;
+	APData->old_elevator = elevator;
+	APData->old_elevator_trim = elevator_trim;
+	APData->old_rudder = rudder;
+	
+	return 0;
+    }
+#endif
 	
     // waypoint hold enabled?
     if ( APData->waypoint_hold == true )