From: curt Date: Wed, 6 Oct 1999 20:57:47 +0000 (+0000) Subject: Added a simple auto-coordination capability. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6de1139450e08653c4be1d89f65518bcd8f46541;p=flightgear.git Added a simple auto-coordination capability. --- diff --git a/src/Controls/Makefile.am b/src/Controls/Makefile.am index 8327dc84c..68c60fd6f 100644 --- a/src/Controls/Makefile.am +++ b/src/Controls/Makefile.am @@ -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 diff --git a/src/Controls/controls.hxx b/src/Controls/controls.hxx index 43286b08d..690e9b11c 100644 --- a/src/Controls/controls.hxx +++ b/src/Controls/controls.hxx @@ -24,6 +24,7 @@ #ifndef _CONTROLS_HXX #define _CONTROLS_HXX +#include
#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;