Browse Source

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

QGC4.4
Lorenz Meier 10 years ago
parent
commit
00f26652df
  1. 4
      src/ui/toolbar/MainToolBar.qml

4
src/ui/toolbar/MainToolBar.qml

@ -495,7 +495,7 @@ Rectangle { @@ -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 { @@ -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

Loading…
Cancel
Save