Hya,
for an application i'm building, i have a push button but want to trigger with long press only, to avoid and triggering by touching by mistake.
Is there a way to "disable" to short press?
Some samples for the following?
Long press event: If enabled the unit will detect a long press of a button. There’s three different behaviors of the long press:
Active only on low: this means that the unit will only be triggering the long press event if the signal is low. Two different event values are used, 10 if the state goes from 0 to 1 (Switch#State=10), and 11 if the state goes from 1 to 0 (Switch#State=11).
Active only on high: same as above but only triggered on high signal.
Active on high & low: the long press will be triggered both on high and low signals.
Thanks in advance!
Plugin 01 (Switch ) Push Button Longpress
Moderators: grovkillen, Stuntteam, TD-er
Re: Plugin 01 (Switch ) Push Button Longpress
Simply don't assign any action to it.
I say that theorically, longpress or double never worked for me so far.
I say that theorically, longpress or double never worked for me so far.
Re: Plugin 01 (Switch ) Push Button Longpress
i was confused, as the docs are mostly not very friendly. Anyway, i spent about one hour testing, digging and found out the it works like a charm....
And doubleclick also works..
Code: Select all
on PB#status do
if %eventvalue%=11 // pb#status 11 - long press and v1 = 0 -> turn ON
if %v1%=0
gpio,13,1
let,1,1
else // pb#status 11 - long press and v1 = 1 -> turn off
gpio,13,0
let,1,0
endif
endif
endon
And as i'm a very lazy dog, i memorize almost nothing, i just learn, but don't memorize syntaxes, etc... i do it and save for later reference.
Last edited by pw444 on 16 Jan 2021, 20:22, edited 2 times in total.
Re: Plugin 01 (Switch ) Push Button Longpress
Glad you managed, I'll try again and share my experience with you if you don't mind.
Talk to you soon,
Thanks.
Talk to you soon,
Thanks.
Who is online
Users browsing this forum: No registered users and 36 guests