You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common requirement for ESP32 projects is to have default values, for instance for settings, that can be overridden by the user.
The preferences library provides a great way to conveniently store the settings.
However, on boot, via the Preferences library, there seems to be no way to test if the user has already configured a value of their own, and therefore whether to adopt the hardcoded default instead.
I feel it would be helpful to expose an additional method for preferences that allows the program to check if a key has been set, so the value can then be set to the default, whereas if it has been set that old saved value would be appropriate.
At the moment the get methods do allow a value to be provided as a default, which is returned. But this value is not itself saved, so the program doesn't know if the value is saved (but happens to be the default) or the default has been returned.
The text was updated successfully, but these errors were encountered:
Feature Request only.
A common requirement for ESP32 projects is to have default values, for instance for settings, that can be overridden by the user.
The preferences library provides a great way to conveniently store the settings.
However, on boot, via the Preferences library, there seems to be no way to test if the user has already configured a value of their own, and therefore whether to adopt the hardcoded default instead.
I feel it would be helpful to expose an additional method for preferences that allows the program to check if a key has been set, so the value can then be set to the default, whereas if it has been set that old saved value would be appropriate.
At the moment the get methods do allow a value to be provided as a default, which is returned. But this value is not itself saved, so the program doesn't know if the value is saved (but happens to be the default) or the default has been returned.
The text was updated successfully, but these errors were encountered: