You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I would check digital input with function in.read() every 10 ms, I will miss some short impulses with duration less than 10 ms. If I would wait impulses with function in.waitForValue(...), this function will lock thread until input state will change. So I need to use the new thread which will only listen input? Is there single-thread way to detect short impulses?
The text was updated successfully, but these errors were encountered:
There isn't. The entire API is following a synchronous / blocking approach
and creating a thread is the intended way of doing something like what
you're describing. If that's a problem for you, you can look into changing
/ enhancing the implementation of DigitialInput. Under the hood it is
event-driven, so you can easily add a feature such as querying the number
of transitions since inception or similar.
On Mon, Apr 17, 2017 at 9:52 AM, T4r4sB ***@***.***> wrote:
If I would check digital input with function in.read() every 10 ms, I will
miss some short impulses with duration less than 10 ms. If I would wait
impulses with function in.waitForValue(...), this function will lock thread
until input state will change. So I need to use the new thread which will
only listen input? Is there single-thread way to detect short impulses?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#131>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA9Y2IXFvWGNNo0-AwO7c5kYGmbBM6_Xks5rw5jmgaJpZM4M_UU_>
.
If I would check digital input with function in.read() every 10 ms, I will miss some short impulses with duration less than 10 ms. If I would wait impulses with function in.waitForValue(...), this function will lock thread until input state will change. So I need to use the new thread which will only listen input? Is there single-thread way to detect short impulses?
The text was updated successfully, but these errors were encountered: