Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use all colors in random pixel example and fix vtimer overflowing #23

Merged
merged 2 commits into from Apr 17, 2021

Conversation

miracoli
Copy link
Contributor

Hello,

the vtimer almost always overflows during the calculation in the micros() function, because the calculation is done with unsigned / 16-bit precision and then the result is converted to unsigned long / 32-bit precision.
Overflow also occurs in the millis() function after ~65 seconds.
Both can be easily fixed by using unsigned long instead of unsigned for vtimer.

Best regards

@smaffer smaffer merged commit ed760dd into smaffer:master Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants