refactor: update battery level convention

reference https://github.com/meshtastic/firmware/issues/2332
master
andrekir 2023-03-11 07:45:50 -03:00
rodzic dd27d7cc5e
commit 8bd955ed6b
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -286,11 +286,11 @@ class UsersFragment : ScreenFragment("Users"), Logging {
) {
val (image, text) = when (battery) {
in 1..100 -> Pair(
in 0..100 -> Pair(
R.drawable.ic_battery_full_24,
String.format("%d%% %.2fV", battery, voltage ?: 0)
)
0 -> Pair(R.drawable.ic_power_plug_24, "")
111 -> Pair(R.drawable.ic_power_plug_24, "")
else -> Pair(R.drawable.ic_battery_full_24, "?")
}