-
Notifications
You must be signed in to change notification settings - Fork 7
feat(devices): V5 Inertial Sensor support #16
Conversation
Your naming is perfectly fine as it is. |
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.
Thank you for contributing! there are only 2 things that I would change.
I think this is ready to merge unless lewis disagrees |
Thanks for doing these bindings, I was putting it off. |
Ah, I say we use the blocking function for the sync API and the non blocking one to create a future for the async API. |
Sounds good, will do. |
Any thoughts on bringing in a crate like mint which provides standard container types for other math-related crates to interop with?
Could also make it an optional feature and just provide conversion types rather than straight up returning them. |
I think that if we do that it should definitely be a feature. I also think that there are many crates that provide similar functionality to mint, such as nalgebra, so there should be discussion on which one we would use. For now I think we should continue without bringing in a library like that, but I am open for discussion about it later. |
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.
After this and testing, it should be ready to merge.
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.
Everything looks good! If you think that testing isn't necessary I will approve and merge.
Still need to test the newer async stuff against the executor fix branch, which i'll try to get to tonight, tomorrow, or monday. Everything else has been tested to my knowledge. |
Alright sounds good. I hope we can get this merged soon. |
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 (Lets Get That Motion)
Adds high level bindings to the PROS IMU API through the
InertialSensor
struct. Currently untested on actual hardware.Limitations:
- The fields onpros_sys::imu_raw_s
appear to be private, making it impossible to implement theInertialSensor::gyro_rate
andInertialSensor::accel
without manually modifying the bindings. As such, i've left these methods commented out for now.Let me know if any of the naming for things here seem off. (specifically, should data structs be
InertialStruct
orInertialSensorStruct
?)