trackball icon indicating copy to clipboard operation
trackball copied to clipboard

My Mods

Open JPJrunesJPJ opened this issue 4 years ago • 3 comments

-Added support for PMW3389. -Added #define option for new feature: adjust CPI if holding down MB 3 while scrolling. Buzzer pitch changes as feedback of CPI setting. -Added #define option for choice of whether position locks when scrolling or not. -various changes to default code (different pin for buzzer, MB 4 and MB 5 included in USB HID report).

JPJrunesJPJ avatar Sep 12 '21 18:09 JPJrunesJPJ

Hello sir,

I've finally gotten around to publishing my additions/changes. I hope this is useful to the progression of this open source project, but would not be offended if you do not wish to use it!

JPJrunesJPJ avatar Sep 12 '21 18:09 JPJrunesJPJ

Thanks for the PR! I'd like to incorporate the changes for PMW3389 support, but I think I'd prefer to let you keep the other changes on your own fork. Would you be okay with me doing a selective merge?

monroewilliams avatar Feb 14 '22 04:02 monroewilliams

Hello,

please feel free to use whatever portion of this that you wish!

JPJrunesJPJ avatar May 09 '22 00:05 JPJrunesJPJ

Sorry for the delay, but I finally got back around to this.

I've extracted the changes to support the PMW3389 and brought them into the master branch in this commit:

https://github.com/monroewilliams/trackball/commit/796cd4abf87c98758ad312eebb346728e1e210f1

The logic in adns::updateCPI() didn't feel to me like it really belonged in the adns class, as it's more specific to the trackball logic. Instead of bringing it in, I made the adns class internals it uses public so that updateCPI() could be implemented in the main trackball.cpp file.

I also realized that the code which sets the sensor's cpi was completely wrong and needed to work differently for each sensor model, which I fixed in a subsequent commit:

https://github.com/monroewilliams/trackball/commit/59a80fb8af21c99d83cdfe2f6232629911fb663d

Since it was incorrect before (and wasn't actually setting the requested cpi in the sensor), I had to adjust the reported CPI I'm requesting to get equivalent behavior. I haven't been able to test the pmw3389 codepath (since I don't actually have one of those) so if you pull this update please let me know if it seems to work correctly.

Thanks for the contribution!

monroewilliams avatar Oct 03 '22 02:10 monroewilliams