]> git.mxchange.org Git - flightgear.git/blobdiff - src/Systems/electrical.cxx
Fix line endings
[flightgear.git] / src / Systems / electrical.cxx
index 31a4e5594c5ac4f14ee344583c40855395c85574..a5e5de7f6f53da1af0c3cc463bf9d3f5ed67ece5 100644 (file)
@@ -109,6 +109,7 @@ float FGElectricalSupplier::apply_load( float amps, float dt ) {
         return available_amps - amps;
     } else if ( model == FG_EXTERNAL ) {
         // cout << "external amps = " << 0.0 << endl;
+        float available_amps = ideal_amps;
         return available_amps - amps;
     } else {
         SG_LOG( SG_ALL, SG_ALERT, "unknown supplier type" );
@@ -373,9 +374,9 @@ void FGElectricalSystem::init () {
     SGPropertyNode *path_n = fgGetNode("/sim/systems/electrical/path");
     if ( path_n ) {
         if ( path.length() ) {
-            SG_LOG( SG_ALL, SG_ALERT,
+            SG_LOG( SG_ALL, SG_INFO,
                     "NOTICE: System manager configuration specifies an " <<
-                    "electrical system model from: " << path << " but it is " <<
+                    "electrical system: " << path << " but it is " <<
                     "being overridden by the one specified in the -set.xml " <<
                     "file: " << path_n->getStringValue() );
         }
@@ -387,7 +388,9 @@ void FGElectricalSystem::init () {
         SGPath config( globals->get_fg_root() );
         config.append( path );
 
-        SG_LOG( SG_ALL, SG_ALERT, "Reading electrical system model from "
+        // load an obsolete xml configuration
+        SG_LOG( SG_ALL, SG_ALERT,
+                "Reading xml electrical system model from "
                 << config.str() );
         try {
             readProperties( config.str(), config_props );
@@ -396,20 +399,20 @@ void FGElectricalSystem::init () {
                 enabled = true;
             } else {
                 SG_LOG( SG_ALL, SG_ALERT,
-                        "Detected an internal inconsistancy in the electrical");
+                        "Detected a logic error in the electrical system ");
                 SG_LOG( SG_ALL, SG_ALERT,
-                        " system specification file.  See earlier errors for" );
+                        "specification file.  See earlier errors for " );
                 SG_LOG( SG_ALL, SG_ALERT,
-                        " details.");
+                        "details.");
                 exit(-1);
             }        
         } catch (const sg_exception& exc) {
-            SG_LOG( SG_ALL, SG_ALERT, "Failed to load electrical system model: "
+            SG_LOG( SG_ALL, SG_ALERT,
+                    "Failed to load electrical system model: "
                     << config.str() );
         }
-
     } else {
-        SG_LOG( SG_ALL, SG_WARN,
+        SG_LOG( SG_ALL, SG_INFO,
                 "No xml-based electrical model specified for this model!");
     }