Commit 96ca9d73 authored by Gus Grubba's avatar Gus Grubba

Merge branch 'Stable_V3.4' of https://github.com/mavlink/qgroundcontrol into Stable_V3.4

* 'Stable_V3.4' of https://github.com/mavlink/qgroundcontrol:
  Change Command only supported for Simple Items
  Prompt for Reboot after compass cal
  Respect app units
parents 2befad08 b4fed39b
...@@ -167,7 +167,7 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St ...@@ -167,7 +167,7 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St
emit resetStatusTextArea(); emit resetStatusTextArea();
} }
if (_magCalInProgress) { if (_magCalInProgress) {
emit setCompassRotations(); emit magCalComplete();
} }
break; break;
......
...@@ -92,7 +92,7 @@ signals: ...@@ -92,7 +92,7 @@ signals:
void orientationCalSidesRotateChanged(void); void orientationCalSidesRotateChanged(void);
void resetStatusTextArea(void); void resetStatusTextArea(void);
void waitingForCancelChanged(void); void waitingForCancelChanged(void);
void setCompassRotations(void); void magCalComplete(void);
private slots: private slots:
void _handleUASTextMessage(int uasId, int compId, int severity, QString text); void _handleUASTextMessage(int uasId, int compId, int severity, QString text);
......
...@@ -131,11 +131,11 @@ Item { ...@@ -131,11 +131,11 @@ Item {
onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText
onSetCompassRotations: { onMagCalComplete: {
if (!_sensorsHaveFixedOrientation && (showCompass0Rot || showCompass1Rot || showCompass2Rot)) { //if (!_sensorsHaveFixedOrientation && (showCompass0Rot || showCompass1Rot || showCompass2Rot)) {
setOrientationsDialogShowBoardOrientation = false setOrientationsDialogShowBoardOrientation = false
showDialog(setOrientationsDialogComponent, qsTr("Set Compass Rotation(s)"), qgcView.showDialogDefaultWidth, StandardButton.Ok) showDialog(setOrientationsDialogComponent, qsTr("Compass Calibration Complete"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
} //}
} }
onWaitingForCancelChanged: { onWaitingForCancelChanged: {
...@@ -252,6 +252,20 @@ Item { ...@@ -252,6 +252,20 @@ Item {
anchors.top: parent.top anchors.top: parent.top
spacing: ScreenTools.defaultFontPixelHeight 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 { QGCLabel {
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
......
...@@ -123,7 +123,6 @@ Item { ...@@ -123,7 +123,6 @@ Item {
_circle = false _circle = false
} }
/// Reset polygon to a circle which fits within initial polygon
function setCircleRadius(center, radius) { function setCircleRadius(center, radius) {
var unboundCenter = center.atDistanceAndAzimuth(0, 0) var unboundCenter = center.atDistanceAndAzimuth(0, 0)
_circleRadius = radius _circleRadius = radius
...@@ -460,7 +459,8 @@ Item { ...@@ -460,7 +459,8 @@ Item {
} }
function setRadiusFromDialog() { function setRadiusFromDialog() {
setCircleRadius(mapPolygon.center, radiusField.text) var radius = QGroundControl.appSettingsDistanceUnitsToMeters(radiusField.text)
setCircleRadius(mapPolygon.center, radius)
_editCircleRadius = false _editCircleRadius = false
} }
...@@ -484,7 +484,9 @@ Item { ...@@ -484,7 +484,9 @@ Item {
QGCTextField { QGCTextField {
id: radiusField id: radiusField
text: _circleRadius.toFixed(2) showUnits: true
unitsLabel: QGroundControl.appSettingsDistanceUnitsString
text: QGroundControl.metersToAppSettingsDistanceUnits(_circleRadius).toFixed(2)
onEditingFinished: setRadiusFromDialog() onEditingFinished: setRadiusFromDialog()
inputMethodHints: Qt.ImhFormattedNumbersOnly inputMethodHints: Qt.ImhFormattedNumbersOnly
} }
......
...@@ -142,7 +142,7 @@ Rectangle { ...@@ -142,7 +142,7 @@ Rectangle {
MenuItem { MenuItem {
text: qsTr("Change command...") text: qsTr("Change command...")
onTriggered: commandPicker.clicked() onTriggered: commandPicker.clicked()
visible: !_waypointsOnlyMode visible: missionItem.isSimpleItem && !_waypointsOnlyMode
} }
MenuItem { MenuItem {
......
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