Browse Source

Don't show compass orientations for fixed orientation vehicles.

QGC4.4
Don Gagne 7 years ago
parent
commit
9b681fe07f
  1. 22
      src/AutoPilotPlugins/PX4/SensorsSetup.qml

22
src/AutoPilotPlugins/PX4/SensorsSetup.qml

@ -132,10 +132,8 @@ Item {
onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText
onMagCalComplete: { onMagCalComplete: {
//if (!_sensorsHaveFixedOrientation && (showCompass0Rot || showCompass1Rot || showCompass2Rot)) { setOrientationsDialogShowBoardOrientation = false
setOrientationsDialogShowBoardOrientation = false showDialog(setOrientationsDialogComponent, qsTr("Compass Calibration Complete"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
showDialog(setOrientationsDialogComponent, qsTr("Compass Calibration Complete"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
//}
} }
onWaitingForCancelChanged: { onWaitingForCancelChanged: {
@ -255,7 +253,9 @@ Item {
QGCLabel { QGCLabel {
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: qsTr("Set your compass orientations below and the make sure to reboot the vehicle prior to flight.") text: _sensorsHaveFixedOrientation ?
qsTr("Make sure to reboot the vehicle prior to flight.") :
qsTr("Set your compass orientations below and the make sure to reboot the vehicle prior to flight.")
} }
QGCButton { QGCButton {
@ -270,6 +270,7 @@ Item {
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: boardRotationText text: boardRotationText
visible: !_sensorsHaveFixedOrientation
} }
Column { Column {
@ -287,8 +288,10 @@ Item {
} }
} }
// Compass 0 rotation
Column { Column {
// Compass 0 rotation visible: !_sensorsHaveFixedOrientation
Component { Component {
id: compass0ComponentLabel2 id: compass0ComponentLabel2
@ -312,8 +315,10 @@ Item {
Loader { sourceComponent: showCompass0Rot ? compass0ComponentCombo2 : null } Loader { sourceComponent: showCompass0Rot ? compass0ComponentCombo2 : null }
} }
// Compass 1 rotation
Column { Column {
// Compass 1 rotation visible: !_sensorsHaveFixedOrientation
Component { Component {
id: compass1ComponentLabel2 id: compass1ComponentLabel2
@ -337,10 +342,11 @@ Item {
Loader { sourceComponent: showCompass1Rot ? compass1ComponentCombo2 : null } Loader { sourceComponent: showCompass1Rot ? compass1ComponentCombo2 : null }
} }
// Compass 2 rotation
Column { Column {
visible: !_sensorsHaveFixedOrientation
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
// Compass 2 rotation
Component { Component {
id: compass2ComponentLabel2 id: compass2ComponentLabel2

Loading…
Cancel
Save