Re: [PATCH libinput] debounce: handle a timeout in MAYBE_SPURIOUS state

2017-11-28 Thread Vicente Bergas
ion to MAYBE_SPURIOUS where the long timeout may expire. In that case we should transition to pressed state again. Reported-by: Vicente Bergas Signed-off-by: Peter Hutterer --- doc/button-debouncing-state-machine.svg | 369 +++- src/evdev-debounc

Re: [PATCH libinput 1/1] Fix debouncing algorithm

2017-11-20 Thread Vicente Bergas
On Monday, November 20, 2017 3:54:44 AM CET, Peter Hutterer wrote: On Sun, Nov 19, 2017 at 08:45:16PM +0100, Vicente Bergas wrote: On Thursday, November 16, 2017 2:29:05 AM CET, Peter Hutterer wrote: On Wed, Nov 15, 2017 at 09:31:07PM +0100, Vicente Bergas wrote: ... Hi Peter, ba9e6012a52b

Re: [PATCH libinput 1/1] Fix debouncing algorithm

2017-11-19 Thread Vicente Bergas
On Thursday, November 16, 2017 2:29:05 AM CET, Peter Hutterer wrote: On Wed, Nov 15, 2017 at 09:31:07PM +0100, Vicente Bergas wrote: On Wed, Nov 15, 2017 at 1:38 AM, Peter Hutterer wrote: ... I'd appreciate it if you could give it a test though. Cheers, Peter Hi Peter, just t

Re: [PATCH libinput 1/1] Fix debouncing algorithm

2017-11-15 Thread Vicente Bergas
On Wed, Nov 15, 2017 at 1:38 AM, Peter Hutterer wrote: > ... I'd appreciate it if you could give it a test > though. > > Cheers, >Peter Hi Peter, just tested 4aa25b9de96321d946ed399b614d52deadf74403 (tip of your debouncing branch on github), it failed on the very first click: [ 1910.895] (EE

Re: [PATCH libinput 1/1] Fix debouncing algorithm

2017-11-14 Thread Vicente Bergas
Hi Peter, (sorry, sent twice, first time I forgot to "reply-all") On Tue, Nov 14, 2017 at 5:22 AM, Peter Hutterer wrote: > ... >> -#define DEBOUNCE_TIME ms2us(12) >> +#define DEBOUNCE_TIME ms2us(25) > > 25ms is quite risky for the original algorithm, it's possible to > press/release e

[PATCH libinput v3 0/1] Fix debouncing algorithm

2017-11-11 Thread Vicente Bergas
On Wed, 8 Nov 2017 21:19:04 +1000, Peter Hutterer wrote: >On Tue, Nov 07, 2017 at 10:26:11PM +0100, Vicente Bergas wrote: >>Hi Peter, >> >>On Thu, Nov 2, 2017 at 2:04 AM, Peter Hutterer >>wrote: >>> On Thu, Nov 02, 2017 at 12:34:01AM +0100, Vicente Bergas

[PATCH libinput v3 1/1] Fix debouncing algorithm

2017-11-11 Thread Vicente Bergas
value, that is 20 clicks per second! Signed-off-by: Vicente Bergas --- doc/button_debouncing.dox | 16 ++-- src/evdev-fallback.c | 180 +-- src/evdev.h | 19 test/litest.c | 2 +- test/litest.h | 4 +- test/test

Re: [PATCH libinput 0/1] Fix debouncing algorithm

2017-11-07 Thread Vicente Bergas
Hi Peter, On Thu, Nov 2, 2017 at 2:04 AM, Peter Hutterer wrote: > On Thu, Nov 02, 2017 at 12:34:01AM +0100, Vicente Bergas wrote: ... >> I hope it is fixed, but not been able to run the test-suite. >> Please, can you confirm if the new test-suite passes? > > running the full

[PATCH libinput 0/1] Fix debouncing algorithm

2017-11-01 Thread Vicente Bergas
Hi Peter, >Hi Vicente > >sorry about the delay, too many things on right now. Thank you for taking the time to review the patch. >... >Note: the current algorithm does ignore spurious actions, at least after the >very first one. AIUI it's not that uncommon either when the contacts are >wobbly. S

[PATCH libinput 1/1] Fix debouncing algorithm

2017-11-01 Thread Vicente Bergas
value, that is 20 clicks per second! Signed-off-by: Vicente Bergas --- doc/button_debouncing.dox | 16 +++-- src/evdev-fallback.c | 175 +- src/evdev.h | 19 - test/litest.c | 2 +- test/test-pointer.c | 33

[PATCH] Fix debouncing algorithm

2017-10-31 Thread Vicente Bergas
that the noisy period after a button toggle can vary from 8ms to almost 30ms, the mean value at around 20ms. Although those numbers come from one single sample mouse, 25ms seems a reasonable value, that is 20 clicks per second! Signed-off-by: Vicente Bergas --- src/evdev-fallback.c | 149

[PATCH libinput] Fix debouncing algorithm

2017-10-25 Thread Vicente Bergas
DEBOUNCE_AFTER as configurable parameters, but that is not part of this patch. Signed-off-by: Vicente Bergas --- src/evdev-fallback.c | 158 +++ src/evdev.h | 19 --- 2 files changed, 45 insertions(+), 132 deletions(-) diff --git a/src/evdev