Hi,
Below is a suggestion on how to make multi-tap better. It would apply to the dimmer, switch, and anything with a button.
We all know that the 700 msec delay is not ideal. Need proof? There is an option to remove it. Why? Because waiting almost a second before a switch does anything is not perfect. Fine, turn on the “instant on” you say. But now you lose the 2,3,4,5 tap controls. Can we have it both ways? Can we have the feeling of “lights turn on right away” and also the “multi-tap”? I think yes.
Let’s create a configurable variable called “tapTimeout”, and let’s set it to something smallish: 150 msec likely would work.
Have a variable called “tapCount” and set it to 0.
When a button tap happens, do
-
stop the timer that was started 2 lines below
-
increment “tapCount”
-
start a timer for “tapTimeout”.
When the timer for “tapTimeout” expires, then “tapCount” will tell you how many taps happened. And you will “act” on a tap quickly.
If you need to tap 5 times, you will get long enough. If you only need to tap once, then you wait only a short amount of time.
A little tuning will find the value for “tapTimeout” that is factory default, and this value is user configurable.
Thoughts?
Kirk