]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/PropEngine.hpp
Add support for a turbo prop condition lever.
[flightgear.git] / src / FDM / YASim / PropEngine.hpp
index 603dee1629c91512ea2a02a008666ac56a0dc8a3..2e9e7c3c654acdb282d95cb2f2a1cccc462cb015 100644 (file)
@@ -2,25 +2,28 @@
 #define _PROPENGINE_HPP
 
 #include "Thruster.hpp"
+#include "Engine.hpp"
 
 namespace yasim {
 
 class Propeller;
-class PistonEngine;
 
 class PropEngine : public Thruster {
 public:
-    PropEngine(Propeller* prop, PistonEngine* eng, float moment);
+    PropEngine(Propeller* prop, Engine* eng, float moment);
     virtual ~PropEngine();
 
+    void setEngine(Engine* eng) { delete _eng; _eng = eng; }
+
     void setMagnetos(int magnetos);
     void setAdvance(float advance);
     void setPropPitch(float proppitch);
     void setVariableProp(float min, float max);
+    void setPropFeather(int state);
     void setGearRatio(float ratio) { _gearRatio = ratio; }
 
     virtual PropEngine* getPropEngine() { return this; }
-    virtual PistonEngine* getPistonEngine() { return _eng; }
+    virtual Engine* getEngine() { return _eng; }
     virtual Propeller* getPropeller() { return _prop; }
 
     // Dynamic output
@@ -42,7 +45,7 @@ public:
 private:
     float _moment;
     Propeller* _prop;
-    PistonEngine* _eng;
+    Engine* _eng;
 
     bool _variable;
     int _magnetos;  // 0=off, 1=right, 2=left, 3=both