-
Notifications
You must be signed in to change notification settings - Fork 4
Added comments to the examples files. #1
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
Conversation
@sommersoft Want to review? I think you were helping on Discord. |
Can do! |
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.
GitHub doesn't give me the option to add inline comments on the appropriate areas of adafruit_l3gd20.py, so we'll do it the old fashioned way. 😄
-
L#94:
def __init__(self, rng):
could you set range to a default value for the init? This will allow "easier" use, but also ensure that an argument is there if the user doesn't pass one. Also, update the:param
docstring to denote the default. -
L#99: Continuing with the
rng
value, could you check that any passed range is one of the three accepted ones. If not, raise the exception. -
L#225: We've tried to get away from "Get" and "Set" (I'm plenty guilty). Could you please change this to
Returns a byte value from the register
Looks good! I like that you've left the datasheet register explanations, though that is a personal thing. 😄
docs/conf.py
Outdated
@@ -20,7 +20,8 @@ | |||
# Uncomment the below if you use native CircuitPython modules such as | |||
# digitalio, micropython and busio. List the modules you use. Without it, the | |||
# autodoc module docs will fail to generate with a warning. | |||
# autodoc_mock_imports = ["digitalio", "busio"] | |||
autodoc_mock_imports = ["digitalio", "busio", "micropython", "adafruit_register", |
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.
This only needs ["micropython", "adafruit_register"]
since that is all that you import. struct/ustruct
isn't needed (my mistake earlier; forgot struct is in CPython so Sphinx will import it without issue).
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.
Done
@@ -23,15 +23,11 @@ Table of Contents | |||
.. toctree:: | |||
:caption: Tutorials | |||
|
|||
.. todo:: Add any Learn guide links here. If there are none, then simply delete this todo and leave | |||
the toctree above for use later. | |||
Adafruit Triple Axis Gyro Breakout <https://learn.adafruit.com/adafruit-triple-axis-gyro-breakout> | |||
|
|||
.. toctree:: | |||
:caption: Related Products | |||
|
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.
Can you add the related product. It is already in the .py file; grabbed this from there: L3GD20H Triple-Axis Gyro Breakout Board <https://www.adafruit.com/product/1032>
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.
Done
@sommersoft made the changes, thanks for the review. |
Updating https://github.com/adafruit/Adafruit_CircuitPython_L3GD20 to 1.0.1 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_L3GD20#1 from mrmcwethy/initial
No description provided.