]> git.mxchange.org Git - flightgear.git/blobdiff - src/Systems/electrical.hxx
Don't scale elevator by 0.5.
[flightgear.git] / src / Systems / electrical.hxx
index da29db5467b219941459d99cbb3f3e5502c4e8fa..fee71cf0b0886e39b9c4c4461132cee67d7ea822 100644 (file)
@@ -38,8 +38,8 @@
 SG_USING_STD(string);
 SG_USING_STD(vector);
 
-#include <simgear/misc/props.hxx>
-#include <Main/fgfs.hxx>
+#include <simgear/props/props.hxx>
+#include <simgear/structure/subsystem_mgr.hxx>
 
 
 // Forward declaration
@@ -117,6 +117,7 @@ class FGElectricalSupplier : public FGElectricalComponent {
         FG_EXTERNAL = 2
     };
 
+    string rpm_src;
     int model;
     double volts;
     double amps;
@@ -170,24 +171,19 @@ public:
         switches.push_back( node );
     }
 
+    // set all switches to the specified state
+    void set_switches( bool state );
+
     bool get_state();
 };
 
 
 /**
- * Model an electrical system.  This is a simple system with the
- * alternator hardwired to engine[0]/rpm
- *
- * Input properties:
- *
- * /engines/engine[0]/rpm
- *
- * Output properties:
- *
+ * Model an electrical system.  This is a fairly simplistic system
  * 
  */
 
-class FGElectricalSystem : public FGSubsystem
+class FGElectricalSystem : public SGSubsystem
 {
 
 public:
@@ -201,7 +197,7 @@ public:
     virtual void update (double dt);
 
     bool build ();
-    void propogate( FGElectricalComponent *node, double val, string s = "" );
+    void propagate( FGElectricalComponent *node, double val, string s = "" );
     FGElectricalComponent *find ( const string &name );
 
 protected:
@@ -218,6 +214,9 @@ private:
     comp_list buses;
     comp_list outputs;
     comp_list connectors;
+
+    SGPropertyNode *_volts_out;
+    SGPropertyNode *_amps_out;
 };