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

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