ViveInputUtility-Unity icon indicating copy to clipboard operation
ViveInputUtility-Unity copied to clipboard

Need more flexible binding mechanism

Open bradpinhtc opened this issue 7 years ago • 2 comments

I bound four devices (i.e. A, B, C, D) to HandRole.RightHand, HandRole.LeftHand, BodyRole.RightFoot, BodyRole.LeftFoot. Now, I want to temporarily replace device A & B with E & F using the same binding config file, and E & F won't be detected!!(Controller A & B are turned off, C & D are turned on) I hope the binding not so restrict, especially when there is no bound devices, it should be more convenient to allow me bind other devices onto these role automatically.

bradpinhtc avatar Mar 29 '17 03:03 bradpinhtc

This can be fulfilled. But need some advise to make sure this is better.

According to current mapping logic, role status can list down in following table:

Role status Mapping device index Binding device SN Bound device connected
[1] not mapped and not bound X X -
[2] mapped but not bound O X -
[3] not mapped but bound X O X
[4] mapping the bound device O O O

So when getting device index from role map for a bound role, we guarantee the device is the bound device. (See the mapping limitation)

And the request is like adding status [5]:

Role status Mapping device index Binding device SN Bound device connected
[1] not mapped and not bound X X -
[2] mapped but not bound O X -
[3] not mapped but bound X O X
[4] mapping the bound device O O O
[5] not mapping the bound device O O X

That means the bound role won't guarantee to be the bound device, could be other device (depends on its role map handler). This will complex the auto-mapping algorithm because more cases have to handle.

lawwong avatar Apr 11 '17 13:04 lawwong

conld tell me, what's you stiry!

CGDriverLi avatar Feb 21 '18 07:02 CGDriverLi