]> git.mxchange.org Git - flightgear.git/blobdiff - src/Controls/controls.hxx
Currently, when the sim pauses, all IO is also halted. To me it generally
[flightgear.git] / src / Controls / controls.hxx
index 2e467a5ae5fdb02f1c670289c129d59cd546bb38..ad7e3085c463fc3a014a2ed95ca2ff92c69f43af 100644 (file)
@@ -25,8 +25,8 @@
 #define _CONTROLS_HXX
 
 #include <simgear/props/props.hxx>
+#include <simgear/structure/subsystem_mgr.hxx>
 
-#include <Main/fgfs.hxx>
 #include <Main/globals.hxx>
 
 #ifndef __cplusplus                                                          
@@ -36,7 +36,7 @@
 
 // Define a structure containing the control parameters
 
-class FGControls : public FGSubsystem
+class FGControls : public SGSubsystem
 {
 
 public:
@@ -86,6 +86,23 @@ public:
        MAX_AUTOPILOTS = 3
     };
 
+    enum {
+       ALL_EJECTION_SEATS = -1,
+       MAX_EJECTION_SEATS = 10
+    };
+   
+    enum {
+       SEAT_SAFED = -1,
+       SEAT_ARMED = 0,
+       SEAT_FAIL = 1
+    };
+   
+    enum { 
+       CMD_SEL_NORM = -1,
+       CMD_SEL_AFT = 0,
+       CMD_SEL_SOLO = 1
+    };
+    
 private:
     // controls/flight/
     double aileron;
@@ -211,7 +228,9 @@ private:
     // controls/seat/
     double vertical_adjust;
     double fore_aft_adjust;
-    bool eject;
+    bool eject[MAX_EJECTION_SEATS];
+    int eseat_status[MAX_EJECTION_SEATS];
+    int cmd_selector_valve;
 
     // controls/APU/
     int off_start_run;
@@ -240,7 +259,7 @@ public:
     FGControls();
     ~FGControls();
 
-    // Implementation of FGSubsystem.
+    // Implementation of SGSubsystem.
     void init ();
     void bind ();
     void unbind ();
@@ -394,7 +413,14 @@ public:
     // controls/seat/
     inline double get_vertical_adjust() const { return vertical_adjust; }
     inline double get_fore_aft_adjust() const { return fore_aft_adjust; }
-    inline bool get_eject() const { return eject; }
+    inline bool get_ejection_seat( int which_seat ) const {
+        return eject[which_seat];
+    }
+    inline int get_eseat_status( int which_seat ) const {
+        return eseat_status[which_seat];
+    }
+    inline int get_cmd_selector_valve() const { return cmd_selector_valve; }
+    
 
     // controls/APU/
     inline int get_off_start_run() const { return off_start_run; }
@@ -571,7 +597,9 @@ public:
     void move_vertical_adjust( double amt );
     void set_fore_aft_adjust( double pos );
     void move_fore_aft_adjust( double amt );
-    void set_eject( bool val );
+    void set_ejection_seat( int which_seat, bool val );
+    void set_eseat_status( int which_seat, int val );
+    void set_cmd_selector_valve( int val );
 
     // controls/APU/
     void set_off_start_run( int pos );