Commit 8705be33 authored by pixhawk's avatar pixhawk

Fixed Mac compile error

parent e43e1962
...@@ -26,3 +26,4 @@ deploy/mac ...@@ -26,3 +26,4 @@ deploy/mac
deploy/linux deploy/linux
controller_log* controller_log*
user_config.pri user_config.pri
*.app
...@@ -77,11 +77,11 @@ macx { ...@@ -77,11 +77,11 @@ macx {
ICON = $$BASEDIR/images/icons/macx.icns ICON = $$BASEDIR/images/icons/macx.icns
# Copy audio files if needed # Copy audio files if needed
QMAKE_PRE_LINK += && cp -rf $$BASEDIR/audio $$DESTDIR/qgroundcontrol.app/Contents/MacOs/. QMAKE_PRE_LINK += && cp -rf $$BASEDIR/audio $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/.
# Copy google earth starter file # Copy google earth starter file
QMAKE_PRE_LINK += && cp -f $$BASEDIR/images/earth.html $$DESTDIR/qgroundcontrol.app/Contents/MacOs/. QMAKE_PRE_LINK += && cp -f $$BASEDIR/images/earth.html $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/.
# Copy model files # Copy model files
QMAKE_PRE_LINK += && cp -f $$BASEDIR/models/*.skp $$DESTDIR/qgroundcontrol.app/Contents/MacOs/. #QMAKE_PRE_LINK += && cp -f $$BASEDIR/models/*.dae $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/.
exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) { exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) {
# No check for GLUT.framework since it's a MAC default # No check for GLUT.framework since it's a MAC default
......
...@@ -18,6 +18,7 @@ QGCGoogleEarthView::QGCGoogleEarthView(QWidget *parent) : ...@@ -18,6 +18,7 @@ QGCGoogleEarthView::QGCGoogleEarthView(QWidget *parent) :
updateTimer(new QTimer(this)), updateTimer(new QTimer(this)),
mav(NULL), mav(NULL),
followCamera(true), followCamera(true),
trailEnabled(true),
#if (defined Q_OS_MAC) #if (defined Q_OS_MAC)
webViewMac(new QWebView(this)), webViewMac(new QWebView(this)),
#endif #endif
...@@ -51,6 +52,14 @@ QGCGoogleEarthView::QGCGoogleEarthView(QWidget *parent) : ...@@ -51,6 +52,14 @@ QGCGoogleEarthView::QGCGoogleEarthView(QWidget *parent) :
updateTimer->start(200); updateTimer->start(200);
#endif #endif
// Follow checkbox
ui->followAirplaneCheckbox->setChecked(followCamera);
connect(ui->followAirplaneCheckbox, SIGNAL(toggled(bool)), this, SLOT(follow(bool)));
// Trail checkbox
ui->trailCheckbox->setChecked(trailEnabled);
connect(ui->trailCheckbox, SIGNAL(toggled(bool)), this, SLOT(showTrail(bool)));
// Get list of available 3D models // Get list of available 3D models
// Load HTML file // Load HTML file
...@@ -70,19 +79,19 @@ void QGCGoogleEarthView::setActiveUAS(UASInterface* uas) ...@@ -70,19 +79,19 @@ void QGCGoogleEarthView::setActiveUAS(UASInterface* uas)
mav = uas; mav = uas;
} }
void QGCGoogleEarthView::showTrail(int state) void QGCGoogleEarthView::showTrail(bool state)
{ {
} }
void QGCGoogleEarthView::showWaypoints(int state) void QGCGoogleEarthView::showWaypoints(bool state)
{ {
} }
void QGCGoogleEarthView::follow(bool follow) void QGCGoogleEarthView::follow(bool follow)
{ {
followCamera = follow;
} }
void QGCGoogleEarthView::updateState() void QGCGoogleEarthView::updateState()
......
...@@ -57,9 +57,9 @@ public slots: ...@@ -57,9 +57,9 @@ public slots:
/** @brief Set the currently selected UAS */ /** @brief Set the currently selected UAS */
void setActiveUAS(UASInterface* uas); void setActiveUAS(UASInterface* uas);
/** @brief Show the vehicle trail */ /** @brief Show the vehicle trail */
void showTrail(int state); void showTrail(bool state);
/** @brief Show the waypoints */ /** @brief Show the waypoints */
void showWaypoints(int state); void showWaypoints(bool state);
/** @brief Follow the aircraft during flight */ /** @brief Follow the aircraft during flight */
void follow(bool follow); void follow(bool follow);
...@@ -68,6 +68,7 @@ protected: ...@@ -68,6 +68,7 @@ protected:
QTimer* updateTimer; QTimer* updateTimer;
UASInterface* mav; UASInterface* mav;
bool followCamera; bool followCamera;
bool trailEnabled;
#if (defined Q_OS_WIN) && !(defined __MINGW32__) #if (defined Q_OS_WIN) && !(defined __MINGW32__)
WebAxWidget* webViewWin; WebAxWidget* webViewWin;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment