]> git.mxchange.org Git - flightgear.git/commitdiff
Towards better support for a per engine master bat/alt switch.
authorcurt <curt>
Fri, 2 Apr 2004 16:20:46 +0000 (16:20 +0000)
committercurt <curt>
Fri, 2 Apr 2004 16:20:46 +0000 (16:20 +0000)
src/Systems/electrical.cxx

index 1b6b39943bec53882559a75ebea04d0056df12d0..b3109d5183e94ae760756e1855d469390bba2538 100644 (file)
@@ -344,11 +344,13 @@ void FGElectricalSystem::update (double dt) {
 
     // impliment an extremely simplistic voltage model (assumes
     // certain naming conventions in electrical system config)
+    // FIXME: we probably want to be able to feed power from all
+    // engines if they are running and the master-alt is switched on
     double volts = 0.0;
-    if ( fgGetBool("/controls/switches/master-bat") ) {
+    if ( fgGetBool("/controls/engines/engine[0]/master-bat") ) {
         volts = 24.0;
     }
-    if ( fgGetBool("/controls/switches/master-alt") &&
+    if ( fgGetBool("/controls/engines/engine[0]/master-alt") &&
          fgGetDouble("/engines/engine[0]/rpm") > 800 )
     {
         double alt_contrib = 28.0;