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.

Hold a state when value changes
#1
I have a script where I'm monitoring consumption, but can get no finer numbers than 1, 2, 3 and 4 for my measurements. When consumption is same or above 2 I set an object to true, and when it is below the object goes to false.

However, this is causing some issues as the consumption temporarily drops below 2 for a few milliseconds, causing my object to drop to false. 

Does anyone have a best practice or hysteresis-type solution to this kind of problem?
Reply


Messages In This Thread
Hold a state when value changes - by FatMax - 12.11.2024, 09:38

Forum Jump: