]> git.mxchange.org Git - flightgear.git/commitdiff
At low rpms when the alternator isn't able to generate enough current to charge
authorcurt <curt>
Wed, 28 May 2003 18:47:42 +0000 (18:47 +0000)
committercurt <curt>
Wed, 28 May 2003 18:47:42 +0000 (18:47 +0000)
the battery, don't show positive amps.

src/Systems/electrical.cxx

index 6e781f050729d0c760f16b121921c2ebf9953217..4905dbeb46e10aa56645339a53031cb796118375 100644 (file)
@@ -335,7 +335,9 @@ void FGElectricalSystem::update (double dt) {
     // make this more generic
     double amps = 0.0;
     if ( fgGetBool("/controls/switches/master-bat") ) {
-        if ( fgGetBool("/controls/switches/master-alt") ) {
+        if ( fgGetBool("/controls/switches/master-alt") &&
+             fgGetDouble("/engines/engine[0]/rpm") > 800 )
+        {
             amps += 40.0 * alt_norm;
         }
         amps -= 15.0;            // normal load