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

Save state when updating code #57

Open
DaveStu opened this issue Feb 15, 2022 · 4 comments
Open

Save state when updating code #57

DaveStu opened this issue Feb 15, 2022 · 4 comments

Comments

@DaveStu
Copy link

DaveStu commented Feb 15, 2022

Is it possible when an update is uploaded, that the previous auto/manual saved settings can be loaded, either automaticslly or manually?

Each time time I set my display up the way I like/need it and other configertions, after a new code is uploaded all previous settings are gone. I do find this part annoying. I assume the saved settings are stored on internal flash and gets wiped at each new upload? If so, is it possible to save settings to SDCARD, thus allowing easy application of settings UNLESS features change considerably that the saved state causes corruption to non-existent or changed menus options? I'm not sure on the logical way to tackle this, yet.

@MartinNohr
Copy link
Owner

I have to clean the eeprom when the format of the saved settings changed. It is keyed to the version number so it is only done when a new version is loaded, not when an existing version is loaded again.
If you want to save your settings then use the load/save settings in the menu. This saves your settings in a file on the SD card. New settings will not be set until a new file is save of course, but your old ones will be restored. Look in the manu "Saved Settings | Load/Save". The values are saved in named ascii format so it is not affected by new version of the binary settings that are stored in the eeprom. Hope that helps, let me know if it works.

@MartinNohr
Copy link
Owner

MartinNohr commented Feb 18, 2022

Just to clarify.

  • Save your settings (in saved settings menu)
  • Load new firmware
  • Load your settings (in saved settings menu)
    You should then make sure they are correct, including any new ones that have been added, and then save again.

@DaveStu
Copy link
Author

DaveStu commented Feb 21, 2022

Thanks for the insight and clarification. My step was to first turn on AUTOLOAD SETTINGS and I think, it would do an autosave of current state, thus overwriting my previous saved settings?
As, after doing that and THEN trying to load previous saved settings, there was nothing.
I will need to do as you said, THEN turn on AUTOLOAD SETTINGS.
I'll try for next version of code, as I've already applied your latest, before seeing this message. Thanks

@MartinNohr
Copy link
Owner

MartinNohr commented Feb 21, 2022

I didn't think it was a good idea to do a save when autoload was turned on, that would overwrite an existing settings file. I suppose I could have designed it to do an autosave if no saved file was saved, but I hadn't thought of that at the time. I'll think about changing that, I don't think it will cause any problems. However, turning autosave on will still use an existing settings file. I suppose I could ask if the current settings should be saved. But then again, hmmm, things get complicated!

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