mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-27 12:26:33 -08:00
fix Unit tests
This commit is contained in:
1 parent
938f708c89
commit
d404fb5a88
2 files changed
+6
-1
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package dev.slimevr.filtering
|
||||
|
||||
import com.jme3.system.NanoTimer
|
||||
import dev.slimevr.VRServer
|
||||
import io.github.axisangles.ktmath.Quaternion
|
||||
import io.github.axisangles.ktmath.Quaternion.Companion.IDENTITY
|
||||
@@ -25,7 +26,7 @@ class QuaternionMovingAverage(
|
||||
private lateinit var rotBuffer: CircularArrayList<Quaternion>
|
||||
private var latestQuaternion = IDENTITY
|
||||
private var smoothingQuaternion = IDENTITY
|
||||
private val fpsTimer = VRServer.instance.fpsTimer
|
||||
private val fpsTimer = if (VRServer.instanceInitialized) VRServer.instance.fpsTimer else NanoTimer()
|
||||
private var frameCounter = 0
|
||||
private var lastAmt = 0f
|
||||
var filteredQuaternion = IDENTITY
|
||||
|
||||
@@ -316,6 +316,8 @@ class TrackerResetsHandler(val tracker: Tracker) {
|
||||
this.tracker.statusResetRecently = false
|
||||
this.tracker.lastResetStatus = 0u
|
||||
}
|
||||
|
||||
tracker.resetFilteringQuats()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -369,6 +371,8 @@ class TrackerResetsHandler(val tracker: Tracker) {
|
||||
|
||||
// save mounting reset
|
||||
if (saveMountingReset) tracker.saveMountingResetOrientation(mountRotFix)
|
||||
|
||||
tracker.resetFilteringQuats()
|
||||
}
|
||||
|
||||
fun clearMounting() {
|
||||
|
||||
Reference in new issue
Block a user