mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-01 06:12:35 -08:00
more readable version of it
This commit is contained in:
1 parent
18386d57d6
commit
413332462f
1 file changed
+4
-7
@@ -306,21 +306,18 @@ public class VRServer extends Thread {
|
||||
}
|
||||
|
||||
public Tracker getTrackerById(TrackerIdT id) {
|
||||
|
||||
for (Tracker tracker : trackers) {
|
||||
if (tracker.getTrackerNum() != id.getTrackerNum()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Handle synthetic devices
|
||||
if (id.getDeviceId() == null) {
|
||||
if (tracker.getDevice() == null)
|
||||
return tracker;
|
||||
continue;
|
||||
if (id.getDeviceId() == null && tracker.getDevice() == null) {
|
||||
return tracker;
|
||||
}
|
||||
// We now know that the argument is not a synthetic tracker
|
||||
|
||||
if (tracker.getDevice() != null && id.getDeviceId().getId() == tracker.getDevice().getId()) {
|
||||
if (tracker.getDevice() != null && id.getDeviceId() != null && id.getDeviceId().getId() == tracker.getDevice().getId()) {
|
||||
// This is a physical tracker, and both device id and the tracker num match
|
||||
return tracker;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user