]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/xmlauto.hxx
Create a "passive" mode for the autopilot. This is analogous to running the
[flightgear.git] / src / Autopilot / xmlauto.hxx
index d87dc6a65fd7f0b464bada80d151e7570742b378..38cfef890dc4957409b05878a6a3c2846f4f5817 100644 (file)
@@ -45,6 +45,8 @@ SG_USING_STD(deque);
 #include <simgear/props/props.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
 
+#include <Main/fg_props.hxx>
+
 
 /**
  * Base class for other autopilot components
@@ -56,20 +58,24 @@ protected:
 
     string name;
 
-    SGPropertyNode *enable_prop;
+    SGPropertyNode_ptr enable_prop;
+    SGPropertyNode_ptr passive_mode;
     string enable_value;
+    bool honor_passive;
     bool enabled;
 
-    SGPropertyNode *input_prop;
-    SGPropertyNode *r_n_prop;
+    SGPropertyNode_ptr input_prop;
+    SGPropertyNode_ptr r_n_prop;
     double r_n_value;
-    vector <SGPropertyNode *> output_list;
+    vector <SGPropertyNode_ptr> output_list;
 
 public:
 
     FGXMLAutoComponent() :
       enable_prop( NULL ),
+      passive_mode( fgGetNode("/autopilot/settings/passive-mode", true) ),
       enable_value( "" ),
+      honor_passive( false ),
       enabled( false ),
       input_prop( NULL ),
       r_n_prop( NULL ),
@@ -152,7 +158,7 @@ private:
     // proportional component data
     bool proportional;
     double Kp;
-    SGPropertyNode *offset_prop;
+    SGPropertyNode_ptr offset_prop;
     double offset_value;
 
     // integral component data
@@ -274,7 +280,7 @@ protected:
 private:
 
     bool serviceable;
-    SGPropertyNode *config_props;
+    SGPropertyNode_ptr config_props;
     comp_list components;
 };