]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/native_fdm.cxx
Update Mac configure script for new ALUT scheme; support --with-alut-framework.
[flightgear.git] / src / Network / native_fdm.cxx
index 547ba1f4d50c38dd949c97bab94b086ffac059c5..4fa6275cedd7937179b35feaf855ae69576d0841 100644 (file)
 #include "native_fdm.hxx"
 
 // FreeBSD works better with this included last ... (?)
-#if defined(WIN32) && !defined(__CYGWIN__)
+#if defined( _MSC_VER )
 #  include <windows.h>
+#elif defined( __MINGW32__ )
+#  include <winsock2.h>
 #else
 #  include <netinet/in.h>      // htonl() ntohl()
 #endif
@@ -171,6 +173,7 @@ void FGProps2NetFDM( FGNetFDM *net, bool net_byte_order ) {
         }
         net->rpm[i] = node->getDoubleValue( "rpm" );
         net->fuel_flow[i] = node->getDoubleValue( "fuel-flow-gph" );
+        net->fuel_px[i] = node->getDoubleValue( "fuel-px-psi" );
         net->egt[i] = node->getDoubleValue( "egt-degf" );
         // cout << "egt = " << aero->EGT << endl;
         net->cht[i] = node->getDoubleValue( "cht-degf" );
@@ -213,7 +216,7 @@ void FGProps2NetFDM( FGNetFDM *net, bool net_byte_order ) {
     net->left_aileron = node->getDoubleValue( "left-aileron-pos-norm" );
     net->right_aileron = node->getDoubleValue( "right-aileron-pos-norm" );
     net->rudder = node->getDoubleValue( "rudder-pos-norm" );
-    net->rudder = node->getDoubleValue( "nose-wheel-pos-norm" );
+    net->nose_wheel = node->getDoubleValue( "nose-wheel-pos-norm" );
     net->speedbrake = node->getDoubleValue( "speedbrake-pos-norm" );
     net->spoilers = node->getDoubleValue( "spoilers-pos-norm" );
 
@@ -254,6 +257,7 @@ void FGProps2NetFDM( FGNetFDM *net, bool net_byte_order ) {
             net->eng_state[i] = htonl(net->eng_state[i]);
             htonf(net->rpm[i]);
             htonf(net->fuel_flow[i]);
+            htonf(net->fuel_px[i]);
             htonf(net->egt[i]);
             htonf(net->cht[i]);
             htonf(net->mp_osi[i]);
@@ -335,6 +339,7 @@ void FGNetFDM2Props( FGNetFDM *net, bool net_byte_order ) {
             net->eng_state[i] = htonl(net->eng_state[i]);
             htonf(net->rpm[i]);
             htonf(net->fuel_flow[i]);
+            htonf(net->fuel_px[i]);
             htonf(net->egt[i]);
             htonf(net->cht[i]);
             htonf(net->mp_osi[i]);
@@ -433,6 +438,7 @@ void FGNetFDM2Props( FGNetFDM *net, bool net_byte_order ) {
 
            node->setDoubleValue( "rpm", net->rpm[i] );
            node->setDoubleValue( "fuel-flow-gph", net->fuel_flow[i] );
+           node->setDoubleValue( "fuel-px-psi", net->fuel_px[i] );
            node->setDoubleValue( "egt-degf", net->egt[i] );
            node->setDoubleValue( "cht-degf", net->cht[i] );
            node->setDoubleValue( "mp-osi", net->mp_osi[i] );