mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-24 02:51:20 -08:00
Fix dongle reconnection bug (#1872)
This commit is contained in:
1 parent
cdde0b762f
commit
5e3395afb0
2 files changed
+35
-17
No files matched your search
+2
-1
@@ -71,6 +71,7 @@ class AndroidHIDManager(
|
||||
val serial = hidDevice.serialNumber ?: "Unknown USB Device ${hidDevice.deviceId}"
|
||||
this.devicesBySerial[serial]?.let {
|
||||
this.devicesByHID[hidDevice] = it
|
||||
this.lastDataByHID[hidDevice] = 0
|
||||
synchronized(this.devices) {
|
||||
for (id in it) {
|
||||
val device = this.devices[id]
|
||||
@@ -187,7 +188,7 @@ class AndroidHIDManager(
|
||||
}
|
||||
// LogManager.info("[TrackerServer] HID received $packetCount tracker packets")
|
||||
} else {
|
||||
lastDataByHID[hidDevice] = lastDataByHID[hidDevice]!! + 1 // increment last data received
|
||||
lastDataByHID[hidDevice] = lastDataByHID.getOrDefault(hidDevice, 0) + 1 // increment last data received
|
||||
}
|
||||
}
|
||||
if (!devicesPresent) {
|
||||
|
||||
Reference in new issue
Block a user