-
Notifications
You must be signed in to change notification settings - Fork 81
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
update description of nvs_get #427
base: publish
Are you sure you want to change the base?
Conversation
avram-pycom seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
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.
Thanks for the PR! I was not aware of this functionality 👍 . Let me know what you think of my suggestions.
Gijs
|
||
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" |
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.
Could we mention the error type (ValueError) instead of the error text?
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.
Please hold.
It seems there are more info to add. I have other priorities at the moment but I will be back with changes.
@@ -33,11 +33,11 @@ Get or set the colour of the RGB LED. The colour is specified as 24 bit value re | |||
|
|||
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]) |
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.
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.
ping. who's waiting on whom here? |
No description provided.