]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/native_gui.cxx
Logging: less verbose panel loading.
[flightgear.git] / src / Network / native_gui.cxx
index 4fab64495880a610ae7d46d8dfb221fe4b7b080b..9171822521f119071b6f9588642dc4a1f6d93bac 100644 (file)
@@ -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$
 
@@ -136,7 +136,7 @@ void FGProps2NetGUI( FGNetGUI *net ) {
        = fgGetNode("/instrumentation/nav/radials/reciprocal-radial-deg", true);
     static SGPropertyNode *nav_gs_deflection
        = fgGetNode("/instrumentation/nav/gs-needle-deflection", true);
-    int i;
+    unsigned int i;
 
     // Version sanity checking
     net->version = FG_NET_GUI_VERSION;
@@ -163,7 +163,7 @@ void FGProps2NetGUI( FGNetGUI *net ) {
     // Environment
     net->cur_time = globals->get_time_params()->get_cur_time();
     net->warp = globals->get_warp();
-    net->ground_elev = globals->get_scenery()->get_cur_elev();
+    net->ground_elev = cur_fdm_state->get_Runway_altitude_m();
 
     // Approach
     net->tuned_freq = nav_freq->getDoubleValue();
@@ -215,7 +215,7 @@ void FGProps2NetGUI( FGNetGUI *net ) {
 
 #if defined( FG_USE_NETWORK_BYTE_ORDER )
     // Convert the net buffer to network format
-    net->version = htons(net->version);
+    net->version = htonl(net->version);
 
     htond(net->longitude);
     htond(net->latitude);
@@ -229,6 +229,7 @@ void FGProps2NetGUI( FGNetGUI *net ) {
     for ( i = 0; i < net->num_tanks; ++i ) {
         htonf(net->fuel_quantity[i]);
     }
+    net->num_tanks = htonl(net->num_tanks);
 
     net->cur_time = htonl( net->cur_time );
     net->warp = htonl( net->warp );
@@ -236,6 +237,7 @@ void FGProps2NetGUI( FGNetGUI *net ) {
 
     htonf(net->tuned_freq);
     htonf(net->nav_radial);
+    net->in_range = htonl( net->in_range );
     htonf(net->dist_nm);
     htonf(net->course_deviation_deg);
     htonf(net->gs_deviation_deg);
@@ -244,11 +246,11 @@ void FGProps2NetGUI( FGNetGUI *net ) {
 
 
 void FGNetGUI2Props( FGNetGUI *net ) {
-    int i;
+    unsigned int i;
 
 #if defined( FG_USE_NETWORK_BYTE_ORDER )
     // Convert to the net buffer from network format
-    net->version = ntohs(net->version);
+    net->version = ntohl(net->version);
 
     htond(net->longitude);
     htond(net->latitude);
@@ -259,6 +261,7 @@ void FGNetGUI2Props( FGNetGUI *net ) {
     htonf(net->vcas);
     htonf(net->climb_rate);
 
+    net->num_tanks = htonl(net->num_tanks);
     for ( i = 0; i < net->num_tanks; ++i ) {
        htonf(net->fuel_quantity[i]);
     }
@@ -268,6 +271,8 @@ void FGNetGUI2Props( FGNetGUI *net ) {
     net->ground_elev = htonl( net->ground_elev );
 
     htonf(net->tuned_freq);
+    htonf(net->nav_radial);
+    net->in_range = htonl( net->in_range );
     htonf(net->dist_nm);
     htonf(net->course_deviation_deg);
     htonf(net->gs_deviation_deg);
@@ -299,13 +304,12 @@ void FGNetGUI2Props( FGNetGUI *net ) {
        }
 
         globals->set_warp( net->warp );
-        globals->get_scenery()->set_cur_elev( net->ground_elev );
 
         // Approach
         fgSetDouble( "/instrumentation/nav[0]/frequencies/selected-mhz",
                      net->tuned_freq );
         fgSetBool( "/instrumentation/nav[0]/in-range", net->in_range );
-        fgSetDouble( "/instrumentation/dme/distance-nm", net->dist_nm );
+        fgSetDouble( "/instrumentation/dme/indicated-distance-nm", net->dist_nm );
         fgSetDouble( "/instrumentation/nav[0]/heading-needle-deflection",
                      net->course_deviation_deg );
         fgSetDouble( "/instrumentation/nav[0]/gs-needle-deflection",