Commit 9eb431f5 authored by Don Gagne's avatar Don Gagne

parent 9a339fca
...@@ -23,9 +23,14 @@ import QGroundControl.Controllers 1.0 ...@@ -23,9 +23,14 @@ import QGroundControl.Controllers 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
SetupPage { SetupPage {
id: firmwarePage id: firmwarePage
pageComponent: firmwarePageComponent pageComponent: firmwarePageComponent
pageName: "Firmware" // For building setup page title: 'Firmware Setup' pageName: qsTr("Firmware")
showAdvanced: _activeVehicle && _activeVehicle.apmFirmware
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
signal cancelDialog
Component { Component {
id: firmwarePageComponent id: firmwarePageComponent
...@@ -40,7 +45,7 @@ SetupPage { ...@@ -40,7 +45,7 @@ SetupPage {
// a better way to hightlight them, or use less highlights. // a better way to hightlight them, or use less highlights.
// User visible strings // User visible strings
readonly property string title: "Firmware Setup" // Popup dialog title readonly property string title: qsTr("Firmware Setup") // Popup dialog title
readonly property string highlightPrefix: "<font color=\"" + qgcPal.warningText + "\">" readonly property string highlightPrefix: "<font color=\"" + qgcPal.warningText + "\">"
readonly property string highlightSuffix: "</font>" readonly property string highlightSuffix: "</font>"
...@@ -124,8 +129,8 @@ SetupPage { ...@@ -124,8 +129,8 @@ SetupPage {
} }
onError: { onError: {
hideDialog()
statusTextArea.append(flashFailText) statusTextArea.append(flashFailText)
firmwarePage.cancelDialog()
} }
} }
...@@ -165,7 +170,11 @@ SetupPage { ...@@ -165,7 +170,11 @@ SetupPage {
px4FlightStackRadio2.text = qsTr("PX4 Flight Stack ") + versionString px4FlightStackRadio2.text = qsTr("PX4 Flight Stack ") + versionString
} }
Component.onCompleted: updatePX4VersionDisplay() Component.onCompleted: {
firmwarePage.advanced = false
firmwarePage.showAdvanced = false
updatePX4VersionDisplay()
}
function accept() { function accept() {
hideDialog() hideDialog()
...@@ -195,6 +204,12 @@ SetupPage { ...@@ -195,6 +204,12 @@ SetupPage {
cancelFlash() cancelFlash()
} }
Connections {
target: firmwarePage
onCancelDialog: reject()
}
ExclusiveGroup { ExclusiveGroup {
id: firmwareGroup id: firmwareGroup
} }
...@@ -438,8 +453,16 @@ SetupPage { ...@@ -438,8 +453,16 @@ SetupPage {
} }
ProgressBar { ProgressBar {
id: progressBar id: progressBar
Layout.preferredWidth: parent.width Layout.preferredWidth: parent.width
visible: !flashBootloaderButton.visible
}
QGCButton {
id: flashBootloaderButton
text: qsTr("Flash ChibiOS Bootloader")
visible: firmwarePage.advanced
onClicked: _activeVehicle.flashBootloader()
} }
TextArea { TextArea {
......
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