Persist time and steps across reboots#2400
Persist time and steps across reboots#2400mark9064 wants to merge 1 commit intoInfiniTimeOrg:mainfrom
Conversation
|
Build size and comparison to main:
|
|
I'm assuming this has been built and does its thing. The question I suppose I have is this: why not use the filesystem? Is that at risk of not persisting as well? I was literally in the process of making my own edit yesterday for this reason...but what I've done is taken a struct and spat it out into a file. Edit: I'll modify my rng pr in relation to this for seeding purposes. |
|
Mainly as these values are updated 10 times per second, all the time, and writing to the flash 10 times per second is best avoided |
|
Makes sense, I may have made the delay slightly more than 10x per second. Suppose a filesystem write is a backup? EG: Update this struct and on the off chance that may fail as it seems it might in the documentation then lookup a file? |
|
I don't think a file backup is needed, it's extra complexity for a case that realistically only happens after a firmware update, which is once per year currently |
Persist current steps, trip steps and time across reboots with an easily extendable struct for persisting more data in the future.
I've spent a lot of time reading, and I'm pretty sure now that the volatile semantics here are now correct. This means that loading values after reboot should be much more reliable since the compiler is aware that the memory used has special semantics.
Fixes #2293