Unverified Commit 10afa650 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6660 from DonLakeFlyer/ArduPilotBattery

ArduPilot: More work for new battery stuff
parents 141239cc 58b85d0b
......@@ -43,6 +43,8 @@ SetupPage {
property bool _batt2MonitorEnabled: _batt2MonitorAvailable && _batt2Monitor.rawValue !== 0
property bool _batt1ParamsAvailable: controller.parameterExists(-1, "BATT_CAPACITY")
property bool _batt2ParamsAvailable: controller.parameterExists(-1, "BATT2_CAPACITY")
property bool _showBatt1Reboot: _batt1MonitorEnabled && !_batt1ParamsAvailable
property bool _showBatt2Reboot: _batt2MonitorEnabled && !_batt2ParamsAvailable
property string _restartRequired: qsTr("Requires vehicle reboot")
......@@ -84,7 +86,13 @@ SetupPage {
QGCLabel {
text: _restartRequired
visible: _batt1MonitorEnabled && !_batt1ParamsAvailable
visible: _showBatt1Reboot
}
QGCButton {
text: qsTr("Reboot vehicle")
visible: _showBatt1Reboot
onClicked: controller.vehicle.rebootVehicle()
}
}
}
......@@ -162,7 +170,13 @@ SetupPage {
QGCLabel {
text: _restartRequired
visible: _batt2MonitorEnabled && !_batt2ParamsAvailable
visible: _showBatt2Reboot
}
QGCButton {
text: qsTr("Reboot vehicle")
visible: _showBatt2Reboot
onClicked: controller.vehicle.rebootVehicle()
}
}
}
......
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