Replies: 3 comments
-
I've always done that and it always worked If it actually fails, may be casting the numbers to long before the subs (instead of casting the result) |
Beta Was this translation helpful? Give feedback.
-
Look for functions |
Beta Was this translation helpful? Give feedback.
-
The logic is the same as those functions except I'm casting to long instead of int32_t. I'll change the cast to int32_t. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I believe the device group logic that uses the millis() function to determine if timers have elapsed may be flawed. Right now if it uses
uint32_t now = millis();
if ((long)(now - timer) >= 0)
to determine if the uint32_t timer value has been reached. According to my reading, this should handle wrapping but in my testing that doesn't seem to be true. What is the proper way to determine if a timer has past using millis() that works when millis() wraps?
Beta Was this translation helpful? Give feedback.
All reactions