]> git.mxchange.org Git - flightgear.git/commitdiff
Modified Files:
authorfrohlich <frohlich>
Sun, 7 Jan 2007 11:50:39 +0000 (11:50 +0000)
committerfrohlich <frohlich>
Sun, 7 Jan 2007 11:50:39 +0000 (11:50 +0000)
controls.cxx controls.hxx: Add nose wheel steering control switch

src/Aircraft/controls.cxx
src/Aircraft/controls.hxx

index 96081e0ae3a83a31795d138a5b02f30ee390cc23..150dbf296dfc6681c635671dc4342c16faff17ea 100644 (file)
@@ -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 )
 {
index e53155be27c629f7c15aeda92ebe7bbed474d4d6..00caa0b19399c1b697cf6b9e4db67d80d9271d89 100644 (file)
@@ -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 );