Open
Conversation
There was a problem hiding this comment.
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>
KSMehta11
reviewed
May 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Added a zeroing function to IMU
Notes
Not tested yet