Delay in loop, paramater change while delay - What happens?

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
anom3
Posts: 66
Joined: 21 Sep 2016 08:53

Delay in loop, paramater change while delay - What happens?

Post by anom3 »

I was wondering in the following scenario what will happen:

loop:

delay(10000);

And while this delay is hit, gateway sends a paramater change (eg: 64 to 1000)...

Will the parameter be 1000 after the delay? Or does the loop need to finish first?

User avatar
PoltoS
Posts: 5887
Joined: 26 Jan 2011 19:36

Re: Delay in loop, paramater change while delay - What happens?

Post by PoltoS »

If you read the documentation in delay, you will notice that long delays (more than 10 ms) are always made a sync. This means radio will handle incoming requests in background and will resume your loop after the delay is over. Only short delays are really blocking.

So in short, it will already change

Post Reply