mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-26 03:46:28 -08:00
Filter out non-imu trackers from tap detection
This commit is contained in:
1 parent
e17c8c6ee0
commit
2b5f3a12e1
1 file changed
+4
-1
@@ -95,7 +95,10 @@ class TapDetectionBasicBehaviour : TapDetectionBehaviour {
|
||||
// Tracker state emits on every rotation packet, but only bodyPart/status matter here.
|
||||
// Dedup per tracker first, or combine gets resumed once per packet per tracker.
|
||||
combine(
|
||||
trackers.map { tracker ->
|
||||
trackers.filter {
|
||||
// Only run tap detection for IMU trackers
|
||||
it.context.state.value.imuType != null
|
||||
}.map { tracker ->
|
||||
tracker.context.state.distinctUntilChanged { a, b -> a.bodyPart == b.bodyPart && a.status == b.status }
|
||||
},
|
||||
) { states ->
|
||||
|
||||
Reference in new issue
Block a user