|
|
|
@ -29,72 +29,6 @@ SetupPage {
@@ -29,72 +29,6 @@ SetupPage {
|
|
|
|
|
property Fact _oldFrameParam: controller.getParameterFact(-1, "FRAME", false) |
|
|
|
|
property Fact _newFrameParam: controller.getParameterFact(-1, "FRAME_CLASS", false) |
|
|
|
|
property Fact _frameTypeParam: controller.getParameterFact(-1, "FRAME_TYPE", false) |
|
|
|
|
property var _flatParamList: ListModel { |
|
|
|
|
ListElement { |
|
|
|
|
name: "3DR Aero M" |
|
|
|
|
file: "3DR_AERO_M.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "3DR Aero RTF" |
|
|
|
|
file: "3DR_Aero_RTF.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "3DR Rover" |
|
|
|
|
file: "3DR_Rover.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "3DR Tarot" |
|
|
|
|
file: "3DR_Tarot.bgsc" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "Parrot Bebop" |
|
|
|
|
file: "Parrot_Bebop.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "Storm32" |
|
|
|
|
file: "SToRM32-MAVLink.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "3DR X8-M RTF" |
|
|
|
|
file: "3DR_X8-M_RTF.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "3DR Y6A" |
|
|
|
|
file: "3DR_Y6A_RTF.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "3DR X8+ RTF" |
|
|
|
|
file: "3DR_X8+_RTF.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "3DR QUAD X4 RTF" |
|
|
|
|
file: "3DR_QUAD_X4_RTF.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "3DR X8" |
|
|
|
|
file: "3DR_X8_RTF.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "Iris with GoPro" |
|
|
|
|
file: "Iris with Front Mount Go Pro.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "Iris with Tarot" |
|
|
|
|
file: "Iris with Tarot Gimbal.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "3DR Iris+" |
|
|
|
|
file: "3DR_Iris+.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "Iris" |
|
|
|
|
file: "Iris.param" |
|
|
|
|
} |
|
|
|
|
ListElement { |
|
|
|
|
name: "3DR Y6B" |
|
|
|
|
file: "3DR_Y6B_RTF.param" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
APMAirframeComponentController { |
|
|
|
@ -107,100 +41,6 @@ SetupPage {
@@ -107,100 +41,6 @@ SetupPage {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
|
id: applyRestartDialogComponent |
|
|
|
|
|
|
|
|
|
QGCViewDialog { |
|
|
|
|
id: applyRestartDialog |
|
|
|
|
|
|
|
|
|
Connections { |
|
|
|
|
target: controller |
|
|
|
|
onCurrentAirframeTypeChanged: { |
|
|
|
|
airframePicker.model = controller.currentAirframeType.airframes; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
id: applyParamsText |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.margins: _margins |
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
text: qsTr("Select your drone to load the default parameters for it. ") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Flow { |
|
|
|
|
anchors.margins: _margins |
|
|
|
|
anchors.top: applyParamsText.bottom |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
spacing : _margins |
|
|
|
|
layoutDirection: Qt.Vertical; |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
|
id: airframePicker |
|
|
|
|
model: controller.currentAirframeType.airframes; |
|
|
|
|
|
|
|
|
|
delegate: QGCButton { |
|
|
|
|
id: btnParams |
|
|
|
|
width: parent.width / 2.1 |
|
|
|
|
height: (ScreenTools.defaultFontPixelHeight * 14) / 5 |
|
|
|
|
text: controller.currentAirframeType.airframes[index].name; |
|
|
|
|
|
|
|
|
|
onClicked : { |
|
|
|
|
controller.loadParameters(controller.currentAirframeType.airframes[index].params) |
|
|
|
|
hideDialog() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
|
id: selectParamFileDialogComponent |
|
|
|
|
|
|
|
|
|
QGCViewDialog { |
|
|
|
|
QGCLabel { |
|
|
|
|
id: applyParamsText |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.margins: _margins |
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
text: qsTr("Select your drone to load the default parameters for it. ") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Flow { |
|
|
|
|
anchors.margins: _margins |
|
|
|
|
anchors.top: applyParamsText.bottom |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
spacing : _margins |
|
|
|
|
layoutDirection: Qt.Vertical; |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
|
id: airframePicker |
|
|
|
|
model: _flatParamList |
|
|
|
|
|
|
|
|
|
delegate: QGCButton { |
|
|
|
|
width: parent.width / 2.1 |
|
|
|
|
height: (ScreenTools.defaultFontPixelHeight * 14) / 5 |
|
|
|
|
text: name |
|
|
|
|
|
|
|
|
|
onClicked : { |
|
|
|
|
controller.loadParameters(file) |
|
|
|
|
hideDialog() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
|
id: oldFramePageComponent |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
@ -219,11 +59,6 @@ SetupPage {
@@ -219,11 +59,6 @@ SetupPage {
|
|
|
|
|
text: qsTr("Please select your airframe type") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Load common parameters") |
|
|
|
|
onClicked: showDialog(applyRestartDialogComponent, qsTr("Load common parameters"), qgcView.showDialogDefaultWidth, StandardButton.Close) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
@ -254,7 +89,7 @@ SetupPage {
@@ -254,7 +89,7 @@ SetupPage {
|
|
|
|
|
columns: 2 |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Frame Class:") |
|
|
|
|
text: qsTr("Frame Class:") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
@ -264,7 +99,7 @@ SetupPage {
@@ -264,7 +99,7 @@ SetupPage {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Frame Type:") |
|
|
|
|
text: qsTr("Frame Type:") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
@ -272,11 +107,6 @@ SetupPage {
@@ -272,11 +107,6 @@ SetupPage {
|
|
|
|
|
indexModel: false |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 15 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Load common parameters") |
|
|
|
|
onClicked: showDialog(selectParamFileDialogComponent, qsTr("Load common parameters"), qgcView.showDialogDefaultWidth, StandardButton.Close) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} // SetupPage |
|
|
|
|