-
Notifications
You must be signed in to change notification settings - Fork 219
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
feat: persistent data storage across reboots for apps #368
base: master
Are you sure you want to change the base?
feat: persistent data storage across reboots for apps #368
Conversation
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
Btw I initially wanted to use asset statements when saving data but apparently they were working on the simulator but ignored on the pinetime. Reverting the assert in [this commit][https://github.com/thiswillbeyourgithub/wasp-os/commit/86dc51535435351d37be5f636afeac9ff80f8867) fixed the issue. Is it normal? Is there something I'm missing? Can we improve the simulator consistency? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I like this... just a few small suggestions
wasp/wasp.py
Outdated
"title": "Storing failed", | ||
"body": "Error when storing '{}': '{}'".format(name, err)}) | ||
|
||
def get_settings(self, name, delete=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding default = None might make it better for some callers (and then return default rather than None in the error paths).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually don't understand what you mean by "default" or how people could use it.
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
By the wat I made an enhancement to the alarm app to support more than 4 alarms but I'm waiting for this PR to be approved to avoid having too many incompatible PR waiting to be merged :) |
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
This creates 2 new methods for wasp.system to store and get settings. They will be stored in files in a settings folder.
I'm testing this with stopwatch (start time) and alarms.
What do you think?
Signed-off-by: thiswillbeyourgithub github@32mail.33mail.com