-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Cirque trackpad features: circular scroll, inertial cursor #17482
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
26bbb93
cirque_pinnacle: Add timeout for potential loops
dkao 20f677f
cirque_pinnacle: recalibrate during initialization
dkao 421c2f9
cirque_pinnacle: Function to control smoothing
dkao 0f2d232
cirque_pinnacle: Convert CPI according to diameter
dkao fbee3bb
cirque pointing driver: Make tap optional
dkao 6e4a63a
cirque pointing driver: Circular scroll feature
dkao 0c35461
cirque pointing driver: Inertial cursor (glide)
dkao f873816
cirque pointing driver: formatting
dkao 7428dc1
cirque pointing driver: Adjust configuration functions
dkao 43b2f99
cirque_pinnacle: Reword comment on calibration
dkao 4d46e59
cirque_pinnacle: Import register definition header
dkao f85df63
cirque_pinnacle: Compile option for curved overlay
dkao 8344eaa
cirque_pinnacle: Adjust calibration sequence
dkao 97d1644
cirque pointing driver: Move fancy processing code
dkao de833e8
cirque pointing driver: Integer math for inch<->pixel conversion
dkao 969e612
pointing_device_gestures: Adjust cursor glide types
dkao dbe15af
pointing_device_gestures: Q8 fixed point cursor glide
dkao 516677a
cirque_pinnacle_gestures: Integer math circular scroll
dkao 7158ed6
pointing device gestures: Update comments
dkao f08d5e7
pointing device gestures: div0 checks
dkao 3ff32b0
pointing device gestures: Extract configurations to explicit struct
dkao 60da778
circular scroll: Add left-handed mode
dkao 7bf6c68
pointing device gestures: Conditional compilation
dkao 064d9e4
cirque pointing driver: Add a default triggir_px for inertial cursor
dkao e48a3d1
pointing device gestures: Style
dkao 18aa3a1
circular scroll: Use stdlib abs()
dkao 8bd6c92
cirque_pinnacle: Minor change to read-modify-write variable names
dkao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least on I2C we could use
&& touchpad_init==true
directly, as this will be set to false if there is any I2C error (or timeout). Not sure if SPI considersCIRQUE_PINNACLE_TIMEOUT
at all?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SPI doesn't have ack or check for any timeout. It will return whatever state MISO happens to be floating in, if the device is not connected. That could be either 0xFF or 0x00 (or something inbetween if there's noise on the line?).
Looking at AVR's spi_master.c for example:
spi_start()
always returns true, except if chip select pin is invalid but that's an error before ever interacting with the device. Sotouch_init
check can't really apply for SPI.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually fixed a dead lock for me that happened with the code before. I started a small refactoring of the
RAP_Read/Write
functions. If you find it useful feel free to include it in this pr cirque_timeout.patch.txtThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a side note, if a single I2C transfer fails the whole driver will turn into an invalid state - which requires a reboot of the keyboard. I can think of mechanism on the pointing device driver level that will try to re-init a driver in such a case after a certain timeout. But this is not in the scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think handling
touch_init
and I2C transaction failures adds too much to this PR, let's handle that in a separate one.