Skip to content

Softfusion cleanup #424

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 44 commits into from
Jun 12, 2025
Merged

Softfusion cleanup #424

merged 44 commits into from
Jun 12, 2025

Conversation

gorbit99
Copy link
Contributor

This PR cleans up some code from softfusionsensor.h and the surrounding classes

The three main differences are:

  • A new IMUConsts struct that handles most of the constexpr stuff instead of having to have that in the sfusion class. This also reduces code duplication.
  • A new DriverCallbacks struct, that stores the callbacks for the bulkRead method on the individual drivers. This should make it easier to extend this struct in the future and it gets rid of the templates on bulkRead
  • It moves some of the leftover calibration methods into SoftFusionCalibration, since that's where they were used only

Eirenliel and others added 7 commits April 23, 2025 15:37
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
Fix: ES32 -> ESP32
@gorbit99 gorbit99 requested a review from Eirenliel as a code owner April 23, 2025 21:19
@Eirenliel
Copy link
Member

Can we maybe first merge the SPI support?

@gorbit99 gorbit99 requested a review from loucass003 as a code owner April 23, 2025 21:28
@gorbit99 gorbit99 force-pushed the softfusion-cleanup branch from a3ed75d to 6ef997a Compare April 23, 2025 21:30
@gorbit99 gorbit99 changed the base branch from main to spi-support2 April 24, 2025 20:37
@gorbit99
Copy link
Contributor Author

Only merge this after spi-support has been merged!

Base automatically changed from spi-support2 to main April 25, 2025 20:36
@Eirenliel
Copy link
Member

uwu please rebase

gorbit99 added 5 commits May 26, 2025 16:06
* 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
@Eirenliel Eirenliel merged commit 2363258 into main Jun 12, 2025
2 checks passed
@Eirenliel Eirenliel deleted the softfusion-cleanup branch June 12, 2025 02:44
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