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

SoftFusion sensor framework with BMI, ICM, LSM6, MPU sensor implementations #322

Merged
merged 55 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
04b7208
Update readme to mention BMI270 support.
l0ud May 8, 2023
60f6eef
Soft fusion sensor initial code, wip
l0ud Sep 15, 2023
93bebd3
Soft fusion ICM-42688-P lazy WIP implementation.
l0ud Sep 19, 2023
eb48391
sfusion: Cleanup, implemented sensor frequency calibration
l0ud Sep 24, 2023
9b5e4a7
icm42688: add more comments, basic driver (no hw filtering) should be…
l0ud Sep 25, 2023
8e47f34
sfustion: compilation fix
l0ud Dec 5, 2023
961af2f
sfusion: start calibration when upside down
l0ud Dec 13, 2023
73578f1
cleanup: remove confusing had data flag
l0ud Dec 13, 2023
597f472
sensor manager: use unique_ptr instead of raw pointers
l0ud Dec 20, 2023
4e24586
sfusion: big refactoring wip
l0ud Jan 5, 2024
3fc522d
sfusion: make aux work, at least sfusion sensors should now be functi…
l0ud Feb 10, 2024
e9d27f2
sfusion: lightweight implementation of BMI270 sensor, no sensitivity …
l0ud Mar 5, 2024
b2497a1
sfusion: BMI270: added CRT and gyro zx factor. should be functionally…
l0ud Mar 11, 2024
7e84c91
Added lsm6dsv
gorbit99 Mar 12, 2024
e299c3c
Trying to work around esp32c3 compilation problem, not liking that so…
l0ud Mar 12, 2024
60eae4c
sfusion: fix problems found after rebase
l0ud Mar 12, 2024
5083f90
Update README.md
l0ud Mar 12, 2024
98f1cdf
Bump Arduino core to 3.0 to match GCC12
Mar 15, 2024
ee44f19
Remove fast pin swapping that is no longer compatible with arduino co…
Mar 15, 2024
7c8bab2
Merge pull request #4 from nekomona/sfusion
l0ud Mar 15, 2024
ccf3c20
Bring back fast pin swapping
nekomona Mar 15, 2024
8e40776
Merge pull request #5 from nekomona/sfusion-fastswap
l0ud Mar 15, 2024
811e5d4
Update platformio-tools.ini
unlogisch04 Mar 16, 2024
37ca5d7
Fix accel timescale (calibration no longer takes forever)
kounocom Mar 16, 2024
28d6fc2
Merge pull request #7 from wigwagwent/lsm6dsv-sfusion-merge
l0ud Mar 18, 2024
27be085
Fix non-sfusion sensors
l0ud Mar 19, 2024
cb48a2b
Added LSM6DSO and DSR support and refactored DSV support
gorbit99 Mar 24, 2024
da8736f
Removed template float param from the implementation
gorbit99 Mar 25, 2024
239ee30
sfusion: port MPU6050 driver wip, not expecting to be functional yet
l0ud Mar 25, 2024
a5a291c
Merge remote-tracking branch 'tailsy/sfusion' into sfusion-lsm6dsx-dr…
gorbit99 Mar 26, 2024
9e074d3
Merge pull request #8 from gorbit99/sfusion-lsm6dsx-driver
l0ud Mar 26, 2024
a7023c8
Merge branch 'SlimeVR:main' into sfusion
l0ud Mar 26, 2024
c33bc7b
sfusion: add headers specifying main code owners
l0ud Mar 26, 2024
479000a
connection: fix warning
l0ud Mar 26, 2024
b4a7c7c
Merge pull request #6 from unlogisch04/l0ud_sfusion
l0ud Mar 26, 2024
30b2478
update README.md
l0ud Mar 26, 2024
124b693
fshelper: fixed ESP8266 regression caused by abstracting FS access
l0ud Mar 28, 2024
d7d5c40
Merge remote-tracking branch 'origin/main' into sfusion
l0ud Mar 28, 2024
271fa3f
sfusion: fix error on merge
l0ud Mar 28, 2024
aabd43b
bno080: differentiate bno080, bno085, bno086 again
l0ud Mar 29, 2024
4c8c0b1
sfusion: final touches
l0ud Mar 29, 2024
c1fca15
restore hadData functionality, implementing it in every sensor, made …
l0ud Mar 29, 2024
b83bc50
fix address supplement in non-sfusion sensors, do i2c bus reset for a…
l0ud Mar 29, 2024
e524e18
sfusion: make MPU6050 driver use normal MPU6050 ImuID, change eatSamp…
l0ud Mar 31, 2024
40d81ae
sfusion: hotfix, don't apply sensorOffset, it's applied in sensor base
l0ud Apr 3, 2024
10f0fb1
Merge remote-tracking branch 'origin/main' into sfusion
l0ud May 4, 2024
ddaebfb
Log FIFO overruns on LSMs
Kubuxu Jun 2, 2024
701f63b
Reset the soft watchdog while eating or collecting calibration samples
Kubuxu Jun 3, 2024
22ae545
Merge pull request #10 from Kubuxu/fix/swtd-calibration
l0ud Jun 4, 2024
73d80b8
Merge pull request #9 from Kubuxu/misc/lsm-overflow-warn
l0ud Jun 4, 2024
6ac4e83
Fix missing word in comment, switch to constexpr
Kubuxu Jun 4, 2024
0111adf
Merge pull request #11 from Kubuxu/misc/comment-cleanup
l0ud Jun 5, 2024
316b223
Merge branch 'main' into sfusion
l0ud Jun 21, 2024
0b7afd1
Update esp32/esp8266
unlogisch04 Jun 19, 2024
a9b1c74
Merge pull request #12 from unlogisch04/l0ud_fixforpr
l0ud Jun 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ The following IMUs and their corresponding `IMU` values are supported by the fir
* Using fusion in internal DMP for 6Dof or 9DoF, 9DoF mode requires good magnetic environment.
* Comment out `USE_6DOF` in `debug.h` for 9DoF mode.
* Experimental support!
* BMI270 (IMU_BMI270), ICM-42688 (IMU_ICM42688), LSM6DS3TR-C (IMU_LSM6DS3TRC), LSM6DSV (IMU_LSM6DSV), LSM6DSO (IMU_LSM6DSO), LSM6DSR (IMU_LSM6DSR), MPU-6050 (IMU_MPU6050_SF)
* Using common code: SoftFusionSensor for sensor fusion of Gyroscope and Accelerometer.
* Gyro&Accel sample rate, gyroscope offset and 6-side accelerometer calibration supported.
* In case of BMI270, gyroscope sensitivity auto-calibration (CRT) is additionally performed.
* Support for magnetometers is currently not implemented.
* VERY experimental support!

Firmware can work with both ESP8266 and ESP32. Please edit `defines.h` and set your pinout properly according to how you connected the IMU.

Expand Down
192 changes: 0 additions & 192 deletions lib/ICM42688/ICM42688.h

This file was deleted.

63 changes: 0 additions & 63 deletions lib/ICM42688/MMC5983MA.h

This file was deleted.

34 changes: 26 additions & 8 deletions platformio-tools.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ framework = arduino
build_flags =
!python scripts/get_git_commit.py
-O2
-std=gnu++17
-std=gnu++2a
build_unflags =
-Os
-std=gnu++11
-std=gnu++11 -std=gnu++17

[env:BOARD_SLIMEVR]
platform = espressif8266 @ 4.2.0
Expand All @@ -37,36 +37,54 @@ platform = espressif8266 @ 4.2.0
board = esp12e

[env:BOARD_WROOM32]
platform = espressif32 @ 6.1.0
platform = espressif32 @ 6.5.0
platform_packages =
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
board = esp32dev

[env:BOARD_ESP01]
platform = espressif32 @ 6.1.0
platform = espressif32 @ 6.5.0
platform_packages =
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
board = esp32dev

[env:BOARD_LOLIN_C3_MINI]
platform = espressif32 @ 6.1.0
platform = espressif32 @ 6.5.0
platform_packages =
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
build_flags =
${env.build_flags}
-DESP32C3
board = lolin_c3_mini

[env:BOARD_BEETLE32C3]
platform = espressif32 @ 6.1.0
platform = espressif32 @ 6.5.0
platform_packages =
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
build_flags =
${env.build_flags}
-DESP32C3
board = dfrobot_beetle_esp32c3

[env:BOARD_ES32C3DEVKITM1]
platform = espressif32 @ 6.1.0
platform = espressif32 @ 6.5.0
platform_packages =
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
build_flags =
${env.build_flags}
-DESP32C3
board = esp32-c3-devkitm-1

[env:BOARD_XIAO_ESP32C3]
platform = espressif32 @ 6.1.0
platform = espressif32 @ 6.5.0
platform_packages =
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
build_flags =
${env.build_flags}
-DESP32C3
Expand Down
14 changes: 10 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ build_flags =

; Enable -O2 GCC optimization
-O2
-std=gnu++17
-std=gnu++2a

build_unflags = -Os -std=gnu++11
build_unflags = -Os -std=gnu++11 -std=gnu++17

; If you want to enable OTA Updates, uncomment and set OTA password here and in credentials.h
; You can set upload_port to device's ip after it's set up for the first time
Expand Down Expand Up @@ -80,7 +80,10 @@ upload_speed = 921600
; Uncomment below if you want to build for esp32
; Check your board name at https://docs.platformio.org/en/latest/platforms/espressif32.html#boards
; [env:esp32]
; platform = espressif32 @ 6.1.0
; platform = espressif32 @ 6.5.0
; platform_packages =
unlogisch04 marked this conversation as resolved.
Show resolved Hide resolved
; platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3
; platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
; board = esp32dev
; Comment out this line below if you have any trouble uploading the firmware - and if it has a CP2102 on it (a square chip next to the usb port): change to 3000000 (3 million) for even faster upload speed
;upload_speed = 921600
Expand All @@ -95,7 +98,10 @@ upload_speed = 921600
; -DARDUINO_USB_CDC_ON_BOOT=1

;[env:esp32c3]
;platform = espressif32 @ 6.1.0
;platform = espressif32 @ 6.5.0
;platform_packages =
; platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.0-alpha3
; platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
;build_flags =
; ${env.build_flags}
; -DESP32C3
Expand Down
Loading
Loading