hkicko / CubeCell-GPS-Helium-Mapper

MIT License
33 stars 20 forks source link

Timer sometimes skips seconds #3

Closed crashmaxx closed 3 years ago

crashmaxx commented 3 years ago

I noticed that when waiting for it to join, the timer on the display will sometimes skip seconds. Like it will go "1s, 3s, 4s, 5s, 7s..."

It seems the display isn't updating often enough. The issue was fixed by updating line 458 in main.cpp to 500 instead of 1000.

Lines 478, 531 and possibly other places should also be updated.

hkicko commented 3 years ago

I'm not sure which lines are you referring to, because your comments are based on an older version. I am guessing you mean the IF inside the displayJoinTimer()?

crashmaxx commented 3 years ago

Yes, now on lines 493, 512, and 632.

if ((millis() - lastScreenPrint) > 1000)

hkicko commented 3 years ago

Do you see that as a big issue? I mean the goal here is to show the user that there is something going on and the program is not stuck. Not to give them an accurate timer they could use to set their watch to.

crashmaxx commented 3 years ago

Not a big issue, but unless updating the display more often will hurt performance. I don't see why you would want the display to have a noticeable issue.

hkicko commented 3 years ago

No, no performance cost as far as I can think of. Maybe a bit of a battery cost, but probably negligible. I will implement it soon.

hkicko commented 3 years ago

https://github.com/hkicko/CubeCell-GPS-Helium-Mapper/commit/9b6f6b586270d4753c4324797768475fdbc08528