Closed konimaru closed 3 years ago
@konimaru Once in a while my machine freezes and when I hit ctrl-c to break, it's always on a line with a WAIT command. I had wondered if there was an issue with the rollover in WAIT... I wonder if my issue is related to this bug?
I have now merged the overflow fix into Arduino_wifi's sdknowifi tree, and it seems that that fixes the issue with the WAIT command. It should show up in the next git build. (Note, however, that the next build will only be triggered when there is a change in the basicengine-firmware repo.)
current code:
Example: millis() returns close to 0xFFFFFFFF, end time == 0x0xxxxxxx
Suggested solution (with the limitation that the max delay is limited to 2^31 ms):
This obviously only works when millis() uses the full 32bit range (see also #69).