Skip to content

Conversation

@bjackson312006
Copy link
Contributor

@bjackson312006 bjackson312006 commented May 27, 2025

Changes

Added a zeroing function to IMU

Notes

Not tested yet

@bjackson312006 bjackson312006 self-assigned this May 27, 2025
@bjackson312006 bjackson312006 requested a review from Copilot May 28, 2025 16:56
@bjackson312006 bjackson312006 marked this pull request as ready for review May 28, 2025 16:56
Copy link

Copilot AI left a 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>
@bjackson312006 bjackson312006 requested a review from KSMehta11 May 29, 2025 16:18
Copy link
Contributor

@jr1221 jr1221 left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants