Commit 58b85d0b authored by DonLakeFlyer's avatar DonLakeFlyer

More work for new battery stuff

parent 348091b3
......@@ -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