]> git.mxchange.org Git - flightgear.git/commitdiff
Mathias FröhlichMathias Fröhlich:
authorehofman <ehofman>
Fri, 19 Nov 2004 12:33:53 +0000 (12:33 +0000)
committerehofman <ehofman>
Fri, 19 Nov 2004 12:33:53 +0000 (12:33 +0000)
Add some controls required for carrier operations:

/controls/gear/launchbar

should be 1.0 if the launchbar is lowered, that means the aircraft should now
be arrested at the catapult.

/controls/gear/catapult-launch-cmd

Should be set to 1.0 when the aircraft should be launched from tha catapult.

src/Controls/controls.cxx
src/Controls/controls.hxx

index a36ee4d9d3c33a62fa3d910668ab7ca7c9014dcb..ecf56d8f3eee1ac2d8dbd236c98689b94b919607 100644 (file)
@@ -81,6 +81,8 @@ FGControls::FGControls() :
     gear_down( true ),
     antiskid( true ),
     tailhook( false ),
+    launchbar( false ),
+    catapult_launch_cmd( false ),
     tailwheel_lock( false ),
     wing_heat( false ),
     pitot_heat( true ),
@@ -157,6 +159,8 @@ void FGControls::reset_all()
     steering =  0.0;
     gear_down = true;
     tailhook = false;
+    launchbar = false;
+    catapult_launch_cmd = false;
     tailwheel_lock = false;
     set_carb_heat( ALL_ENGINES, false );
     set_inlet_heat( ALL_ENGINES, false );
@@ -468,6 +472,14 @@ FGControls::bind ()
        &FGControls::get_tailhook, &FGControls::set_tailhook);
   fgSetArchivable("/controls/gear/tailhook");
 
+  fgTie("/controls/gear/launchbar", this,
+       &FGControls::get_launchbar, &FGControls::set_launchbar);
+  fgSetArchivable("/controls/gear/launchbar");
+
+  fgTie("/controls/gear/catapult-launch-cmd", this,
+       &FGControls::get_catapult_launch_cmd, &FGControls::set_catapult_launch_cmd);
+  fgSetArchivable("/controls/gear/catapult-launch-cmd");
+
   fgTie("/controls/gear/tailwheel-lock", this,
        &FGControls::get_tailwheel_lock, 
         &FGControls::set_tailwheel_lock);
@@ -898,6 +910,8 @@ void FGControls::unbind ()
   fgUntie("/controls/gear/gear_down");
   fgUntie("/controls/gear/antiskid");
   fgUntie("/controls/gear/tailhook");
+  fgUntie("/controls/gear/launchbar");
+  fgUntie("/controls/gear/catapult-launch-cmd");
   fgUntie("/controls/gear/tailwheel-lock");
   for (index = 0; index < MAX_WHEELS; index++) {
     char name[MAX_NAME_LEN];
@@ -1695,6 +1709,18 @@ FGControls::set_tailhook( bool state )
   tailhook = state;
 }
 
+void
+FGControls::set_launchbar( bool state )
+{
+  launchbar = state;
+}
+
+void
+FGControls::set_catapult_launch_cmd( bool state )
+{
+  catapult_launch_cmd = state;
+}
+
 void
 FGControls::set_tailwheel_lock( bool state )
 {
index 82f9b92336cbfbed7c80fa3097e8012c2e27348e..30a9398150671c91ba975ba5ebf681c00170a9ff 100644 (file)
@@ -163,6 +163,8 @@ private:
     bool gear_down;
     bool antiskid;
     bool tailhook;
+    bool launchbar;
+    bool catapult_launch_cmd;
     bool tailwheel_lock;
 
     // controls/gear/wheel[n]/
@@ -345,6 +347,8 @@ public:
     inline bool get_gear_down() const { return gear_down; }
     inline bool get_antiskid() const { return antiskid; }
     inline bool get_tailhook() const { return tailhook; }
+    inline bool get_launchbar() const { return launchbar; }
+    inline bool get_catapult_launch_cmd() const { return catapult_launch_cmd; }
     inline bool get_tailwheel_lock() const { return tailwheel_lock; }
 
     // controls/gear/wheel[n]/
@@ -531,6 +535,8 @@ public:
     void set_gear_down( bool gear );
     void set_antiskid( bool val );
     void set_tailhook( bool val );
+    void set_launchbar( bool val );
+    void set_catapult_launch_cmd( bool val );
     void set_tailwheel_lock( bool val );
 
     // controls/gear/wheel[n]/