]> git.mxchange.org Git - flightgear.git/commitdiff
Default to no force-disengage of autopilot for now.
authorcurt <curt>
Tue, 12 Oct 1999 03:29:10 +0000 (03:29 +0000)
committercurt <curt>
Tue, 12 Oct 1999 03:29:10 +0000 (03:29 +0000)
src/Autopilot/autopilot.cxx

index 40efd1634e84e83e9d9e1503e8569caa4a589115..f3ab8e734cc7f3b926f99c8f9190bd61d562df42 100644 (file)
@@ -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
-
-               // 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);
-       }
+    {
+       // 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;
+    }
+#endif
        
     // waypoint hold enabled?
     if ( APData->waypoint_hold == true )