diff --git a/src/ui/toolbar/MainToolBar.qml b/src/ui/toolbar/MainToolBar.qml index 3699dbbaebd712fe62496e6d2efe87175c1f0855..4aa8f5bd724b006cc8da5e103951dd03eb07e628 100644 --- a/src/ui/toolbar/MainToolBar.qml +++ b/src/ui/toolbar/MainToolBar.qml @@ -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