]> git.mxchange.org Git - flightgear.git/commitdiff
Oops, I broke engine starting.
authorandy <andy>
Sat, 1 May 2004 14:30:00 +0000 (14:30 +0000)
committerandy <andy>
Sat, 1 May 2004 14:30:00 +0000 (14:30 +0000)
src/FDM/YASim/PistonEngine.cpp
src/FDM/YASim/PistonEngine.hpp
src/FDM/YASim/PropEngine.cpp

index 938909c62725cfa220f5e2568b5ed127f474bde7..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
@@ -70,7 +69,7 @@ float PistonEngine::getMaxPower()
 
 bool PistonEngine::isCranking()
 {
-    return _cranking;
+    return _starter;
 }
 
 float PistonEngine::getTorque()
@@ -161,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
index 96aac119041489ab44841420cdb2e63aeaf24fc6..2df500d9936b86f15f6f7f59a2c1f31689864710 100644 (file)
@@ -37,7 +37,6 @@ private:
     float _compression;  // compression ratio (>1)
 
     // Runtime state/output:
-    bool _cranking;
     float _mp;
     float _torque;
     float _fuelFlow;
index a6474bc908b3ab8490eba3106c034aa085185129..92a5db16746946a1b71e5dec6277edde7f8117a9 100644 (file)
@@ -97,6 +97,7 @@ void PropEngine::stabilize()
     _eng->setThrottle(_throttle);
     _eng->setMixture(_mixture);
 
+    _eng->setStarter(false);
     _eng->setMagnetos(3);
     _eng->setRunning(true);