Unverified Commit e09e6694 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6775 from DonLakeFlyer/UpstreamStableMerge

Upstream stable merge
parents 16c7249a fa7c9122
......@@ -5,10 +5,10 @@ if [ ! -d /Volumes/RAMDisk ] ; then
exit 1
fi
#-- Set to my local installation
QMAKE=/Users/gus/Applications/Qt/5.7/ios/bin/qmake
QMAKE=/Users/gus/Applications/Qt/5.11.0/ios/bin/qmake
#-- Using Travis variables as this will eventually live there
SHADOW_BUILD_DIR=/Volumes/RAMDisk/build-qgroundcontrol-iOS-Release
TRAVIS_BUILD_DIR=/Users/gus/github/work/qgroundcontrol
TRAVIS_BUILD_DIR=/Users/gus/github/work/UpstreamQGC
#-- Build it
mkdir -p ${SHADOW_BUILD_DIR} &&
cd ${SHADOW_BUILD_DIR} &&
......
......@@ -39,6 +39,7 @@
<file alias="GeneralSettings.qml">src/ui/preferences/GeneralSettings.qml</file>
<file alias="GeoTagPage.qml">src/AnalyzeView/GeoTagPage.qml</file>
<file alias="HealthPageWidget.qml">src/FlightMap/Widgets/HealthPageWidget.qml</file>
<file alias="HelpSettings.qml">src/ui/preferences/HelpSettings.qml</file>
<file alias="JoystickConfig.qml">src/VehicleSetup/JoystickConfig.qml</file>
<file alias="LinkSettings.qml">src/ui/preferences/LinkSettings.qml</file>
<file alias="LogDownloadPage.qml">src/AnalyzeView/LogDownloadPage.qml</file>
......
......@@ -122,6 +122,9 @@ QString AudioOutput::fixTextMessageForAudio(const QString& string) {
if(result.contains(" EKF ", Qt::CaseInsensitive)) {
result.replace(" EKF ", " Eee Kay Eff ", Qt::CaseInsensitive);
}
if(result.contains("PREARM", Qt::CaseInsensitive)) {
result.replace("PREARM", "pre arm", Qt::CaseInsensitive);
}
// Convert negative numbers
QRegularExpression re(QStringLiteral("(-)[0-9]*\\.?[0-9]"));
......
......@@ -128,9 +128,7 @@ SetupPage {
onWaitingForCancelChanged: {
if (controller.waitingForCancel) {
showMessage(qsTr("Calibration Cancel"), qsTr("Waiting for Vehicle to response to Cancel. This may take a few seconds."), 0)
} else {
hideDialog()
showDialog(waitForCancelDialogComponent, qsTr("Calibration Cancel"), qgcView.showDialogDefaultWidth, 0)
}
}
......@@ -163,6 +161,24 @@ SetupPage {
QGCPalette { id: qgcPal; colorGroupEnabled: true }
Component {
id: waitForCancelDialogComponent
QGCViewMessage {
message: qsTr("Waiting for Vehicle to response to Cancel. This may take a few seconds.")
Connections {
target: controller
onWaitingForCancelChanged: {
if (!controller.waitingForCancel) {
hideDialog()
}
}
}
}
}
Component {
id: singleCompassOnboardResultsComponent
......@@ -265,7 +281,10 @@ SetupPage {
QGCButton {
text: qsTr("Reboot Vehicle")
onClicked: controller.vehicle.reboot()
onClicked: {
controller.vehicle.rebootVehicle()
hideDialog()
}
}
}
}
......@@ -290,8 +309,11 @@ SetupPage {
QGCButton {
text: qsTr("Reboot Vehicle")
onClicked: controller.vehicle.rebootVehicle()
}
onClicked: {
controller.vehicle.rebootVehicle()
hideDialog()
}
}
}
}
}
......
......@@ -167,7 +167,7 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St
emit resetStatusTextArea();
}
if (_magCalInProgress) {
emit setCompassRotations();
emit magCalComplete();
}
break;
......
......@@ -92,7 +92,7 @@ signals:
void orientationCalSidesRotateChanged(void);
void resetStatusTextArea(void);
void waitingForCancelChanged(void);
void setCompassRotations(void);
void magCalComplete(void);
private slots:
void _handleUASTextMessage(int uasId, int compId, int severity, QString text);
......
......@@ -131,11 +131,11 @@ Item {
onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText
onSetCompassRotations: {
if (!_sensorsHaveFixedOrientation && (showCompass0Rot || showCompass1Rot || showCompass2Rot)) {
onMagCalComplete: {
//if (!_sensorsHaveFixedOrientation && (showCompass0Rot || showCompass1Rot || showCompass2Rot)) {
setOrientationsDialogShowBoardOrientation = false
showDialog(setOrientationsDialogComponent, qsTr("Set Compass Rotation(s)"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
}
showDialog(setOrientationsDialogComponent, qsTr("Compass Calibration Complete"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
//}
}
onWaitingForCancelChanged: {
......@@ -252,6 +252,20 @@ Item {
anchors.top: parent.top
spacing: ScreenTools.defaultFontPixelHeight
QGCLabel {
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("Set your compass orientations below and the make sure to reboot the vehicle prior to flight.")
}
QGCButton {
text: qsTr("Reboot Vehicle")
onClicked: {
controller.vehicle.rebootVehicle()
hideDialog()
}
}
QGCLabel {
width: parent.width
wrapMode: Text.WordWrap
......
......@@ -71,7 +71,8 @@ Rectangle {
id: editDialogComponent
ParameterEditorDialog {
fact: _fact
fact: _fact
setFocus: ScreenTools.isMobile ? false : true // Works around strange android bug where wrong virtual keyboard is displayed
}
}
......
......@@ -27,7 +27,7 @@ FactValueSliderListModel::FactValueSliderListModel(Fact& fact, QObject* parent)
, _cPrevValues (0)
, _cNextValues (0)
, _initialValue (0)
, _initialValueRounded (0)
, _initialValueAtPrecision (0)
, _increment (0)
{
QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
......@@ -47,14 +47,14 @@ int FactValueSliderListModel::resetInitialValue(void)
}
_initialValue = _fact.cookedValue().toDouble();
_initialValueRounded = qRound(_initialValue);
_initialValueAtPrecision = _valueAtPrecision(_initialValue);
if (qRound(_fact.rawIncrement()) == _fact.rawIncrement()) {
_increment = qRound(_fact.cookedIncrement());
} else {
_increment = _fact.cookedIncrement();
}
_cPrevValues = qMin((_initialValue - _fact.cookedMin().toDouble()), 100.0) / _increment;
_cNextValues = qMin((_fact.cookedMax().toDouble() - _initialValue), 100.0) / _increment;
_cPrevValues = qMin((_initialValue - _fact.cookedMin().toDouble()) / _increment, 100.0);
_cNextValues = qMin((_fact.cookedMax().toDouble() - _initialValue) / _increment, 100.0);
_initialValueIndex = _cPrevValues;
int totalValueCount = _cPrevValues + 1 + _cNextValues;
......@@ -93,12 +93,9 @@ QVariant FactValueSliderListModel::data(const QModelIndex &index, int role) cons
if (cIncrementCount == 0) {
value = _initialValue;
} else {
value = _initialValueRounded + (cIncrementCount * _increment);
value = initialValueAtPrecision() + (cIncrementCount * _increment);
}
double precision = qPow(10, _fact.decimalPlaces());
double atPrecision = qRound(value * precision) / precision;
//qDebug() << value << precision << atPrecision << _fact.decimalPlaces() << _fact.name();
return QVariant(atPrecision);
return QVariant(_valueAtPrecision(value));
} else if (role == _valueIndexRole) {
return QVariant::fromValue(valueIndex);
} else {
......@@ -129,8 +126,8 @@ int FactValueSliderListModel::valueIndexAtModelIndex(int index)
return data(createIndex(index, 0), _valueIndexRole).toInt();
}
double FactValueSliderListModel::initialValueAtPrecision(void)
double FactValueSliderListModel::_valueAtPrecision(double value) const
{
double precision = qPow(10, _fact.decimalPlaces());
return qRound(_initialValue * precision) / precision;
return qRound(value * precision) / precision;
}
......@@ -25,7 +25,7 @@ public:
/// The initial value of the Fact at the meta data specified decimal place precision
Q_PROPERTY(double initialValueAtPrecision READ initialValueAtPrecision NOTIFY initialValueAtPrecisionChanged)
double initialValueAtPrecision(void);
double initialValueAtPrecision(void) const { return _initialValueAtPrecision; }
Q_INVOKABLE int resetInitialValue(void);
Q_INVOKABLE double valueAtModelIndex(int index);
......@@ -35,6 +35,8 @@ signals:
void initialValueAtPrecisionChanged(void);
private:
double _valueAtPrecision(double value) const;
// Overrides from QAbstractListModel
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override;
......@@ -48,7 +50,7 @@ private:
int _cNextValues;
int _windowSize;
double _initialValue;
double _initialValueRounded;
double _initialValueAtPrecision;
double _increment;
static const int _valueRole;
......
......@@ -505,6 +505,30 @@ const QVariantList& FirmwarePlugin::cameraList(const Vehicle* vehicle)
0, // minTriggerInterval
this);
_cameraList.append(QVariant::fromValue(metaData));
metaData = new CameraMetaData(tr("Sentera NDVI Single Sensor"),
4.68, // sensorWidth
3.56, // sendsorHeight
1248, // imageWidth
952, // imageHeight
4.14, // focalLength
true, // landscape
false, // fixedOrientation
0, // minTriggerInterval
this);
_cameraList.append(QVariant::fromValue(metaData));
metaData = new CameraMetaData(tr("Sentera Double 4K Sensor"),
6.2, // sensorWidth
4.65, // sendsorHeight
4000, // imageWidth
3000, // imageHeight
5.4, // focalLength
true, // landscape
false, // fixedOrientation
0, // minTriggerInterval
this);
_cameraList.append(QVariant::fromValue(metaData));
}
return _cameraList;
......
......@@ -65,7 +65,7 @@ Item {
readonly property string changeAltMessage: qsTr("Change the altitude of the vehicle up or down.")
readonly property string gotoMessage: qsTr("Move the vehicle to the specified location.")
property string setWaypointMessage: qsTr("Adjust current waypoint to %1.").arg(_actionData)
readonly property string orbitMessage: qsTr("Orbit the vehicle around the specified location. Warning: WORK IN PROGRESS!")
readonly property string orbitMessage: qsTr("Orbit the vehicle around the specified location.")
readonly property string landAbortMessage: qsTr("Abort the landing sequence.")
readonly property string pauseMessage: qsTr("Pause the vehicle at it's current position, adjusting altitude up or down as needed.")
readonly property string mvPauseMessage: qsTr("Pause all vehicles at their current position.")
......
......@@ -65,7 +65,7 @@ Map {
}
function centerToSpecifiedLocation() {
qgcView.showDialog(specifyMapPositionDialog, qsTr("Specify Position"), qgcView.showDialogDefaultWidth, StandardButton.Cancel)
qgcView.showDialog(specifyMapPositionDialog, qsTr("Specify Position"), qgcView.showDialogDefaultWidth, StandardButton.Close)
}
......
......@@ -26,8 +26,8 @@ const char* CameraCalc::adjustedFootprintSideName = "AdjustedFootprintSi
const char* CameraCalc::_jsonCameraSpecTypeKey = "CameraSpecType";
CameraCalc::CameraCalc(Vehicle* vehicle, QString settingsGroup, QObject* parent)
: CameraSpec (parent)
CameraCalc::CameraCalc(Vehicle* vehicle, const QString& settingsGroup, QObject* parent)
: CameraSpec (settingsGroup, parent)
, _vehicle (vehicle)
, _dirty (false)
, _disableRecalc (false)
......
......@@ -19,7 +19,7 @@ class CameraCalc : public CameraSpec
Q_OBJECT
public:
CameraCalc(Vehicle* vehicle, QString settingsGroup, QObject* parent = NULL);
CameraCalc(Vehicle* vehicle, const QString& settingsGroup, QObject* parent = NULL);
Q_PROPERTY(QString customCameraName READ customCameraName CONSTANT) ///< Camera name for custom camera setting
Q_PROPERTY(QString manualCameraName READ manualCameraName CONSTANT) ///< Camera name for manual camera setting
......
......@@ -21,38 +21,20 @@ const char* CameraSpec::_landscapeName = "Landscape";
const char* CameraSpec::_fixedOrientationName = "FixedOrientation";
const char* CameraSpec::_minTriggerIntervalName = "MinTriggerInterval";
CameraSpec::CameraSpec(QObject* parent)
CameraSpec::CameraSpec(const QString& settingsGroup, QObject* parent)
: QObject (parent)
, _dirty (false)
, _metaDataMap (FactMetaData::createMapFromJsonFile(QStringLiteral(":/json/CameraSpec.FactMetaData.json"), this))
, _sensorWidthFact (0, _sensorWidthName, FactMetaData::valueTypeDouble)
, _sensorHeightFact (0, _sensorHeightName, FactMetaData::valueTypeDouble)
, _imageWidthFact (0, _imageWidthName, FactMetaData::valueTypeUint32)
, _imageHeightFact (0, _imageHeightName, FactMetaData::valueTypeUint32)
, _focalLengthFact (0, _focalLengthName, FactMetaData::valueTypeDouble)
, _landscapeFact (0, _landscapeName, FactMetaData::valueTypeBool)
, _fixedOrientationFact (0, _fixedOrientationName, FactMetaData::valueTypeBool)
, _minTriggerIntervalFact (0, _minTriggerIntervalName, FactMetaData::valueTypeDouble)
, _sensorWidthFact (settingsGroup, _metaDataMap[_sensorWidthName])
, _sensorHeightFact (settingsGroup, _metaDataMap[_sensorHeightName])
, _imageWidthFact (settingsGroup, _metaDataMap[_imageWidthName])
, _imageHeightFact (settingsGroup, _metaDataMap[_imageHeightName])
, _focalLengthFact (settingsGroup, _metaDataMap[_focalLengthName])
, _landscapeFact (settingsGroup, _metaDataMap[_landscapeName])
, _fixedOrientationFact (settingsGroup, _metaDataMap[_fixedOrientationName])
, _minTriggerIntervalFact (settingsGroup, _metaDataMap[_minTriggerIntervalName])
{
_init(true);
}
CameraSpec::CameraSpec(const CameraSpec& other, QObject* parent)
: QObject (parent)
, _dirty (false)
, _metaDataMap (FactMetaData::createMapFromJsonFile(QStringLiteral(":/json/CameraSpec.FactMetaData.json"), this))
, _sensorWidthFact (0, _sensorWidthName, FactMetaData::valueTypeDouble)
, _sensorHeightFact (0, _sensorHeightName, FactMetaData::valueTypeDouble)
, _imageWidthFact (0, _imageWidthName, FactMetaData::valueTypeUint32)
, _imageHeightFact (0, _imageHeightName, FactMetaData::valueTypeUint32)
, _focalLengthFact (0, _focalLengthName, FactMetaData::valueTypeDouble)
, _landscapeFact (0, _landscapeName, FactMetaData::valueTypeBool)
, _fixedOrientationFact (0, _fixedOrientationName, FactMetaData::valueTypeBool)
, _minTriggerIntervalFact (0, _minTriggerIntervalName, FactMetaData::valueTypeDouble)
{
_init(false);
*this = other;
QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
}
const CameraSpec& CameraSpec::operator=(const CameraSpec& other)
......@@ -69,20 +51,6 @@ const CameraSpec& CameraSpec::operator=(const CameraSpec& other)
return *this;
}
void CameraSpec::_init(bool setDefaults)
{
QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
_sensorWidthFact.setMetaData (_metaDataMap[_sensorWidthName], setDefaults);
_sensorHeightFact.setMetaData (_metaDataMap[_sensorHeightName], setDefaults);
_imageWidthFact.setMetaData (_metaDataMap[_imageWidthName], setDefaults);
_imageHeightFact.setMetaData (_metaDataMap[_imageHeightName], setDefaults);
_focalLengthFact.setMetaData (_metaDataMap[_focalLengthName], setDefaults);
_landscapeFact.setMetaData (_metaDataMap[_landscapeName], setDefaults);
_fixedOrientationFact.setMetaData (_metaDataMap[_fixedOrientationName], setDefaults);
_minTriggerIntervalFact.setMetaData (_metaDataMap[_minTriggerIntervalName], setDefaults);
}
void CameraSpec::setDirty(bool dirty)
{
if (_dirty != dirty) {
......
......@@ -9,15 +9,14 @@
#pragma once
#include "Fact.h"
#include "SettingsFact.h"
class CameraSpec : public QObject
{
Q_OBJECT
public:
CameraSpec(QObject* parent = NULL);
CameraSpec(const CameraSpec& other, QObject* parent);
CameraSpec(const QString& settingsGroup, QObject* parent = NULL);
const CameraSpec& operator=(const CameraSpec& other);
......@@ -31,14 +30,14 @@ public:
Q_PROPERTY(Fact* fixedOrientation READ fixedOrientation CONSTANT) ///< true: camera is in fixed orientation
Q_PROPERTY(Fact* minTriggerInterval READ minTriggerInterval CONSTANT) ///< Minimum time in seconds between each photo taken, 0 for not specified
Fact* sensorWidth (void) { return &_sensorWidthFact; }
Fact* sensorHeight (void) { return &_sensorHeightFact; }
Fact* imageWidth (void) { return &_imageWidthFact; }
Fact* imageHeight (void) { return &_imageHeightFact; }
Fact* focalLength (void) { return &_focalLengthFact; }
Fact* landscape (void) { return &_landscapeFact; }
Fact* fixedOrientation (void) { return &_fixedOrientationFact; }
Fact* minTriggerInterval(void) { return &_minTriggerIntervalFact; }
SettingsFact* sensorWidth (void) { return &_sensorWidthFact; }
SettingsFact* sensorHeight (void) { return &_sensorHeightFact; }
SettingsFact* imageWidth (void) { return &_imageWidthFact; }
SettingsFact* imageHeight (void) { return &_imageHeightFact; }
SettingsFact* focalLength (void) { return &_focalLengthFact; }
SettingsFact* landscape (void) { return &_landscapeFact; }
SettingsFact* fixedOrientation (void) { return &_fixedOrientationFact; }
SettingsFact* minTriggerInterval(void) { return &_minTriggerIntervalFact; }
bool dirty (void) const { return _dirty; }
void setDirty (bool dirty);
......@@ -50,20 +49,18 @@ signals:
void dirtyChanged(bool dirty);
private:
void _init(bool setDefaults);
bool _dirty;
QMap<QString, FactMetaData*> _metaDataMap;
Fact _sensorWidthFact;
Fact _sensorHeightFact;
Fact _imageWidthFact;
Fact _imageHeightFact;
Fact _focalLengthFact;
Fact _landscapeFact;
Fact _fixedOrientationFact;
Fact _minTriggerIntervalFact;
SettingsFact _sensorWidthFact;
SettingsFact _sensorHeightFact;
SettingsFact _imageWidthFact;
SettingsFact _imageHeightFact;
SettingsFact _focalLengthFact;
SettingsFact _landscapeFact;
SettingsFact _fixedOrientationFact;
SettingsFact _minTriggerIntervalFact;
static const char* _sensorWidthName;
static const char* _sensorHeightName;
......
......@@ -225,7 +225,9 @@ bool FixedWingLandingComplexItem::load(const QJsonObject& complexObject, int seq
_landingCoordSet = true;
_ignoreRecalcSignals = false;
_recalcFromCoordinateChange();
emit coordinateChanged(this->coordinate()); // This will kick off terrain query
return true;
}
......
......@@ -123,7 +123,6 @@ Item {
_circle = false
}
/// Reset polygon to a circle which fits within initial polygon
function setCircleRadius(center, radius) {
var unboundCenter = center.atDistanceAndAzimuth(0, 0)
_circleRadius = radius
......@@ -231,7 +230,7 @@ Item {
MenuItem {
text: qsTr("Edit position..." )
enabled: _circle
onTriggered: qgcView.showDialog(editPositionDialog, qsTr("Edit Position"), qgcView.showDialogDefaultWidth, StandardButton.Cancel)
onTriggered: qgcView.showDialog(editPositionDialog, qsTr("Edit Position"), qgcView.showDialogDefaultWidth, StandardButton.Close)
}
MenuItem {
......@@ -460,7 +459,8 @@ Item {
}
function setRadiusFromDialog() {
setCircleRadius(mapPolygon.center, radiusField.text)
var radius = QGroundControl.appSettingsDistanceUnitsToMeters(radiusField.text)
setCircleRadius(mapPolygon.center, radius)
_editCircleRadius = false
}
......@@ -484,7 +484,9 @@ Item {
QGCTextField {
id: radiusField
text: _circleRadius.toFixed(2)
showUnits: true
unitsLabel: QGroundControl.appSettingsDistanceUnitsString
text: QGroundControl.metersToAppSettingsDistanceUnits(_circleRadius).toFixed(2)
onEditingFinished: setRadiusFromDialog()
inputMethodHints: Qt.ImhFormattedNumbersOnly
}
......
......@@ -173,6 +173,10 @@ void VisualMissionItem::setMissionVehicleYaw(double vehicleYaw)
void VisualMissionItem::_updateTerrainAltitude(void)
{
if (coordinate().latitude() == 0 && coordinate().longitude() == 0) {
// This is an intermediate state we don't react to
return;
}
if (!_flyView && coordinate().isValid()) {
// We use a timer so that any additional requests before the timer fires result in only a single request
_updateTerrainTimer.start();
......@@ -195,9 +199,7 @@ void VisualMissionItem::_reallyUpdateTerrainAltitude(void)
void VisualMissionItem::_terrainDataReceived(bool success, QList<double> heights)
{
if (success) {
_terrainAltitude = heights[0];
emit terrainAltitudeChanged(_terrainAltitude);
sender()->deleteLater();
}
_terrainAltitude = success ? heights[0] : qQNaN();
emit terrainAltitudeChanged(_terrainAltitude);
sender()->deleteLater();
}
......@@ -31,8 +31,12 @@ Rectangle {
//property real availableWidth ///< Width for control
//property var missionItem ///< Mission Item for editor
property real _margin: ScreenTools.defaultFontPixelWidth / 2
property real _spacer: ScreenTools.defaultFontPixelWidth / 2
property real _margin: ScreenTools.defaultFontPixelWidth / 2
property real _spacer: ScreenTools.defaultFontPixelWidth / 2
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property string _setToVehicleHeadingStr: qsTr("Set to vehicle heading")
property string _setToVehicleLocationStr: qsTr("Set to vehicle location")
ExclusiveGroup { id: distanceGlideGroup }
......@@ -45,34 +49,57 @@ Rectangle {
visible: missionItem.landingCoordSet
SectionHeader {
text: qsTr("Loiter point")
id: loiterPointSection
text: qsTr("Loiter point")
}
Item { width: 1; height: _spacer }
Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: _margin
visible: loiterPointSection.checked
FactTextFieldGrid {
anchors.left: parent.left
anchors.right: parent.right
factList: [ missionItem.loiterAltitude, missionItem.loiterRadius ]
factLabels: [ qsTr("Altitude"), qsTr("Radius") ]
}
Item { width: 1; height: _spacer }
Item { width: 1; height: _spacer }
FactTextFieldGrid {
anchors.left: parent.left
anchors.right: parent.right
factList: [ missionItem.loiterAltitude, missionItem.loiterRadius ]
factLabels: [ qsTr("Altitude"), qsTr("Radius") ]
}
QGCCheckBox {
text: qsTr("Loiter clockwise")
checked: missionItem.loiterClockwise
onClicked: missionItem.loiterClockwise = checked
Item { width: 1; height: _spacer }
QGCCheckBox {
text: qsTr("Loiter clockwise")
checked: missionItem.loiterClockwise
onClicked: missionItem.loiterClockwise = checked
}
QGCButton {
text: _setToVehicleHeadingStr
visible: _activeVehicle
onClicked: missionItem.landingHeading.rawValue = _activeVehicle.heading.rawValue
}
}
SectionHeader { text: qsTr("Landing point") }
SectionHeader {
id: landingPointSection
text: qsTr("Landing point")
}
Item { width: 1; height: _spacer }
Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: _margin
visible: landingPointSection.checked
Item { width: 1; height: _spacer }
GridLayout {
anchors.left: parent.left
anchors.right: parent.right
columns: 2
GridLayout {
anchors.left: parent.left
anchors.right: parent.right
columns: 2
QGCLabel { text: qsTr("Heading") }
......@@ -88,34 +115,42 @@ Rectangle {
fact: missionItem.landingAltitude
}
QGCRadioButton {
id: specifyLandingDistance
text: qsTr("Landing Dist")
checked: missionItem.valueSetIsDistance
exclusiveGroup: distanceGlideGroup
onClicked: missionItem.valueSetIsDistance = checked
Layout.fillWidth: true
}
QGCRadioButton {
id: specifyLandingDistance
text: qsTr("Landing Dist")
checked: missionItem.valueSetIsDistance
exclusiveGroup: distanceGlideGroup
onClicked: missionItem.valueSetIsDistance = checked
Layout.fillWidth: true
}
FactTextField {
fact: missionItem.landingDistance
enabled: specifyLandingDistance.checked
Layout.fillWidth: true
}
FactTextField {
fact: missionItem.landingDistance
enabled: specifyLandingDistance.checked
Layout.fillWidth: true
}
QGCRadioButton {
id: specifyGlideSlope
text: qsTr("Glide Slope")
checked: !missionItem.valueSetIsDistance
exclusiveGroup: distanceGlideGroup
onClicked: missionItem.valueSetIsDistance = !checked
Layout.fillWidth: true
}
QGCRadioButton {
id: specifyGlideSlope
text: qsTr("Glide Slope")
checked: !missionItem.valueSetIsDistance
exclusiveGroup: distanceGlideGroup
onClicked: missionItem.valueSetIsDistance = !checked
Layout.fillWidth: true
}
FactTextField {
fact: missionItem.glideSlope
enabled: specifyGlideSlope.checked
Layout.fillWidth: true
}
FactTextField {
fact: missionItem.glideSlope
enabled: specifyGlideSlope.checked
Layout.fillWidth: true
QGCButton {
text: _setToVehicleLocationStr
visible: _activeVehicle
Layout.columnSpan: 2
onClicked: missionItem.landingCoordinate = _activeVehicle.coordinate
}
}
}
......@@ -140,10 +175,30 @@ Rectangle {
spacing: ScreenTools.defaultFontPixelHeight
QGCLabel {
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
text: qsTr("Click in map to set landing point.")