mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: Always Display voltage (#3362)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
c98e74d804
commit
6a71891790
2 changed files with 5 additions and 3 deletions
|
|
@ -62,7 +62,7 @@ fun CurrentlyConnectedInfo(
|
|||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
MaterialBatteryInfo(level = node.batteryLevel)
|
||||
MaterialBatteryInfo(level = node.batteryLevel, voltage = node.voltage)
|
||||
if (bluetoothRssi != null) {
|
||||
MaterialBluetoothSignalInfo(rssi = bluetoothRssi)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,14 +117,16 @@ fun MaterialBatteryInfo(modifier: Modifier = Modifier, level: Int?, voltage: Flo
|
|||
color = MaterialTheme.colorScheme.onSurface,
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
)
|
||||
voltage?.let {
|
||||
}
|
||||
voltage
|
||||
?.takeIf { it > 0 }
|
||||
?.let {
|
||||
Text(
|
||||
text = "%.2fV".format(it),
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue