Skip to content

Acceleration implemented. #11

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 2 commits into from
Oct 12, 2017

Conversation

kattni
Copy link
Contributor

@kattni kattni commented Oct 12, 2017

Sphinx docs added, conf.py updated, image included.

self._x, self._y, self._z = self._lis3dh.acceleration

@property
def acceleration_x(self):
Copy link
Member

Choose a reason for hiding this comment

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

Why do you have x, y and z as separate properties? I was expecting a single acceleration property that just returns self._lis3dh.acceleration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was necessary to use separate properties to make them work in the code as acceleration_x, acceleration_y and acceleration_z. Otherwise we're typing cpx.x, cpx.y, and cpx.z which I thought could be a little unclear. As well, since including something that = self._lisd3h.acceleration is required in whatever loop you have in your code if you want x, y and z to continue updating, I thought being able to call the update property separately and having them all start with acceleration made it more obvious that they're all related.

I can change it if you'd rather it just be the single property.

Copy link
Member

Choose a reason for hiding this comment

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

I was thinking it'd be:

x, y, z = cpx.acceleration

Sphinx docs added, conf.py updated, image included.
@kattni kattni force-pushed the acceleration-implementation branch from 888ac05 to 597cada Compare October 12, 2017 19:18
Updated doc to reflect changes.
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Yay! Looks good.

@tannewt tannewt merged commit e87cfdd into adafruit:master Oct 12, 2017
@kattni kattni deleted the acceleration-implementation branch June 27, 2018 20:05
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.

2 participants