Unverified Commit 4bd968c2 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5896 from bluerobotics/sub-default-params-update

Add ArduSub 3.5.2 default params for BlueROV2
parents 48aaf56a 1715d347
...@@ -12,6 +12,7 @@ import QtQuick 2.3 ...@@ -12,6 +12,7 @@ import QtQuick 2.3
import QtQuick.Controls 1.2 import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QGroundControl 1.0
import QGroundControl.FactSystem 1.0 import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0 import QGroundControl.FactControls 1.0
import QGroundControl.Palette 1.0 import QGroundControl.Palette 1.0
...@@ -22,12 +23,9 @@ import QGroundControl.Controllers 1.0 ...@@ -22,12 +23,9 @@ import QGroundControl.Controllers 1.0
SetupPage { SetupPage {
id: subFramePage id: subFramePage
pageComponent: subFramePageComponent pageComponent: subFramePageComponent
property var _flatParamList: ListModel {
ListElement { property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
name: "Blue Robotics BlueROV2" property bool _oldFW: !(_activeVehicle.firmwareMajorVersion > 3 || _activeVehicle.firmwareMinorVersion > 5 || _activeVehicle.firmwarePatchVersion >= 2)
file: "Sub/bluerov2-3_5.params"
}
}
APMAirframeComponentController { id: controller; factPanel: subFramePage.viewPanel } APMAirframeComponentController { id: controller; factPanel: subFramePage.viewPanel }
...@@ -194,18 +192,16 @@ SetupPage { ...@@ -194,18 +192,16 @@ SetupPage {
spacing : _margins spacing : _margins
layoutDirection: Qt.Vertical; layoutDirection: Qt.Vertical;
Repeater { QGCButton {
id: airframePicker width: parent.width
model: _flatParamList text: "Blue Robotics BlueROV2"
property var file: _oldFW ? "Sub/bluerov2-3_5.params" : "Sub/bluerov2-3_5_2.params"
delegate: QGCButton {
width: parent.width onClicked : {
text: name console.log(_oldFW)
console.log(_activeVehicle.firmwarePatchVersion)
onClicked : { controller.loadParameters(file)
controller.loadParameters(file) hideDialog()
hideDialog()
}
} }
} }
} }
......
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