mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-04 14:13:47 -04:00
refactor: update battery level convention
reference https://github.com/meshtastic/firmware/issues/2332
This commit is contained in:
@@ -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, "?")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user