forked from bspranger/Xiaomi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a4refillpad method to determine button "held"
Fixes • Added missing `if {}` condition brackets • Added `lastButtonMssg` attribute to send events any time the button is pressed or released • changed the time difference calculation to compare time of last `lastButtonMssg` event to current time at button release • changed default button held time preference setting to 2 seconds Button pressed vs held seems to be around 95% accurate and reliable, with a `waittoHeld` setting of 2 seconds or longer. This is as good as it's going to get as far as I can tell, because the ST hub still drops some button press/release messages and also sometimes gets them in reverse.
- Loading branch information
Showing
1 changed file
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters