]> git.mxchange.org Git - flightgear.git/commitdiff
Added a simple auto-coordination capability.
authorcurt <curt>
Wed, 6 Oct 1999 20:57:47 +0000 (20:57 +0000)
committercurt <curt>
Wed, 6 Oct 1999 20:57:47 +0000 (20:57 +0000)
src/Controls/Makefile.am
src/Controls/controls.hxx

index 8327dc84c230419641819c93cfc5c2b124ad6221..68c60fd6f91ffbb9589c9e1336bd584a11e9d7c6 100644 (file)
@@ -2,4 +2,4 @@ noinst_LIBRARIES = libControls.a
 
 libControls_a_SOURCES = controls.cxx controls.hxx
 
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
index 43286b08dba2acee5f81c5f98998dd8acc9e8b18..690e9b11c6be30a5a595e876c26ee6ab556dad86 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _CONTROLS_HXX
 #define _CONTROLS_HXX
 
+#include <Main/options.hxx>
 
 #ifndef __cplusplus                                                          
 # error This library requires C++
@@ -78,11 +79,25 @@ public:
        aileron = pos;
        if ( aileron < -1.0 ) aileron = -1.0;
        if ( aileron >  1.0 ) aileron =  1.0;
+
+       // check for autocoordination
+       if ( current_options.get_auto_coordination() == 
+            fgOPTIONS::FG_AUTO_COORD_ENABLED ) 
+       {
+           set_rudder( aileron / 2.0 );
+       }
     }
     inline void move_aileron( double amt ) {
        aileron += amt;
        if ( aileron < -1.0 ) aileron = -1.0;
        if ( aileron >  1.0 ) aileron =  1.0;
+
+       // check for autocoordination
+       if ( current_options.get_auto_coordination() == 
+            fgOPTIONS::FG_AUTO_COORD_ENABLED ) 
+       {
+           set_rudder( aileron / 2.0 );
+       }
     }
     inline void set_elevator( double pos ) {
        elevator = pos;