sforkowany z mirror/meshtastic-android
refactor: update battery level convention
reference https://github.com/meshtastic/firmware/issues/2332master
rodzic
dd27d7cc5e
commit
8bd955ed6b
|
@ -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, "?")
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue