X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2Fnative_ctrls.cxx;h=d7bd3f6bfa4936a5619b64237dcba25667edbea1;hb=e653ed4598dfcfea634470d16b49b97fc87e1840;hp=a1e18f0197b3e4f20876d1a39062337fc24b65d9;hpb=2584ecaaf91964173facd900447e26712734606c;p=flightgear.git diff --git a/src/Network/native_ctrls.cxx b/src/Network/native_ctrls.cxx index a1e18f019..d7bd3f6bf 100644 --- a/src/Network/native_ctrls.cxx +++ b/src/Network/native_ctrls.cxx @@ -16,7 +16,7 @@ // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // $Id$ @@ -36,8 +36,10 @@ #include "native_ctrls.hxx" // FreeBSD works better with this included last ... (?) -#if defined(WIN32) && !defined(__CYGWIN__) +#if defined( _MSC_VER ) # include +#elif defined( __MINGW32__ ) +# include #else # include // htonl() ntohl() #endif @@ -366,6 +368,10 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes, node->setDoubleValue( "elevator-trim", net->elevator_trim ); node->setDoubleValue( "rudder-trim", net->rudder_trim ); node->setDoubleValue( "flaps", net->flaps ); + node->setDoubleValue( "speedbrake", net->speedbrake ); //JWW + // or + node->setDoubleValue( "spoilers", net->spoilers ); //JWW +// cout << "NET->Spoilers: " << net->spoilers << endl; fgSetBool( "/systems/electrical/outputs/flaps", net->flaps_power ); node->setBoolValue( "flaps-serviceable", net->flap_motor_ok ); @@ -380,7 +386,8 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes, ->setDoubleValue( net->condition[i] ); node->getChild( "magnetos" )->setDoubleValue( net->magnetos[i] ); node->getChild( "starter" )->setDoubleValue( net->starter_power[i] ); - + node->getChild( "feed_tank" )->setIntValue( net->feed_tank_to[i] ); + node->getChild( "reverser" )->setBoolValue( net->reverse[i] ); // Faults SGPropertyNode *faults = node->getNode( "faults", true ); faults->setBoolValue( "serviceable", net->engine_ok[i] ); @@ -401,6 +408,7 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes, node = fgGetNode( "/controls/fuel/tank", i ); node->getChild( "fuel_selector" ) ->setBoolValue( net->fuel_selector[i] ); +// node->getChild( "to_tank" )->xfer_tank( i, net->xfer_to[i] ); } node = fgGetNode( "/controls/gear" ); if ( node != NULL ) { @@ -415,6 +423,9 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes, node = fgGetNode( "/controls/gear", true ); node->setBoolValue( "gear-down", net->gear_handle ); +// node->setDoubleValue( "brake-parking", net->brake_parking ); +// node->setDoubleValue( net->brake_left ); +// node->setDoubleValue( net->brake_right ); node = fgGetNode( "/controls/switches", true ); node->setBoolValue( "master-bat", net->master_bat ); @@ -425,7 +436,7 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes, node->setDoubleValue( "wind-speed-kt", net->wind_speed_kt ); node->setDoubleValue( "wind-from-heading-deg", net->wind_dir_deg ); node->setDoubleValue( "turbulence/magnitude-norm", net->turbulence_norm ); - node->setBoolValue( "magnetic-variation-deg", net->magvar ); + node->setDoubleValue( "magnetic-variation-deg", net->magvar ); node->setDoubleValue( "/environment/temperature-degc", net->temp_c ); @@ -435,6 +446,11 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes, // ground elevation ??? fgSetDouble("/hazards/icing/wing", net->icing); + + node = fgGetNode( "/radios", true ); + node->setDoubleValue( "comm/frequencies/selected-mhz[0]", net->comm_1 ); + node->setDoubleValue( "nav/frequencies/selected-mhz[0]", net->nav_1 ); + node->setDoubleValue( "nav[1]/frequencies/selected-mhz[0]", net->nav_2 ); fgSetInt( "/sim/speed-up", net->speedup );