]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/JSBSim.cxx
Fixed incomplete merge of JSBSim.cxx
[flightgear.git] / src / FDM / JSBSim / JSBSim.cxx
index a2d217ba2989dbc8774f296fc7c0cc62d4ed30b2..8b693bcab8221a2fd8f47f34524c29753e0dd243 100644 (file)
@@ -144,8 +144,6 @@ FGJSBsim::FGJSBsim( double dt )
         }
     }
     
-    resetPropertyState();
-
     fdmex = new FGFDMExec( (FGPropertyManager*)globals->get_props() );
 
     // Register ground callback.
@@ -424,28 +422,9 @@ void FGJSBsim::init()
 
 /******************************************************************************/
 
-void checkTied ( FGPropertyManager *node )
-{
-  int N = node->nChildren();
-  string name;
-
-  for (int i=0; i<N; i++) {
-    if (node->getChild(i)->nChildren() ) {
-      checkTied( (FGPropertyManager*)node->getChild(i) );
-    }
-    if ( node->getChild(i)->isTied() ) {
-      name = ((FGPropertyManager*)node->getChild(i))->GetFullyQualifiedName();
-      node->Untie(name);
-    }
-  }
-}
-
-/******************************************************************************/
-
 void FGJSBsim::unbind()
 {
-  SGPropertyNode* instance = globals->get_props()->getNode("/fdm/jsbsim");
-  checkTied((FGPropertyManager*)instance);
+  fdmex->Unbind();
   FGInterface::unbind();
 }
 
@@ -1442,22 +1421,3 @@ void FGJSBsim::update_external_forces(double t_off)
     fgSetDouble("/fdm/jsbsim/systems/hook/tailhook-pos-deg", fi);
 }
 
-
-void FGJSBsim::resetPropertyState()
-{
-// this code works-around bug #222:
-// http://code.google.com/p/flightgear-bugs/issues/detail?id=222
-// for whatever reason, having an existing value for the WOW
-// property causes the NaNs. Should that be fixed, this code can die
-  SGPropertyNode* gear = fgGetNode("/fdm/jsbsim/gear", false);
-  if (!gear) {
-    return;
-  }
-  
-  int index = 0;
-  SGPropertyNode* unitNode = NULL;
-  for (; (unitNode = gear->getChild("unit", index)) != NULL; ++index) {
-    unitNode->removeChild("WOW", 0, false);
-  }
-}
-