mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-01 14:22:34 -08:00
TrackersHID fix exception from null magStatus
This commit is contained in:
1 parent
d607614700
commit
caa146770b
1 file changed
+2
-2
+2
-2
@@ -265,8 +265,8 @@ class TrackersHID(name: String, private val trackersConsumer: Consumer<Tracker>)
|
||||
val sensorType = IMUType.getById(imu_id.toUInt())
|
||||
// only able to register magnetometer status, not magnetometer type
|
||||
val magStatus = MagnetometerStatus.getById(mag_id.toUByte())
|
||||
if (sensorType != null) {
|
||||
setUpSensor(device, trackerId, sensorType!!, TrackerStatus.OK, magStatus!!)
|
||||
if (sensorType != null && magStatus != null) {
|
||||
setUpSensor(device, trackerId, sensorType, TrackerStatus.OK, magStatus)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user