]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGFCS.cpp
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / JSBSim / FGFCS.cpp
index a9b071b529a3a77893392b10f07f1a03637bad62..57e73bf8c0aa7411a16eb6ac214f9361351e4518 100644 (file)
@@ -60,6 +60,10 @@ INCLUDES
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_FCS;
 
+#if defined(WIN32) && !defined(__CYGWIN__)
+#define snprintf _snprintf
+#endif
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -326,7 +330,7 @@ bool FGFCS::Load(FGConfigFile* AC_cfg)
         ToNormalize[iDsb]=i;
       } else if ( nodeName == "spoiler-pos-rad" ) {
         ToNormalize[iDsp]=i;
-      } else if ( nodeName == "flaps-pos-deg" ) {
+      } else if ( nodeName == "flap-pos-deg" ) {
         ToNormalize[iDf]=i;
       }
     }
@@ -605,32 +609,39 @@ void FGFCS::bind(void)
 void FGFCS::bindModel(void)
 {
   unsigned i;
-
+  char tmp[80];
+  
   for (i=0; i<ThrottleCmd.size(); i++) {
-    PropertyManager->Tie("fcs/throttle-cmd-norm",this,i,
+    snprintf(tmp,80,"fcs/throttle-cmd-norm[%u]",i);
+    PropertyManager->Tie( tmp,this,i,
                           &FGFCS::GetThrottleCmd,
                           &FGFCS::SetThrottleCmd,
                           true );
-    PropertyManager->Tie("fcs/throttle-pos-norm",this,i,
+    snprintf(tmp,80,"fcs/throttle-pos-norm[%u]",i);                      
+    PropertyManager->Tie( tmp,this,i,
                           &FGFCS::GetThrottlePos,
                           &FGFCS::SetThrottlePos,
                           true );
     if ( MixtureCmd.size() > i ) {
-      PropertyManager->Tie("fcs/mixture-cmd-norm",this,i,
+      snprintf(tmp,80,"fcs/mixture-cmd-norm[%u]",i); 
+      PropertyManager->Tie( tmp,this,i,
                             &FGFCS::GetMixtureCmd,
                             &FGFCS::SetMixtureCmd,
                             true );
-      PropertyManager->Tie("fcs/mixture-pos-norm",this,i,
+      snprintf(tmp,80,"fcs/mixture-pos-norm[%u]",i);                    
+      PropertyManager->Tie( tmp,this,i,
                             &FGFCS::GetMixturePos,
                             &FGFCS::SetMixturePos,
                             true );
     }
     if ( PropAdvanceCmd.size() > i ) {
-      PropertyManager->Tie("fcs/advance-cmd-norm",this,i,
+      snprintf(tmp,80,"fcs/advance-cmd-norm[%u]",i); 
+      PropertyManager->Tie( tmp,this,i,
                             &FGFCS::GetPropAdvanceCmd,
                             &FGFCS::SetPropAdvanceCmd,
                             true );
-      PropertyManager->Tie("fcs/advance-pos-norm",this,i,
+      snprintf(tmp,80,"fcs/advance-pos-norm[%u]",i);                       
+      PropertyManager->Tie( tmp,this,i,
                             &FGFCS::GetPropAdvance,
                             &FGFCS::SetPropAdvance,
                             true );