mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-29 13:22:50 -08:00
Make TPS only update on rotation
This commit is contained in:
1 parent
cc63cb45c6
commit
4bf797909b
1 file changed
+2
-2
@@ -44,8 +44,8 @@ class TrackerBasicBehaviour(private val settings: Settings) : TrackerBehaviour {
|
||||
is TrackerActions.SetStatus -> state.copy(status = action.status)
|
||||
|
||||
is TrackerActions.SetRotation -> {
|
||||
// This action counts as a tick towards TPS if the data is new.
|
||||
if (action.newData) tpsCount.incrementAndFetch()
|
||||
// This action counts as a tick towards TPS if it is new data and is new
|
||||
if (action.newData && action.rotation != null) tpsCount.incrementAndFetch()
|
||||
|
||||
// Rotation
|
||||
val rawPolarityTrackedRotation: RawRotation = action.rotation?.twinNearest(state.rawRotation) ?: state.rawRotation
|
||||
|
||||
Reference in new issue
Block a user