Tuio.js icon indicating copy to clipboard operation
Tuio.js copied to clipboard

TypeId, UserId improperly set

Open nomve opened this issue 10 years ago • 2 comments

Check if they are always properly set.

nomve avatar Mar 10 '16 12:03 nomve

TypeId and UserId are swapped: the protocol specifies that "the first two bytes of the type/user attribute are therefore encoding the User ID, while the second half of the attribute encode the actual Type ID resulting in two 16bit unsigned integer values."

In TuioComponent.js - setTypeUserId, change

        this.typeId = bufferView.getUint16(0);
        this.userId = bufferView.getUint16(2);

to

        this.typeId = bufferView.getUint16(2);
        this.userId = bufferView.getUint16(0);

mblinsitu avatar Mar 18 '16 16:03 mblinsitu

Thanks. There are I think other issues with it, but I didn't have time to check it out. In general, I developed this for something else, where in the end I didn't use Tuio2. I actually never had a device with Tuio2 and it was never tested with anything real, just with the simulator.

I hope to have the things that are supposed be implemented bug-free at one point, but I'm not sure what the long term status of this project is.

nomve avatar Mar 18 '16 18:03 nomve