-
Notifications
You must be signed in to change notification settings - Fork 0
IMU Zero #26
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
base: main
Are you sure you want to change the base?
IMU Zero #26
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.
Pull Request Overview
Adds a zeroing feature for the IMU, allowing the current orientation to be used as a reference offset, and wires it up over CAN.
- Introduces
imu_zero()plus global arrays to store raw and zero-reference rotation data. - Updates the IMU monitor (
vIMUMonitor) to apply the zero reference when publishing orientation. - Adds CAN inbound handling for an IMU-zero command, including a new receive thread (
vCanReceive) and CAN filter IDs.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Core/Src/msb.c | Defined imu_rotation_data, imu_zero_reference, and imu_zero() |
| Core/Src/monitor.c | Changed orientation assignment to subtract zero reference |
| Core/Src/main.c | Started a new thread for CAN receive (vCanReceive) |
| Core/Src/can_handler.c | Created inbound queue, can1_callback, and vCanReceive to handle zero commands |
| Core/Inc/msb_conf.h | Added CAN IDs for IMU zero commands |
| Core/Inc/msb.h | Added prototype for imu_zero() |
| Core/Inc/can_handler.h | Declared can1_callback, vCanReceive, and their thread IDs/attributes |
Comments suppressed due to low confidence (1)
Core/Src/can_handler.c:144
- [nitpick] The thread name 'CanProcessing' is ambiguous for the receive thread; consider renaming it to 'CanReceive' for clarity.
.name = "CanProcessing",
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jr1221
left a comment
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.
test then merge. cool
Changes
Added a zeroing function to IMU
Notes
Not tested yet