|
|
@ -65,12 +65,17 @@ Item { |
|
|
|
|
|
|
|
|
|
|
|
// These are simple buttons that can be grouped on this Repeater |
|
|
|
// These are simple buttons that can be grouped on this Repeater |
|
|
|
Repeater { |
|
|
|
Repeater { |
|
|
|
|
|
|
|
id: simpleGimbalButtonsRepeater |
|
|
|
|
|
|
|
property var hasControl: gimbalController && gimbalController.activeGimbal && gimbalController.activeGimbal.gimbalHaveControl |
|
|
|
|
|
|
|
property var acqControlButtonEnabled: QGroundControl.settingsManager.gimbalControllerSettings.toolbarIndicatorShowAcquireReleaseControl.rawValue |
|
|
|
|
|
|
|
|
|
|
|
model: [ |
|
|
|
model: [ |
|
|
|
{id: "yawLock", text: activeGimbal.yawLock ? qsTr("Yaw <br> Follow") : qsTr("Yaw <br> Lock") }, |
|
|
|
{id: "yawLock", text: activeGimbal.yawLock ? qsTr("Yaw <br> Follow") : qsTr("Yaw <br> Lock") , visible: true }, |
|
|
|
{id: "center", text: qsTr("Center") }, |
|
|
|
{id: "center", text: qsTr("Center") , visible: true }, |
|
|
|
{id: "tilt90", text: qsTr("Tilt 90") }, |
|
|
|
{id: "tilt90", text: qsTr("Tilt 90") , visible: true }, |
|
|
|
{id: "pointHome", text: qsTr("Point <br> Home") }, |
|
|
|
{id: "pointHome", text: qsTr("Point <br> Home") , visible: true }, |
|
|
|
{id: "retract", text: qsTr("Retract") } |
|
|
|
{id: "retract", text: qsTr("Retract") , visible: true }, |
|
|
|
|
|
|
|
{id: "acqControl",text: hasControl ? qsTr("Release <br> Control") : qsTr("Acquire <br> Control"), visible: acqControlButtonEnabled } |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
QGCButton { |
|
|
@ -79,13 +84,18 @@ Item { |
|
|
|
{"center": function(){ gimbalController.centerGimbal() } }, |
|
|
|
{"center": function(){ gimbalController.centerGimbal() } }, |
|
|
|
{"tilt90": function(){ gimbalController.sendPitchBodyYaw(-90, 0) } }, |
|
|
|
{"tilt90": function(){ gimbalController.sendPitchBodyYaw(-90, 0) } }, |
|
|
|
{"pointHome": function(){ activeVehicle.guidedModeROI(activeVehicle.homePosition) } }, |
|
|
|
{"pointHome": function(){ activeVehicle.guidedModeROI(activeVehicle.homePosition) } }, |
|
|
|
{"retract": function(){ gimbalController.toggleGimbalRetracted(true) } } |
|
|
|
{"retract": function(){ gimbalController.toggleGimbalRetracted(true) } }, |
|
|
|
|
|
|
|
// This button changes its action depending on gimbal being under control or not |
|
|
|
|
|
|
|
{"acqControl": function(){ simpleGimbalButtonsRepeater.hasControl ? |
|
|
|
|
|
|
|
gimbalController.releaseGimbalControl() : |
|
|
|
|
|
|
|
gimbalController.acquireGimbalControl() } } |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
Layout.preferredWidth: Layout.preferredHeight |
|
|
|
Layout.preferredWidth: Layout.preferredHeight |
|
|
|
Layout.preferredHeight: buttonHeight |
|
|
|
Layout.preferredHeight: buttonHeight |
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter |
|
|
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter |
|
|
|
text: modelData.text |
|
|
|
text: modelData.text |
|
|
|
|
|
|
|
visible: modelData.visible |
|
|
|
fontWeight: Font.Medium |
|
|
|
fontWeight: Font.Medium |
|
|
|
pointSize: ScreenTools.smallFontPointSize |
|
|
|
pointSize: ScreenTools.smallFontPointSize |
|
|
|
backRadius: panelRadius * 0.5 |
|
|
|
backRadius: panelRadius * 0.5 |
|
|
@ -306,6 +316,15 @@ Item { |
|
|
|
checkedValue: 1 |
|
|
|
checkedValue: 1 |
|
|
|
uncheckedValue: 0 |
|
|
|
uncheckedValue: 0 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FactCheckBox { |
|
|
|
|
|
|
|
id: showAcquireControlCheckbox |
|
|
|
|
|
|
|
text: " " + qsTr("Show Acquire/Release control button") |
|
|
|
|
|
|
|
fact: QGroundControl.settingsManager.gimbalControllerSettings.toolbarIndicatorShowAcquireReleaseControl |
|
|
|
|
|
|
|
Layout.columnSpan: 2 |
|
|
|
|
|
|
|
checkedValue: 1 |
|
|
|
|
|
|
|
uncheckedValue: 0 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|