From 59b67d429dac0eab7deb2452bfc4597bd9446b5b Mon Sep 17 00:00:00 2001 From: prokrypt Date: Tue, 12 Mar 2024 11:22:37 -0700 Subject: [PATCH] 2 decimal places for plugged-in voltage --- app/src/main/java/com/geeksville/mesh/ui/BatteryInfo.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/geeksville/mesh/ui/BatteryInfo.kt b/app/src/main/java/com/geeksville/mesh/ui/BatteryInfo.kt index 95e4c91cb..67d4fed76 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/BatteryInfo.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/BatteryInfo.kt @@ -31,7 +31,7 @@ fun BatteryInfo( in 15..34 -> R.drawable.ic_battery_low to infoString in 35..79 -> R.drawable.ic_battery_medium to infoString in 80..100 -> R.drawable.ic_battery_high to infoString - 101 -> R.drawable.ic_power_plug_24 to "%.1fV".format(voltage) + 101 -> R.drawable.ic_power_plug_24 to "%.2fV".format(voltage) else -> R.drawable.ic_battery_unknown to (voltage?.let { "%.2fV".format(it) } ?: "") } @@ -91,4 +91,4 @@ class BatteryInfoPreviewParameterProvider : PreviewParameterProvider