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

Rework and expand Pointing Device support #14343

Merged
merged 92 commits into from
Nov 15, 2021

Conversation

drashna
Copy link
Member

@drashna drashna commented Sep 7, 2021

Description

Give pointing device support some much needed love.

This adds a "driver" value for pointing device feature, so you can quickly and simply add support for a sensor to act as pointing device by specifying the sensor type.
Additionally, it adds more robust user callbacks to help with these changes.
It also generalizes the sensor code, so that they don't have pointing device specific code, and can be used for other purposes (such as with HID joystick).

Types of Changes

  • Core
  • New feature
  • Enhancement/optimization
  • Keyboard (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).

@drashna drashna marked this pull request as draft September 7, 2021 15:46
@drashna drashna force-pushed the core/pointing_drivers branch from 1abbffc to 9ebbf9b Compare September 9, 2021 00:17
@drashna drashna requested a review from a team September 9, 2021 19:14
@drashna drashna force-pushed the core/pointing_drivers branch 2 times, most recently from 2f34a29 to 67ed15f Compare September 20, 2021 07:39
@drashna drashna force-pushed the core/pointing_drivers branch from 84fa543 to 9076e6a Compare September 20, 2021 08:56
@drashna drashna marked this pull request as ready for review September 21, 2021 01:18
@drashna
Copy link
Member Author

drashna commented Sep 22, 2021

@daskygit added timeout check for debug printing, so it shouldn't be too bad now. And preprocessor statements to remove the code, if console isn't enabled.

@drashna drashna force-pushed the core/pointing_drivers branch 2 times, most recently from 5f04eea to b1b7538 Compare September 29, 2021 02:58
@drashna
Copy link
Member Author

drashna commented Sep 29, 2021

@atulloh wanted to update the oddball to include the changes here. If you wouldn't mind confirming they don't break anything? I don't have a working adns9800 sensor ATM, so I can't verify, but the pmw3360 sensor does appear to work properly.

@atulloh
Copy link
Contributor

atulloh commented Sep 29, 2021

@atulloh wanted to update the oddball to include the changes here. If you wouldn't mind confirming they don't break anything? I don't have a working adns9800 sensor ATM, so I can't verify, but the pmw3360 sensor does appear to work properly.

@drashna Sure, I'll dig out that boards over the weekend and see if it's all good. Nice to see all this consolidated 👍

@drashna
Copy link
Member Author

drashna commented Sep 29, 2021

@atulloh wanted to update the oddball to include the changes here. If you wouldn't mind confirming they don't break anything? I don't have a working adns9800 sensor ATM, so I can't verify, but the pmw3360 sensor does appear to work properly.

@drashna Sure, I'll dig out that boards over the weekend and see if it's all good. Nice to see all this consolidated 👍

Awesome!

And yeah, more boards are getting sensors, so it's been on my mind for a while now.

Wanted to make it dead easy to add support for people, since otherwise it will be a lot of copy-paste that gets fragmented, etc.

@drashna drashna force-pushed the core/pointing_drivers branch 6 times, most recently from b4b22b5 to 0c99eea Compare October 6, 2021 17:09
@drashna drashna force-pushed the core/pointing_drivers branch from 0c99eea to 73cd3fd Compare October 7, 2021 21:34
@drashna
Copy link
Member Author

drashna commented Oct 7, 2021

@atulloh Have you had a chance to test this out?

@drashna drashna force-pushed the core/pointing_drivers branch from 88edb46 to d05869d Compare November 15, 2021 05:49
@drashna drashna merged commit 56e3f06 into qmk:develop Nov 15, 2021
@drashna drashna deleted the core/pointing_drivers branch November 15, 2021 06:03
cadusk pushed a commit to cadusk/qmk_firmware that referenced this pull request Dec 2, 2021
* qmk/develop: (32 commits)
  [Keyboard] Add macro3 PCB support (qmk#15131)
  [Keyboard] Add layout options, hotswap version to portal 66 (qmk#14719)
  [Keyboard] Add Bourgeau 75% PCB (qmk#15072)
  [Keyboard] Fix bandominedoni via keymap compilation (qmk#15171)
  Fix additional board sizes for RGB Matrix (qmk#15170)
  kb_elmo/m0116_usb: Fix Configurator Key Sequence (qmk#15147)
  Require explicit enabling of RGB Matrix modes (qmk#15018)
  Reimplements WPM feature to be smaller & precise (qmk#13902)
  Add support for deferred executors. (qmk#14859)
  Add needed include to pointing_device.c (qmk#15167)
  Fix uart function prototypes (qmk#15162)
  Rework and expand Pointing Device support (qmk#14343)
  Partially reinstate CI formatting process (qmk#15155)
  kb_elmo/elmopad: fix macro reference in info.json (qmk#15142)
  kb_elmo/m0110a_usb: Fix Configurator Key Sequence (qmk#15143)
  Update UART driver API (qmk#14839)
  Fix hebrew emoji in langs.md (qmk#15140)
  [Keyboard] Add space between Cradio info.json layout (qmk#15127)
  add wait to unicode for win (qmk#15061)
  [Docs] Correct logic of tap hold statement (qmk#14992)
  ...
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.

4 participants