purejavahidapi icon indicating copy to clipboard operation
purejavahidapi copied to clipboard

Data Received Twice

Open MichaelBMiner opened this issue 6 years ago • 3 comments

When data is received onInputReport is called twice. onInputReport also returns the last requested data instead of newly requested data.

MichaelBMiner avatar Apr 18 '18 19:04 MichaelBMiner

I fixed it, see https://github.com/nyholku/purejavahidapi/pull/59

openconcerto avatar Sep 01 '18 20:09 openconcerto

On 1 Sep 2018, at 23.26, openconcerto [email protected] wrote:

I fixed it, see #59

Sounds good, can you elaborate a bit what was the actual problem and why this fixes it?

Looking at the patch I guess that autosync indeed can cause problems as the structure is updated 'outside' of the normal JNA call/return but it would nice to have a more detailed explanation before I merge this.

wbr Kusti

nyholku avatar Sep 02 '18 04:09 nyholku

If you don't want to autosync you can add readField calls in order to sync manually. I don't see issues on this particular case.

From MS doc, the status code for the I/O request is exposed in the Internal field. It has to be checked, and what I did.

openconcerto avatar Sep 04 '18 12:09 openconcerto