Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple sensors to pmw3360 #15996

Merged
merged 1 commit into from
Apr 19, 2022
Merged

Add support for multiple sensors to pmw3360 #15996

merged 1 commit into from
Apr 19, 2022

Conversation

uqs
Copy link

@uqs uqs commented Jan 22, 2022

Description

  • remove unneeded start/stops during the init phase and do only what the
    data sheet says (more or less). This saves about 50 bytes.
  • tested on 2 random pmw3360 sensors and a Ploopy mouse
  • reorder some functions so we don't need to expose them in the header
  • add an index argument, so that the functions can work on different
    pins
  • this adds about 110 bytes again :/
  • provide documentation updates on how to use and merge the reports

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Copy link
Member

@drashna drashna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't appear to break anything.

@drashna drashna requested a review from a team January 24, 2022 17:59
@uqs
Copy link
Author

uqs commented Jan 26, 2022

You might want to wait for support for different angles as well. It's easy enough to add, but I'm looking for ways to save on space as well. It might end up as an ifdef fest.

It's also not sure if this feature will ever see use outside of my build...

@uqs
Copy link
Author

uqs commented Jan 28, 2022

Two sensors, one ball would also allow you to detect twisting around the z-axis (my Kensington SlimBlade does that to trigger scrolling). But dragscroll might be more useful overall.

- remove unneeded start/stops during the init phase and do only what the
  data sheet says (more or less). This saves about 50 bytes.
- tested on 2 random pmw3360 sensors and a Ploopy mouse
- reorder some functions so we don't need to expose them in the header
- add an index argument, so that the functions can work on different
  pins
- this adds about 110 bytes again :/
- provide documentation updates on how to use and merge the reports
@stale
Copy link

stale bot commented Apr 16, 2022

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@uqs
Copy link
Author

uqs commented Apr 19, 2022

anti-staleness ping?

@stale stale bot removed the awaiting changes label Apr 19, 2022
@tzarc tzarc merged commit 690dc4b into qmk:develop Apr 19, 2022
0xcharly pushed a commit to Bastardkb/bastardkb-qmk that referenced this pull request Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants