Skip to content

Mag support (Attempt 2) #458

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

Merged
merged 10 commits into from
Jun 12, 2025
Merged

Mag support (Attempt 2) #458

merged 10 commits into from
Jun 12, 2025

Conversation

gorbit99
Copy link
Contributor

@gorbit99 gorbit99 commented Jun 2, 2025

This PR aims to lay the foundation for magnetometer support for sfusion based IMUs (ICM45, LSM6 family, BMI270, etc etc).

Currently this only means creating the base framework for mag support and adding mag detection for the ICM-45686 IMU. In the future this should be expanded to other IMUs, mag sample support should be added to each of them, and those samples should be fed into VQF.

It also adds magnetometer status to GET TEST and GET INFO in accordance to #457

@gorbit99 gorbit99 requested a review from Eirenliel as a code owner June 2, 2025 19:15
@gorbit99 gorbit99 changed the base branch from main to softfusion-cleanup June 2, 2025 19:26
@Eirenliel Eirenliel merged commit adba3fd into softfusion-cleanup Jun 12, 2025
2 checks passed
@Eirenliel Eirenliel deleted the sfusion-mag-support2 branch June 12, 2025 02:20
Eirenliel added a commit that referenced this pull request Jun 12, 2025
* Make SPI work

Move sensor building logic to a separate class and file

Don't use templates for RegisterInterface/I2CImpl/SPIImpl

This started getting ridiculous, now we can actually maintain it.

Make BNO085 work again

Add BNO to automatic detection, remove a bunch of others

Not all IMU types are enabled right now due to code size optimization, but it could be expanded in the future with optimization of Softfusion.

Pick IMU type automatically by asking it

* ESP32 spelling fix (#396)

Fix: ES32 -> ESP32

* (Probably) multiply acceleration by tracker rotation offset

* Remove stome stuff from softfusionsensor

* Missed stuff

* Undo defines changes

* Undo debug.h changes

* Uses32BitSensorData is unneccessary now

* Remove some unnecessary variables

* Cleanup some logging text

* Formatting

* Split SensorBuilder into a header-source file pair

* Fix copyright

* Fix some issues with glove after all the changes

Add definitions for SlimeVR v1.2
Fix typo and add comments to quaternion sandwich function

* Add NO_WIRE definition for SPI devices

* Fix formatting

* Minor fix

* If ICM-45686 not found, ask again nicely

* Fix MCP interface not building

* Remove uneccessary "default" ctor from SPIImpl

* Remove buildSensorReal

* Invert if statement in sensorbuilder+

* Fix formatting

* If ICM-45686 not found, ask again nicely

* Fix MCP interface not building

* Fix formatting

* Various cleanup

* Formattign

* Fix detected logic

* Remove unnecessary Self using

* For some reason this fixes memory corruption issues

* Formatting

* This actually works this time

* Small cleanup

* Remove some unused includes

* Formatting

* Mag support (Attempt 2) (#458)

* WhoAmI check working

* In theory this should be setting up the mag

* Not sure how that happened

* Add magnetometer status to GET TEST and GET INFO

* Formatting

* Formatting 2

---------

Co-authored-by: Eiren Rain <[email protected]>
Co-authored-by: Butterscotch! <[email protected]>
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