mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-06 02:01:58 +02:00
Move comment
This commit is contained in:
@@ -268,9 +268,9 @@ class HIDCommon {
|
||||
}
|
||||
// -1: Not known (e.g. not yet calculated after wake up, reusing known value is okay), 0: N/A (e.g. charging)
|
||||
if (batt != null) {
|
||||
// Server displays 0% if received 255 or -1, otherwise 0 will hide battery icon
|
||||
tracker.batteryLevel = if (batt == 128) -1f else (batt and 127).toFloat()
|
||||
}
|
||||
// Server displays 0% if received 255 or -1, otherwise 0 will hide battery icon
|
||||
if (batt_v != null) {
|
||||
tracker.batteryVoltage = (batt_v.toFloat() + 245f) / 100f
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user