From 6de1139450e08653c4be1d89f65518bcd8f46541 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 6 Oct 1999 20:57:47 +0000 Subject: [PATCH] Added a simple auto-coordination capability. --- src/Controls/Makefile.am | 2 +- src/Controls/controls.hxx | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) 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; -- 2.39.5