em-foundation / zigem-dev

See https://blog.zigem.tech to learn more.
MIT License
0 stars 0 forks source link

Add logic to handle 32-bit RTC wrapping (rare) #16

Closed gcohler closed 1 month ago

gcohler commented 1 month ago

Closes #8

gcohler commented 1 month ago

I would just leave it as-is. So we post everything that has passed and then we find the next alarm.

gcohler commented 1 month ago

The more I think about it, you're right. Since we set cur.thresh from a.thresh, it has to be == when it arrives. So a simple == test is all I need. I'll simplify and retest.