]> git.mxchange.org Git - flightgear.git/commitdiff
sync. with JSBSim again
authorehofman <ehofman>
Fri, 26 Jun 2009 13:27:40 +0000 (13:27 +0000)
committerTim Moore <timoore@redhat.com>
Thu, 2 Jul 2009 06:59:15 +0000 (08:59 +0200)
src/FDM/JSBSim/FGFDMExec.cpp
src/FDM/JSBSim/models/flight_control/FGSwitch.cpp

index 91aff117788a7a7124819a7e930641ef5a611aa4..7f50d05904d246db50716c48296dae619097ad68 100644 (file)
@@ -132,7 +132,7 @@ FGFDMExec::FGFDMExec(FGPropertyManager* root) : Root(root)
   Terminate = false;
 
   IdFDM = FDMctr; // The main (parent) JSBSim instance is always the "zeroth"
-                  // instance. "child" instances are loaded last.
+  FDMctr++;       // instance. "child" instances are loaded last.
 
   try {
     char* num = getenv("JSBSIM_DEBUG");
@@ -145,9 +145,6 @@ FGFDMExec::FGFDMExec(FGPropertyManager* root) : Root(root)
     if (master == 0)
       master = new FGPropertyManager;
     Root = master;
-
-    // JSBSim Standalone, multiple childs are allowed
-    FDMctr++;
   }
 
   instance = Root->GetNode("/fdm/jsbsim",IdFDM,true);
@@ -189,6 +186,8 @@ FGFDMExec::~FGFDMExec()
 
   PropertyCatalog.clear();
 
+  FDMctr--;
+
   Debug(1);
 }
 
index 63d9e9bbcd54ed1a07a8ecbfbbcf5c95823f0181..5ed272155b32175cfb68d8c89cac55937fcb642c 100644 (file)
@@ -98,10 +98,6 @@ FGSwitch::FGSwitch(FGFCS* fcs, Element* element) : FGFCSComponent(fcs, element)
       }
       for (unsigned int i=0; i<test_element->GetNumDataLines(); i++) {
         string input_data = test_element->GetDataLine(i);
-        while (input_data[0] <= 32) {
-          input_data = input_data.erase(0,1);
-          if (input_data.size() <= 1) break;
-        }
         if (input_data.size() <= 1) {
           // Make sure there are no bad data lines that consist solely of whitespace
           cerr << fgred << "  Bad data line in switch component: " << Name << reset << endl;