Commit 9e061b2d authored by Don Gagne's avatar Don Gagne
Browse files

ComplexMissionItem support for Survey

parent e513494c
......@@ -206,3 +206,18 @@ void QGroundControlQmlGlobal::setVirtualTabletJoystick(bool enabled)
emit virtualTabletJoystickChanged(enabled);
}
}
bool QGroundControlQmlGlobal::experimentalSurvey(void) const
{
QSettings settings;
return settings.value("ExperimentalSurvey", false).toBool();
}
void QGroundControlQmlGlobal::setExperimentalSurvey(bool experimentalSurvey)
{
QSettings settings;
settings.setValue("ExperimentalSurvey", experimentalSurvey);
emit experimentalSurveyChanged(experimentalSurvey);
}
......@@ -79,6 +79,9 @@ public:
Q_PROPERTY(QGeoCoordinate lastKnownHomePosition READ lastKnownHomePosition CONSTANT)
Q_PROPERTY(QGeoCoordinate flightMapPosition MEMBER _flightMapPosition NOTIFY flightMapPositionChanged)
/// @ return: true: experimental survey ip code is turned on
Q_PROPERTY(bool experimentalSurvey READ experimentalSurvey WRITE setExperimentalSurvey NOTIFY experimentalSurveyChanged)
Q_INVOKABLE void saveGlobalSetting (const QString& key, const QString& value);
Q_INVOKABLE QString loadGlobalSetting (const QString& key, const QString& defaultValue);
Q_INVOKABLE void saveBoolGlobalSetting (const QString& key, bool value);
......@@ -133,6 +136,9 @@ public:
void setIsVersionCheckEnabled (bool enable);
void setMavlinkSystemID (int id);
bool experimentalSurvey(void) const;
void setExperimentalSurvey(bool experimentalSurvey);
// Overrides from QGCTool
virtual void setToolbox(QGCToolbox* toolbox);
......@@ -146,6 +152,7 @@ signals:
void isVersionCheckEnabledChanged (bool enabled);
void mavlinkSystemIDChanged (int id);
void flightMapPositionChanged (QGeoCoordinate flightMapPosition);
void experimentalSurveyChanged (bool experimentalSurvey);
private:
FlightMapSettings* _flightMapSettings;
......
......@@ -32,6 +32,8 @@ This file is part of the QGROUNDCONTROL project
#include <QApplication>
#include <QSslSocket>
#include <QProcessEnvironment>
#include <QHostAddress>
#include <QUdpSocket>
#include "QGCApplication.h"
......
......@@ -242,6 +242,8 @@ Rectangle {
width: parent.width
}
//-----------------------------------------------------------------
//-- Offline mission editing settings
Row {
spacing: ScreenTools.defaultFontPixelWidth
......@@ -257,6 +259,19 @@ Rectangle {
indexModel: false
}
}
Item {
height: ScreenTools.defaultFontPixelHeight / 2
width: parent.width
}
//-----------------------------------------------------------------
//-- Experimental Survey settings
QGCCheckBox {
text: "Experimental Survey [WIP - no bugs reports please]"
checked: QGroundControl.experimentalSurvey
onClicked: QGroundControl.experimentalSurvey = checked
}
}
}
}
Supports Markdown
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