Skip to content

Conversation

@DaveLangstaff
Copy link

Signed-off-by: Dave Langstaff [email protected]

@ladyada ladyada requested a review from siddacious December 15, 2020 15:52
@DaveLangstaff
Copy link
Author

Apologies - got min and max sawpped, ok and tested better now.

def led_current(self, led_curent):
new_current = int((led_curent - 4) / 2)
"""coerce led_curent to be between 4 & 258, then calculate value
to be put into register on chip"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment will not be rendered in the documentation because only the docstring for the getter/@property is rendered. That said, I'm OK with leaving it as a explanation of the code below it. It could also be a comment.

Please edit the setter docstring to mention the range of valid values, and to add something like "invalid values will be rounded to the closest valid number". No need to get overly specific. People who care about the nitty gritty details can read the source ;)

Please keep in mind that we try to talk about properties as nouns and not verbs. led_current doesn't do something, it is something. Apologies if this sounds a bit pedantic, but we try our best to remain consistent in style.

For more info you can see the design guide here:
https://circuitpython.readthedocs.io/en/latest/docs/design_guide.html

* Author(s): Bryan Siepert
Implementation Notes
Implementation NotesF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix this typo

@caternuson caternuson mentioned this pull request Jan 22, 2021
@caternuson
Copy link
Contributor

Closing. Fixed with #9.

@ladyada ladyada closed this Jan 24, 2021
@caternuson
Copy link
Contributor

🤦 thanks. must have hit the wrong button.

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

Successfully merging this pull request may close these issues.

4 participants