]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/FGInput.cpp
Merge branch 'next' of git://gitorious.org/fg/flightgear into next
[flightgear.git] / src / FDM / JSBSim / models / FGInput.cpp
index 65ab24db22b1c338b0b3a2e8ee19bebbabf86645..c1ff0b8f21084aa9a9f95755436a1e51b51ff1fb 100755 (executable)
@@ -53,7 +53,7 @@ using namespace std;
 
 namespace JSBSim {
 
-static const char *IdSrc = "$Id: FGInput.cpp,v 1.19 2010/02/25 05:21:36 jberndt Exp $";
+static const char *IdSrc = "$Id: FGInput.cpp,v 1.21 2011/05/20 03:18:36 jberndt Exp $";
 static const char *IdHdr = ID_INPUT;
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -83,8 +83,6 @@ FGInput::~FGInput()
 
 bool FGInput::InitModel(void)
 {
-  if (!FGModel::InitModel()) return false;
-
   return true;
 }
 
@@ -93,14 +91,14 @@ bool FGInput::InitModel(void)
 // This function handles accepting input commands from the socket interface.
 //
 
-bool FGInput::Run(void)
+bool FGInput::Run(bool Holding)
 {
   string line, token;
   size_t start=0, string_start=0, string_end=0;
   double value=0;
   FGPropertyManager* node=0;
 
-  if (FGModel::Run()) return true; // fast exit if nothing to do
+  if (FGModel::Run(Holding)) return true; // fast exit if nothing to do
   if (port == 0) return false;      // Do nothing here if port not defined
                                     // return false if no error
   // This model DOES execute if "Exec->Holding"
@@ -157,7 +155,7 @@ bool FGInput::Run(void)
           break;
         }
         if (node == 0) {
-          if (FDMExec->Holding()) { // if holding can query property list
+          if (Holding) { // if holding can query property list
             string query = FDMExec->QueryPropertyCatalog(argument);
             socket->Reply(query);
           } else {
@@ -191,7 +189,7 @@ bool FGInput::Run(void)
         ostringstream info;
         info << "JSBSim version: " << JSBSim_version << endl;
         info << "Config File version: " << needed_cfg_version << endl;
-//      info << "Aircraft simulated: " << Aircraft->GetAircraftName() << endl;
+        info << "Aircraft simulated: " << FDMExec->GetAircraft()->GetAircraftName() << endl;
         info << "Simulation time: " << setw(8) << setprecision(3) << FDMExec->GetSimTime() << endl;
         socket->Reply(info.str());