Time Limit For Setter Functions?

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
Tillsy
Posts: 28
Joined: 15 Feb 2018 03:51

Time Limit For Setter Functions?

Post by Tillsy » 18 Feb 2018 03:01

Is there an automatic time limit for setter functions?

I have a specific situation where a second task may sometimes need to happen say 10 seconds later - have a time loop running because delay function not allowed, but it seems my code never gets to finish so it seems the code gets terminated?

Tillsy
Posts: 28
Joined: 15 Feb 2018 03:51

Re: Time Limit For Setter Functions?

Post by Tillsy » 18 Feb 2018 10:54

Found the problem - seems either Z-UNO or Arduino do adhoc calculations as int. I had to first create a float and do the calculations within that first.

Otherwise my percentages were calculating as zero every time and the whole thing immediately timing out.

Plus by doing this calculation with a float variable, I can monitor that from the main loop and can do the second task there. Thus the setter function is finished within 100ms worse case (still something that needs to delay by 75ms, no escaping that).

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

Re: Time Limit For Setter Functions?

Post by PoltoS » 18 Feb 2018 19:35

We suggest to exit the setter asap.

Post Reply