Skip to content

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

Merged
merged 9 commits into from
Jun 19, 2018

Conversation

mrmcwethy
Copy link
Collaborator

No description provided.

@tannewt
Copy link
Member

tannewt commented Jun 18, 2018

@sommersoft Want to review? I think you were helping on Discord.

@sommersoft
Copy link
Collaborator

Can do!

Copy link
Collaborator

@sommersoft sommersoft left a 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",
Copy link
Collaborator

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).

Copy link
Collaborator Author

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

Copy link
Collaborator

@sommersoft sommersoft Jun 18, 2018

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>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@mrmcwethy
Copy link
Collaborator Author

@sommersoft made the changes, thanks for the review.

@mrmcwethy mrmcwethy self-assigned this Jun 19, 2018
@sommersoft sommersoft merged commit bbf7e0d into adafruit:master Jun 19, 2018
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jun 20, 2018
@mrmcwethy mrmcwethy deleted the initial branch July 1, 2018 19:47
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.

3 participants