Replies: 2 comments
-
Thank you for pointing this out. Even though the effect is very minimal on the output, I'll take a look at updating the function to prevent the overflow issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Converting this to discussion. Will do some additional testing and possible update for a future release. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
"if (msNow > nextSwitchTime) { nextSwitchTime = msNow + debounce;"
is used in the PID_RelayOutput example,
When nextSwitchTime overflows, the comparison results for the next cycle will be wrong.
//should use
if(millis() - lastMillis >= interval){
//and NOT like
if(millis() >= lastMillis + interval){
Beta Was this translation helpful? Give feedback.
All reactions