]> git.mxchange.org Git - flightgear.git/blobdiff - src/Systems/electrical.cxx
This is step "1" of probably "many" in the process of separating out the
[flightgear.git] / src / Systems / electrical.cxx
index 240a798686e296479c8742f9ce643bb63bd1fde3..4f8329af5706e2675feae2a6782212bbbdb93ceb 100644 (file)
@@ -56,6 +56,7 @@ FGElectricalSupplier::FGElectricalSupplier ( SGPropertyNode *node ) {
     }
     volts = node->getDoubleValue("volts");
     amps = node->getDoubleValue("amps");
+    rpm_src = node->getStringValue("rpm-source");
 
     int i;
     for ( i = 0; i < node->nChildren(); ++i ) {
@@ -69,7 +70,7 @@ FGElectricalSupplier::FGElectricalSupplier ( SGPropertyNode *node ) {
         }
     }
 
-    _rpm_node = fgGetNode("/engines/engine[0]/rpm", true);
+    _rpm_node = fgGetNode( rpm_src.c_str(), true);
 }  
 
 
@@ -200,7 +201,7 @@ FGElectricalConnector::FGElectricalConnector ( SGPropertyNode *node,
 
 // set all switches to the specified state
 void FGElectricalConnector::set_switches( bool state ) {
-    cout << "setting switch state to " << state << endl;
+    // cout << "setting switch state to " << state << endl;
     for ( unsigned int i = 0; i < switches.size(); ++i ) {
         switches[i]->setBoolValue( state );
     }