This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Number of "Pulses" Detection
#4
Hi again,

Based on the proposed solution
(https://forum.logicmachine.net/showthrea...d=74#pid74)

and thread:
https://forum.logicmachine.net/showthrea...4#pid15204

I have made a edje detection group of scripts which I attach.

'Resident (edje detection).lua' detects and counts pulses. When new pulse is present, a timer is created with help of 'common function.lua' and a corresponding 'timer off' is triggered with help of 'Resident Timer Off.lua' script. In the meanwhile new pulses are counted. At the timeout of timer the 'Typical Event Script.lua' is triggered with value of counter at that time and thus the proper action is executed.

The scripts work really well and detect concurrent pulses from different G.A. Also, when long pressing a button you don' t have to release it in order to execute the action. In addition you can set different timeout for each G.A.

However the issue I have is that it takes more than a second to apply action.
The scripts work only then setting 'Resident Timer Off.lua' with sleep time 1sec. So, I guess that this is the reason for longer delay. If I set 0 it does not work properly.

So, question is:
- Is it possible to set multiple resident scripts with sleep time 0 and if yes what is the reason for improper function in my case.
- Is there any way to reduce edge detection and corresponding actions to fractions of 1 sec.
- Is it possible to dublicate 'Resident (edje detection).lua' and run in parallel in order to organize the edge detections (lights and scenes).

Thanks in advance!

.lua   Resident (edje detection).lua (Size: 2.43 KB / Downloads: 6)


.lua   Common Function.lua (Size: 281 bytes / Downloads: 7)


.lua   Resident Timer Off.lua (Size: 569 bytes / Downloads: 10)


.lua   Typical Event Script.lua (Size: 612 bytes / Downloads: 9)
Reply


Messages In This Thread
Number of "Pulses" Detection - by p_xatzi - 04.10.2021, 11:06
RE: Number of "Pulses" Detection - by Daniel - 04.10.2021, 11:17
RE: Number of "Pulses" Detection - by p_xatzi - 04.10.2021, 14:15
RE: Number of "Pulses" Detection - by p_xatzi - 25.10.2021, 11:12
RE: Number of "Pulses" Detection - by admin - 25.10.2021, 11:35
RE: Number of "Pulses" Detection - by admin - 26.10.2021, 08:18
RE: Number of "Pulses" Detection - by p_xatzi - 26.10.2021, 09:31
RE: Number of "Pulses" Detection - by admin - 26.10.2021, 09:39
RE: Number of "Pulses" Detection - by p_xatzi - 31.10.2021, 22:15
RE: Number of "Pulses" Detection - by admin - 01.11.2021, 07:32
RE: Number of "Pulses" Detection - by p_xatzi - 20.04.2022, 07:22
RE: Number of "Pulses" Detection - by admin - 20.04.2022, 07:36
RE: Number of "Pulses" Detection - by p_xatzi - 20.04.2022, 08:23

Forum Jump: