Filter out non-imu trackers from tap detection

This commit is contained in:
Erimel committed 2026-11-04 16:20:08 -05:00
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 ->