Skip to content
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

custom IMU adjustments function #799

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

sdb4
Copy link
Contributor

@sdb4 sdb4 commented Mar 4, 2025

Feature addition to imu.c to add the following:
An optional define, IMU_ROT_Y_270, which can be set in the board file to rotate the IMU outputs by 270deg along the y axis
An optional define, IMU_CUSTOM_FUNC, which can be set in the board file as a function which performs a runtime adjustment of IMU output, without needing to use the IMU appconfig.

This allows a system of VESC motors, with their IMU's set in different orientations (say a PCB rotated 90deg along an axis), to have the same orientation result to the user/VESCTool, or, for a runtime-adjustable transformation depending on (for example) hardware pin straps.

@vedderb vedderb merged commit cced6fc into vedderb:master Mar 26, 2025
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.

2 participants