]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/PistonEngine.cpp
MSVC (warning) fixes.
[flightgear.git] / src / FDM / YASim / PistonEngine.cpp
index e88178fb20c0568ade2e4a18c60a6cb880ae16ff..75c70d9de29fb9a860b918c6269ed6b407aaaa44 100644 (file)
@@ -11,7 +11,6 @@ PistonEngine::PistonEngine(float power, float speed)
 {
     _boost = 1;
     _running = false;
-    _cranking = false;
     _fuel = true;
 
     // Presume a BSFC (in lb/hour per HP) of 0.45.  In SI that becomes
@@ -68,44 +67,9 @@ float PistonEngine::getMaxPower()
     return _power0;
 }
 
-void PistonEngine::setThrottle(float t)
-{
-    _throttle = t;
-}
-
-void PistonEngine::setRunning(bool r)
-{
-    _running = r;
-}
-
-void PistonEngine::setStarter(bool s)
-{
-    _cranking = s;
-}
-
-void PistonEngine::setMagnetos(int m)
-{
-    _magnetos = m;
-}
-
-void PistonEngine::setMixture(float m)
-{
-    _mixture = m;
-}
-
-void PistonEngine::setBoost(float boost)
-{
-    _boost = boost;
-}
-
-bool PistonEngine::isRunning()
-{
-    return _running;
-}
-
 bool PistonEngine::isCranking()
 {
-    return _cranking;
+    return _starter;
 }
 
 float PistonEngine::getTorque()
@@ -196,7 +160,7 @@ void PistonEngine::calc(float pressure, float temp, float speed)
     // speed on a 160HP engine, that comes out to about 160*.15/30 ==
     // 0.8 HP starter motor.  Which sounds about right to me.  I think
     // I've finally got this tuned. :)
-    if(_cranking && !_running)
+    if(_starter && !_running)
        _torque += 0.15f * _power0/_omega0;
 
     // Also, add a negative torque of 8% of cruise, to represent