From 6079ff58fd069234b74ea67bb4a5d12bdb0af265 Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 26 Jun 2009 13:27:40 +0000 Subject: [PATCH] sync. with JSBSim again --- src/FDM/JSBSim/FGFDMExec.cpp | 7 +++---- src/FDM/JSBSim/models/flight_control/FGSwitch.cpp | 4 ---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/FDM/JSBSim/FGFDMExec.cpp b/src/FDM/JSBSim/FGFDMExec.cpp index 91aff1177..7f50d0590 100644 --- a/src/FDM/JSBSim/FGFDMExec.cpp +++ b/src/FDM/JSBSim/FGFDMExec.cpp @@ -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); } diff --git a/src/FDM/JSBSim/models/flight_control/FGSwitch.cpp b/src/FDM/JSBSim/models/flight_control/FGSwitch.cpp index 63d9e9bbc..5ed272155 100644 --- a/src/FDM/JSBSim/models/flight_control/FGSwitch.cpp +++ b/src/FDM/JSBSim/models/flight_control/FGSwitch.cpp @@ -98,10 +98,6 @@ FGSwitch::FGSwitch(FGFCS* fcs, Element* element) : FGFCSComponent(fcs, element) } for (unsigned int i=0; iGetNumDataLines(); 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;