Skip to content

Fix timewrap bug#1972

Open
weebl2000 wants to merge 4 commits into
meshcore-dev:devfrom
weebl2000:fix-timewrap-comparison
Open

Fix timewrap bug#1972
weebl2000 wants to merge 4 commits into
meshcore-dev:devfrom
weebl2000:fix-timewrap-comparison

Conversation

@weebl2000

Copy link
Copy Markdown
Contributor

I don't think this one would actually occur in the field. But @ripplebiz managed to point me in the right direction by setting clock 5 mins prior to the 49 day wraparound.

First half of the 49 day wrap period the check works, but the second half it didn't because of the wraparound bug.

Good to have it fixed for any future changes that might impact it.

@JDat

JDat commented Mar 9, 2026

Copy link
Copy Markdown

Looks OKayish! Need to add documentation so everyone, who is adding/writing Meshcore code can easy find function named millis_passed() without looking/listing tons of headers.

@weebl2000 weebl2000 force-pushed the fix-timewrap-comparison branch from 3a50df3 to 79578fb Compare March 9, 2026 13:51
@weebl2000

Copy link
Copy Markdown
Contributor Author

Looks OKayish! Need to add documentation so everyone, who is adding/writing Meshcore code can easy find function named millis_passed() without looking/listing tons of headers.

Added a doxygen comment, do we want docs in more places?

@JDat

JDat commented Mar 9, 2026

Copy link
Copy Markdown

Is doxygen documentation generated automatically? That would be nice.

Btw, problem, theory and fix on millis() 49 day rollover problem is here.

https://www.norwegiancreations.com/2018/10/arduino-tutorial-avoiding-the-overflow-issue-when-using-millis-and-micros/

@weebl2000 weebl2000 force-pushed the fix-timewrap-comparison branch from 79578fb to 6520489 Compare March 23, 2026 13:27
@weebl2000 weebl2000 force-pushed the fix-timewrap-comparison branch from 6520489 to e811615 Compare April 4, 2026 11:18
@weebl2000 weebl2000 force-pushed the fix-timewrap-comparison branch from e811615 to 99c0cf7 Compare May 5, 2026 08:46
@weebl2000 weebl2000 force-pushed the fix-timewrap-comparison branch from 99c0cf7 to 571c1b8 Compare May 26, 2026 09:52
@weebl2000 weebl2000 force-pushed the fix-timewrap-comparison branch 3 times, most recently from ef1e331 to 17f34c5 Compare June 6, 2026 21:04
@weebl2000 weebl2000 force-pushed the fix-timewrap-comparison branch from 17f34c5 to b5eb887 Compare June 14, 2026 13:37
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.

2 participants