{{ message }}
Repository navigation
update description of nvs_get - #427
Open
avram-pycom wants to merge 1 commit into
Open
avram-pycom wants to merge 1 commit into
avram-pycom wants to merge 1 commit into
Conversation
gijsio
suggested changes
May 28, 2021
gijsio
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the PR! I was not aware of this functionality 👍 . Let me know what you think of my suggestions.
Gijs
| Get the value with the specified key from the NVRAM memory area of the external flash. | ||
|
|
||
| If a non-existing key is given the returned value will be `None`. | ||
| If a non-existing key is given the returned value will be the optional_default_value if it is provided, else an error will be raised. The error message for missing key is: "No matching object for the provided key" |
Contributor
There was a problem hiding this comment.
Could we mention the error type (ValueError) instead of the error text?
Author
There was a problem hiding this comment.
Please hold.
It seems there are more info to add. I have other priorities at the moment but I will be back with changes.
| Set the value of the specified key in the NVRAM memory area of the external flash. Data stored here is preserved across resets and power cycles. Value can only take 32-bit integers at the moment. Example: | ||
|
|
||
| ### pycom.nvs_get(key) | ||
| ### pycom.nvs_get(key[, optional_default_value]) |
Contributor
There was a problem hiding this comment.
The square brackets already indicate 'optional', perhaps its better to call it 'default_value'? I couldn't find how we call it in the firmware, but its always best to match that.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.