Commit 00f26652 authored by Lorenz Meier's avatar Lorenz Meier

Battery toolbar: Do not indicate any voltage for cases where the voltage is unknown

parent 101adaf3
......@@ -495,7 +495,7 @@ Rectangle {
anchors.rightMargin: getProportionalDimmension(6)
visible: batteryStatus.visible && activeVehicle.batteryConsumed >= 0.0
QGCLabel {
text: activeVehicle.batteryVoltage.toFixed(1) + 'V';
text: (activeVehicle.batteryVoltage > 0) ? activeVehicle.batteryVoltage.toFixed(1) + 'V' : '---';
width: getProportionalDimmension(30)
horizontalAlignment: Text.AlignRight
font.pixelSize: ScreenTools.smallFontPixelSize
......@@ -503,7 +503,7 @@ Rectangle {
color: colorWhite
}
QGCLabel {
text: activeVehicle.batteryConsumed.toFixed(0) + 'mAh';
text: (activeVehicle.batteryConsumed > 0) ? activeVehicle.batteryConsumed.toFixed(0) + 'mAh' : '---';
width: getProportionalDimmension(30)
horizontalAlignment: Text.AlignRight
font.pixelSize: ScreenTools.smallFontPixelSize
......
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