-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add Lsm303agr Accel/Mag driver #607
Conversation
@@ -0,0 +1,12 @@ | |||
namespace Meadow.Foundation.Sensors.Accelerometers | |||
{ | |||
public partial class Lsm303agr |
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.
Any particular reason these registers are public?
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.
its a partial class, but the registers are not public
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.
yeah they're not public - partial public class but the fields are private
/// </summary> | ||
void Initialize() | ||
{ | ||
i2cPeripheralAccel.WriteRegister(ACC_CTRL_REG1_A, 0x57); |
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.
minor nit, but these should probably be defined constants instead of magic numbers
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.
Yeah it's a compound value setting things up .... I could easily move it up. I often do this for init methods because they do end up with a crap ton of magic init values. Displays are terrible for it and it doesn't quite seem worth the hassle of creating 20ish defines.
No description provided.