From 60f3d724ac253913c6c65bc33412cd84d7be7319 Mon Sep 17 00:00:00 2001
From: Don Gagne <don@thegagnes.com>
Date: Thu, 29 May 2014 20:23:43 -0700
Subject: [PATCH] commit

---
 src/comm/QGCFlightGearLink.cc           | 6 +++---
 src/ui/QGCHilFlightGearConfiguration.cc | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/comm/QGCFlightGearLink.cc b/src/comm/QGCFlightGearLink.cc
index 715648e228..15066acb5c 100644
--- a/src/comm/QGCFlightGearLink.cc
+++ b/src/comm/QGCFlightGearLink.cc
@@ -42,7 +42,7 @@ This file is part of the QGROUNDCONTROL project
 
 // FlightGear process start and connection is quite fragile. Uncomment the define below to get higher level of debug output
 // for tracking down problems.
-#define DEBUG_FLIGHTGEAR_CONNECT
+//#define DEBUG_FLIGHTGEAR_CONNECT
 
 QGCFlightGearLink::QGCFlightGearLink(UASInterface* mav, QString startupArguments, QString remoteHost, QHostAddress host, quint16 port) :
     socket(NULL),
@@ -152,7 +152,7 @@ void QGCFlightGearLink::processError(QProcess::ProcessError err)
     switch(err)
     {
     case QProcess::FailedToStart:
-        emit showCriticalMessageFromThread(tr("FlightGear Failed to Start"), tr("Please check if the path and command is correct"));
+        emit showCriticalMessageFromThread(tr("FlightGear Failed to Start"), process->errorString());
         break;
     case QProcess::Crashed:
         emit showCriticalMessageFromThread(tr("FlightGear Crashed"), tr("This is a FlightGear-related problem. Please upgrade FlightGear"));
@@ -808,7 +808,7 @@ bool QGCFlightGearLink::connectSimulation()
     
     // Setup protocol we will be using to communicate with FlightGear
     QString fgProtocol(mav->getSystemType() == MAV_TYPE_QUADROTOR ? "qgroundcontrol-quadrotor" : "qgroundcontrol-fixed-wing");
-    QString fgProtocolArg("--generic=socket,%1,300,127.0.0.1,%2,udp,%3");
+    QString fgProtocolArg("--generic=socket,%1,50,127.0.0.1,%2,udp,%3");
     _fgArgList << fgProtocolArg.arg("out").arg(port).arg(fgProtocol);
     _fgArgList << fgProtocolArg.arg("in").arg(currentPort).arg(fgProtocol);
     
diff --git a/src/ui/QGCHilFlightGearConfiguration.cc b/src/ui/QGCHilFlightGearConfiguration.cc
index 44630ff6cf..732a794e0f 100644
--- a/src/ui/QGCHilFlightGearConfiguration.cc
+++ b/src/ui/QGCHilFlightGearConfiguration.cc
@@ -13,7 +13,7 @@ const char* QGCHilFlightGearConfiguration::_sensorHilKey =                  "SEN
 
 // Default set of optional command line parameters. If FlightGear won't run HIL without it it should go into
 // the QGCFlightGearLink code instead.
-const char* QGCHilFlightGearConfiguration::_defaultOptions = "--roll=0 --pitch=0 --vc=0 --heading=300 --timeofday=noon --disable-hud-3d --disable-fullscreen --geometry=400x300 --disable-anti-alias-hud --wind=0@0 --turbulence=0.0 --control=mouse --disable-sound --disable-random-objects --disable-ai-traffic --shading-flat --fog-disable --disable-specular-highlight --disable-random-objects --disable-panel --disable-clouds --fdm=jsb --units-meters --enable-terrasync";
+const char* QGCHilFlightGearConfiguration::_defaultOptions = "--roll=0 --pitch=0 --vc=0 --heading=300 --timeofday=noon --disable-hud-3d --disable-fullscreen --geometry=400x300 --disable-anti-alias-hud --wind=0@0 --turbulence=0.0 --prop:/sim/frame-rate-throttle-hz=30 --control=mouse --disable-sound --disable-random-objects --disable-ai-traffic --shading-flat --fog-disable --disable-specular-highlight --disable-random-objects --disable-panel --disable-clouds --fdm=jsb --units-meters --enable-terrasync";
 
 QGCHilFlightGearConfiguration::QGCHilFlightGearConfiguration(UAS* mav, QWidget *parent) :
     QWidget(parent),
-- 
GitLab