mooltipass / minible

Github repository containing the firmwares running on the Mooltipass Mini BLE
GNU General Public License v3.0
94 stars 20 forks source link

Add debounce to push button #401

Open lwYeo opened 1 year ago

lwYeo commented 1 year ago

Missing feature

Debouncing does not seem to be present when pressing down the button. Maybe adding around 100ms would be nice.

Justification

Sometimes the button "double-clicked" by itself, occurrence seem to be 1 in 10 or less (at least on my device). Although it does not seem much, but it is rather annoying when it happens, especially when entering the last digit pin, causing unwanted "invalid pin" incidents.

limpkin commented 1 year ago

there's actually already a debounce: https://github.com/mooltipass/minible/blob/master/source_code/main_mcu/src/INPUTS/inputs.c#L275, set to 100ms

lwYeo commented 1 year ago

there's actually already a debounce: https://github.com/mooltipass/minible/blob/master/source_code/main_mcu/src/INPUTS/inputs.c#L275, set to 100ms

Nice. Since different unit may have different tolerances, would it be better if we can customise it? If not can we increase to maybe 150ms-200ms, to reduce this issue further?

limpkin commented 1 year ago

that's indeed a great idea!

My1 commented 1 year ago

might this be the same reason why i sometimes dont get a wheel move when moving quickly through the numbers when trying to enter my pin?

limpkin commented 1 year ago

not exactly no

CGuy-1 commented 1 year ago

I have this issue with my early unit, it seems the scroll wheel starts to do this after lots of use. This will just get worse and worse until the wheel stops working. I've replaced this unit with a new one that I think has a better scroll wheel installed. The new one doesn't exhibit any issues but it's only been 6 months.

limpkin commented 1 year ago

Hello, are you saying you aren't able to click anymore?

seviu commented 1 year ago

I got same problem

limpkin commented 1 year ago

@seviu : can you expand on your symptoms? :)

CGuy-1 commented 1 year ago

@limpkin I can click but it will sometimes scroll at the same time. Just touching the scroll wheel lightly will sometimes make it scroll very quickly in one direction or the other. If I push down on the scroll wheel while clicking it works much better. This leads me to think the issue is hardware, the scroll wheel has failed and the contacts and/or wheel are lose. I have a very early unit and I use it all the time so perhaps the scroll wheel part isn't robust enough.

limpkin commented 10 months ago

@CGuy-1 is this still happening? I could offer a device swap...

CGuy-1 commented 10 months ago

Yes, I suspect the scroll wheel contacts are broken or worn out. This is an early unit and I use it all the time so it may just need a new scroll wheel component. The battery doesn't hold a charge any more (and yes I've run the refresh several times), is it possible to replace it?

limpkin commented 10 months ago

send me a quick email, we'll work something out :)