Skip to content

Conversation

@ayavilevich
Copy link
Contributor

A different implementation of an "absolute mouse" that works with Android devices.
In response to #63

@arpruss , you are welcome to merge this as a whole or just parts to the main library if you want.

@arpruss
Copy link
Owner

arpruss commented May 11, 2020

Would it work any worse if we made the range 0-16383 or 0-4095? That would make it easier to convert data from other sources.

@ayavilevich
Copy link
Contributor Author

@arpruss I don't know. I believe this descriptor was based on a descriptor of some actual hardware. If you want to send me some alternate bytes I can try them out and see if it still works. I don't have the experience to modify the descriptor myself.

What other sources are you talking about? As far as I see, the range needs to be mapped to the screen resolution of the main display of the host device. Mapping will vary with each different host device.

@arpruss arpruss merged commit 1b1791f into arpruss:master May 13, 2020
@arpruss
Copy link
Owner

arpruss commented May 13, 2020

By sources I mean things like a potentiometer or touch screen device that generate the digitizer data.

I changed the range to 16383, and added an example.

I am not sure dragging works on Windows but it does work on Android.

@ayavilevich
Copy link
Contributor Author

Ok, got it about external devices like a potentiometer.

Thanks for merging and completing the changes. Glad to contribute to this lib which is useful to me.
Some of the changes you made broke the functionality. I have added a comment in the relevant commit.

@arpruss
Copy link
Owner

arpruss commented May 13, 2020

Sorry about that. I changed the range to 4K, which fits the ADC range of the device well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants