Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@averycblack
Copy link
Contributor

@averycblack averycblack commented Apr 17, 2024

I was parsing the MT2 output for some other projects and came across a new finger ID. This seems to only be sent when the touchpad detects a palm. This seems to map well to the confidence bit sent by Precision/HID touchpads, and allow for rejecting contacts based off of size relatively easily.

This does break every satellite since the Transducer class is modified, so some caution is needed before trying to merge this in.

Companion ELAN implementation:
averycblack/VoodooI2CELAN#1

Companion HID implementation:
averycblack/VoodooI2CHID#1

@kprinssu
Copy link
Collaborator

I think we can preserve backwards compatibility by moving the field to the end of the struct.

This should ensure that memory wise, the first N bytes will hold the existing transducer data.

@averycblack
Copy link
Contributor Author

averycblack commented Apr 20, 2024

Ah that would solve it. We should probably have it default to a value of 1 as well so that everything isn't read in as a palm - what is the best way to do that?

Edit: oh would there be any worries about out of bound reads if we did just add it to the end?

@kprinssu
Copy link
Collaborator

Ah that would solve it. We should probably have it default to a value of 1 as well so that everything isn't read in as a palm - what is the best way to do that?

Edit: oh would there be any worries about out of bound reads if we did just add it to the end?

That would indeed cause out of bound reads. Another option is to make the change and tell people to update their satellite lets.

IMO, this has been the case for a while and I don't see any issue with us changing the class.

@averycblack
Copy link
Contributor Author

That would indeed cause out of bound reads. Another option is to make the change and tell people to update their satellite lets.

IMO, this has been the case for a while and I don't see any issue with us changing the class.

Looking around, I think that is a safe assumption that can be made. The satellites compiled as part of VoodooI2C are the only ones to use this class. VoodooRMI and AlpsHID do not use the VoodooI2C transducer, instead interacting directly with VoodooInput.

I think this PR is good to go as well as the Elans PR.
The HID PR should be good to go for precision touchpads, although I want to try using width/height to reject contacts on touchscreens before I undraft it.

@averycblack averycblack marked this pull request as ready for review April 25, 2024 00:54
@kprinssu
Copy link
Collaborator

Thanks @1Revenger1. I'll merge these in when I get the chance to fix the pipelines.

@averycblack
Copy link
Contributor Author

No worries. If anyone wants to give these a shot, I've got a download here with VoodooI2C, VoodooI2CHID, and VoodooI2CELAN.
Archive.zip

@Goshin
Copy link
Contributor

Goshin commented Apr 25, 2024

Hi, there.

Since it is related to MT2 simulating, would it be better to add the palm type in MT2FingerType definition of VoodooInput? Besides better readability, other drivers using VoodooInput could also benefit from this type for palm rejection.

https://github.com/acidanthera/VoodooInput/blob/8e36453623155df94b930fb24c8d22e10f73dd1b/VoodooInput/VoodooInputMultitouch/VoodooInputTransducer.h#L13

@averycblack
Copy link
Contributor Author

Probably should yeah. I can add it later tonight.
I wonder how much of the palm rejection stuff we could move into VoodooInput. We should really be forwarding everything to macOS even when typing, so I don't see a reason why every driver should need to do keyboard quiet time or whatever by itself.

@kprinssu
Copy link
Collaborator

kprinssu commented Apr 25, 2024

Probably should yeah. I can add it later tonight. I wonder how much of the palm rejection stuff we could move into VoodooInput. We should really be forwarding everything to macOS even when typing, so I don't see a reason why every driver should need to do keyboard quiet time or whatever by itself.

It was a hack from when Rehanman was maintaining VoodooPS2 (so about 6-7 years back). IPC in kernel-space is tough so abusing the quiet time field to receive notifications from the keyboard driver made a lot of sense.

@averycblack
Copy link
Contributor Author

It was a hack from when Rehanman was maintaining VoodooPS2 (so about 6-7 years back). IPC in kernel-space is tough so abusing the quiet time field to receive notifications from the keyboard driver made a lot of sense.

Yeah, and we haven't really had a reason to forward invalid things to macOS before this since macOS would have treated it as valid data. I'm not faulting anyone here, palm rejection is just a pain in general haha.

@averycblack
Copy link
Contributor Author

I opened the VoodooI2CHID PR and merged in the new finger type into VoodooInput, so everything should be good to go.

@LeeBinder
Copy link

LeeBinder commented May 8, 2024

No worries. If anyone wants to give these a shot, I've got a download here with VoodooI2C, VoodooI2CHID, and VoodooI2CELAN. Archive.zip

@1Revenger1 thank you - working fine in Monterey and Sonoma in my Asus Vivobook S15 with an ELAN1200 (VID 0x4f3 | PID 0x303e)

@averycblack averycblack changed the base branch from master to 2.9 November 3, 2024 21:29
@kprinssu kprinssu merged commit 3d431f8 into VoodooI2C:2.9 Nov 4, 2024
3 checks passed
@averycblack averycblack deleted the palm-reject branch November 4, 2024 19:18
kprinssu added a commit that referenced this pull request Nov 5, 2024
* Sync VoodooGPIO with AMD support

* Update VoodooGPIO and VoodooI2CHID

* Github Actions CI workflow (#538)

* Create objective-c-xcode.yml

* Update objective-c-xcode.yml

* objective-c-xcode.yml: Update setup tools to fix pyparsing

* objective-c-xcode.yml: try fixing pyparsing directly

* objective-c-xcode.yml: use my fixed cldoc

* objective-c-xcode.yml: manually updating pyparsing was always useless

* Clean up CI/CD (#553)

* Drop CircleCI

* Switch back to VoodooI2C cldoc fork

* Set the pip3 --break-system-packages flag to potentially fix CD/CD

* Run actions on all PRs and branches

* Remove cldoc step

* GitHub Action (#561)

* Create main.yml

* Remove Pip Cache

* Fix Lint in VoodooI2CController.cpp

* Fix VoodooI2CControllerDriver Lint

* Try cursorkind=350

* Only allow one job

* Add separate lint and doc tasks, add archive script

* Fix generate description output, missing dependencies

* Use -r in pip install

* build_docs -> build_doc

* Build VoodooInput for docs

* Release try two

* Test commit

* Test commit 2

* Fix num commits and last_ten_commits

* Set number of max commits

* Fetch tags

* Get tags try 2

* Fix git fetch

* Revert back to using the published trigger

* Save off last tagged commit

* I forgot to save the conflict resolution :(

* Fix VoodooI2CHID submodule commit

* Update to latest master for VoodooI2CHID

* Update cldoc to clang 15

* Update cldoc to VoodooI2C master

* Fix NUM_COMMITS

* Echo release notes

* Make sure to output to

* Account for multiline output

* checkout depth 500

* Multi-line input for release action

* Use softprops release action

* Use file to store changelog

* Upload docs to github pages

* Fix repository name match

* Fix upload always running (oops)

* Add confidence bit for palm rejection (#547)

* Add confidence bit for palm rejection

* Set Confidence bit by default

* Remove logging

* Use constant for palm type

* Update Cldoc repo git link (#562)

* Sync satellites and dependencies

* Update GitHub actions from v3 to v4

* Remove unused extra GitHub pipeline

* Only run push builds when commits are pushed to master

---------

Co-authored-by: Kishor Prins <[email protected]>
Co-authored-by: newperson1746 <[email protected]>
Co-authored-by: Avery Black <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants