SunjunKim / PMW3360

PixArt PMW3360 Motion Sensor Library for Arduino
43 stars 20 forks source link

LSB MSB merging wrong #8

Open dblatt87 opened 1 week ago

dblatt87 commented 1 week ago

I'm using this with an PMW3366, it tells "initialization failed" due to signature check but still works after that, just didn't got negative values.

Had to change the LSB MSB merging @line 450 in PMW3360.cpp to "(int16_t)((xh << 8) | xl)" that it correctly deal with negative values.

dblatt87 commented 1 week ago

And signature check can also be generalizes by "return (pid | iv_pid == 0xFF);" in line 593 ;)