-
Notifications
You must be signed in to change notification settings - Fork 111
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
[RSDK-880] implement driver for AM5's AS5048A encoder #1720
[RSDK-880] implement driver for AM5's AS5048A encoder #1720
Conversation
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.
Looks really really good, a few cleanup comments, cases I want looked at, but nearly there. Good job!
components/encoder/as5048a.go
Outdated
rdkutils "go.viam.com/rdk/utils" | ||
) | ||
|
||
var am5ModelName = resource.NewDefaultModel("AS5048A") |
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.
suggest to add absolute
to name
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.
I got this model name from the ticket, is this something we should run by @Fahmina ?
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, please mention that this logic will likely be shared by multiple models int hat manufacturer's line.
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.
wait, is that likely?
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.
upon cursory inspection of the datasheets for other AM5 absolute position sensors, it seems that they have different bit resolutions for the angles and different data protocols (some don't even support i2c)? But there is an AS5048B that seems to work the same, maybe I can just remove the "A" at the end?
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.
The sub-model problem raises its head again. Then maybe am5-as5048
is a better model name. Either way, let's lock down a model name with product.
|
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.
great work. Do you think you could add a test to test the math around computing the position?
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.
LGTM!
No description provided.