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

AdjustRTC at Compile Time Requires Clearing Cache #39

Open
mattgaidica opened this issue Jan 21, 2025 · 1 comment
Open

AdjustRTC at Compile Time Requires Clearing Cache #39

mattgaidica opened this issue Jan 21, 2025 · 1 comment

Comments

@mattgaidica
Copy link
Collaborator

Cached compilations can result in stale DATE and TIME ∴ requires pressing shift + upload in Arduino IDE. @KravitzLab

The routine won't update the RTC if it has been previously set and recognizes a cached compile time (it stores a compilation datetime string in non-volatile memory using "preferences"). Still, if there is a more recent (including a cached) compilation, the RTC could reflect the cached compilation datetime. Options:

  1. The flasher needs to remember to use shift + upload.
  2. RTC setting uses a different script, but flasher STILL needs to shift + upload. This is kind of dumb and painful (To flash twice) but it might reduce the possibility of error. You would need to disable adjustRTC() in begin.
  3. Fancier stuff: Hublink RTC, standalone python script to connect to port and serialize datetime, etc.
@KravitzLab
Copy link
Member

We do the annoying #2 option with FED3 :)

The other option (which we also do with FED3) is to put a time-setting mode on the device itself - that can be a convenient back stop for any clock adjustments. I'll open an issue for that and knock it out at some point.

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

No branches or pull requests

2 participants