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

Press and Release event passed only at finger remove #10

Closed
DDAAXX opened this issue Oct 9, 2012 · 6 comments
Closed

Press and Release event passed only at finger remove #10

DDAAXX opened this issue Oct 9, 2012 · 6 comments

Comments

@DDAAXX
Copy link

DDAAXX commented Oct 9, 2012

Hi,
I'm using a capacitive touchscreen with Atmel Maxtouch driver (atmel_mxt_ts.c).
It uses raw_input.
When I press the screen and wait, I have no event emitted by tslib.
When I remove my finger, I have at the same time the press and the release events.
If I test with ts_test, I see:

854.560940: 226 270 49
856.515562: 226 270 0

So it seems that the timestamps are correct (2 seconds from the first and the second event).
Where I can check to find why tslib wait for the release event before to send the press?

Thanks a lot
Dario

@aahong
Copy link

aahong commented Oct 14, 2012

Yes, I got this problem is a IR touchscreen also, I think problem is caused by variance delta, it may view first press as noise and delay send the event.

It works normal if I comment out variance delta.

module pthres pmin=1
#module variance delta=30
module dejitter delta=100
module linear

I do not view tslib's code to find out how to fix this bug, please help.

@DDAAXX
Copy link
Author

DDAAXX commented Oct 15, 2012

Thanks for your hint!
I tried and it is correct, without variance it works, so I think the problem is in the variance module.
If I'll find time I'll check inside the code...

@phishstang65
Copy link

Hey Guys, I am seeing this as well with the Atmel MXT Touchscreen driver. Have you guys figured out any bug with the variance delta or how to fix it without totally dropping the module? Thanks!

@robgreger
Copy link
Contributor

Based upon the first post, the controller may only be reporting once when the screen is pressed and once when the screen is released. If that is the case, then the touch controller is doing a great job filtering noise and the variance filter isn't necessary. The dejitter filter might also be unnecessary.

Having said that, the variance filter could be rewritten to pass through the first touch event if sample size is one since no more data is forthcoming. If sample size > 1 then filter the data as usual.

merge added a commit that referenced this issue Nov 16, 2016
The first sample of a touch gesture (after pressure was 0) should be
passed on immediately. Many touch devices only serve one sample when
touching the device without moving. We can't lose that sample.

This wasn't much of a problem with resistive touchscreens that continously
serve input events. Recent devices don't do that anymore.

The variance filter does it's work as soon as 2 samples are seen. It
doesn't make sense earlier anyways.

Fixes Issue #10
@merge
Copy link
Member

merge commented Nov 16, 2016

I tested this on a capacitive touchscreen too. Fixed in master now, so it'll be in tslib 1.2. If one of you could test again, this would be awesome, but I know it's been a long time. Anyways, I'll keep this open for a few days.

@merge
Copy link
Member

merge commented Nov 18, 2016

Closed. In case of problems, I'm happy to see a new bug report against master or 1.2. thanks

@merge merge closed this as completed Nov 18, 2016
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

No branches or pull requests

5 participants