In my current project, I have to calculate the amount of energy stored inside a gaz tank.
I'm looking for the best way to save this value so it won't be reset after a reboot or even if the software is redeployed.
The only way I can see for now is to store this in a file. However, I find this solution a bit heavy. Is there any lighter way to this ?
Solved! Go to Solution.
To save a value between system shutdowns you have to store it in a file on the hard drive. Everything else gets wiped on a shutdown.
If you find the saving of the value is slowing down your main loop, then move the update to another loop and use a queue to send updates to it.
ok, thank you.
I implemented it with the binary files write/read Vi, I guess it is the fastest method to save data on the disk.