From: frohlich Date: Sun, 7 Jan 2007 11:50:39 +0000 (+0000) Subject: Modified Files: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4c1c10ffef2c2bf85b6fc0689acff1eb65eed079;p=flightgear.git Modified Files: controls.cxx controls.hxx: Add nose wheel steering control switch --- diff --git a/src/Aircraft/controls.cxx b/src/Aircraft/controls.cxx index 96081e0ae..150dbf296 100644 --- a/src/Aircraft/controls.cxx +++ b/src/Aircraft/controls.cxx @@ -78,6 +78,7 @@ FGControls::FGControls() : copilot_brake_right( 0.0 ), brake_parking( 0.0 ), steering( 0.0 ), + nose_wheel_steering( true ), gear_down( true ), antiskid( true ), tailhook( false ), @@ -157,6 +158,7 @@ void FGControls::reset_all() set_fuel_selector( ALL_TANKS, true ); dump_valve = false; steering = 0.0; + nose_wheel_steering = true; gear_down = true; tailhook = false; launchbar = false; @@ -468,6 +470,11 @@ FGControls::bind () &FGControls::get_steering, &FGControls::set_steering); fgSetArchivable("/controls/gear/steering"); + fgTie("/controls/gear/nose-wheel-steering", this, + &FGControls::get_nose_wheel_steering, + &FGControls::set_nose_wheel_steering); + fgSetArchivable("/controls/gear/nose-wheel-steering"); + fgTie("/controls/gear/gear-down", this, &FGControls::get_gear_down, &FGControls::set_gear_down); fgSetArchivable("/controls/gear/gear-down"); @@ -915,7 +922,8 @@ void FGControls::unbind () fgUntie("/controls/gear/brake-right"); fgUntie("/controls/gear/brake-parking"); fgUntie("/controls/gear/steering"); - fgUntie("/controls/gear/gear_down"); + fgUntie("/controls/gear/nose-wheel-steering"); + fgUntie("/controls/gear/gear-down"); fgUntie("/controls/gear/antiskid"); fgUntie("/controls/gear/tailhook"); fgUntie("/controls/gear/launchbar"); @@ -1710,6 +1718,12 @@ FGControls::set_steering( double angle ) CLAMP(&steering, -80.0, 80.0); } +void +FGControls::set_nose_wheel_steering( bool nws ) +{ + nose_wheel_steering = nws; +} + void FGControls::move_steering( double angle ) { diff --git a/src/Aircraft/controls.hxx b/src/Aircraft/controls.hxx index e53155be2..00caa0b19 100644 --- a/src/Aircraft/controls.hxx +++ b/src/Aircraft/controls.hxx @@ -161,6 +161,7 @@ private: double copilot_brake_right; double brake_parking; double steering; + bool nose_wheel_steering; bool gear_down; bool antiskid; bool tailhook; @@ -346,6 +347,7 @@ public: inline double get_copilot_brake_right() const { return copilot_brake_right; } inline double get_brake_parking() const { return brake_parking; } inline double get_steering() const { return steering; } + inline bool get_nose_wheel_steering() const { return nose_wheel_steering; } inline bool get_gear_down() const { return gear_down; } inline bool get_antiskid() const { return antiskid; } inline bool get_tailhook() const { return tailhook; } @@ -533,6 +535,7 @@ public: void set_brake_parking( double pos ); void set_steering( double pos ); void move_steering( double amt ); + void set_nose_wheel_steering( bool nws ); void set_gear_down( bool gear ); void set_antiskid( bool val ); void set_tailhook( bool val );