mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-24 02:51:20 -08:00
33 lines
580 B
Java
33 lines
580 B
Java
package dev.slimevr.vr.trackers;
|
|
|
|
public enum TrackerStatus {
|
|
|
|
DISCONNECTED(0, false),
|
|
OK(1, true),
|
|
BUSY(2, true),
|
|
ERROR(3, false),
|
|
OCCLUDED(4, false),
|
|
;
|
|
|
|
private static final TrackerStatus byId[] = new TrackerStatus[5];
|
|
|
|
public final int id;
|
|
public final boolean sendData;
|
|
|
|
private TrackerStatus(int id, boolean sendData) {
|
|
this.sendData = sendData;
|
|
this.id = id;
|
|
}
|
|
|
|
public static TrackerStatus getById(int id) {
|
|
if(id < 0 || id >= byId.length)
|
|
return null;
|
|
return byId[id];
|
|
}
|
|
|
|
static {
|
|
for(TrackerStatus st : values())
|
|
byId[st.id] = st;
|
|
}
|
|
}
|