Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit f6f227b
Author: unlogisch04 <[email protected]>
Date:   Mon May 6 22:00:58 2024 +0200

    L0ud sfusion1 (#6)

    * Update readme to mention BMI270 support.

    * Soft fusion sensor initial code, wip

    * Soft fusion ICM-42688-P lazy WIP implementation.

    * sfusion: Cleanup, implemented sensor frequency calibration

    * icm42688: add more comments, basic driver (no hw filtering) should be working

    * sfustion: compilation fix

    * sfusion: start calibration when upside down

    * cleanup: remove confusing had data flag

    * sensor manager: use unique_ptr instead of raw pointers

    * sfusion: big refactoring wip

    * sfusion: make aux work, at least sfusion sensors should now be functional

    * sfusion: lightweight implementation of BMI270 sensor, no sensitivity cal yet

    * sfusion: BMI270: added CRT and gyro zx factor. should be functionally equivalent to the old driver

    * Added lsm6dsv

    * Trying to work around esp32c3 compilation problem, not liking that solution

    * sfusion: fix problems found after rebase

    * Update README.md

    * Bump Arduino core to 3.0 to match GCC12

    * Remove fast pin swapping that is no longer compatible with arduino core v3

    * Bring back fast pin swapping

    * Update platformio-tools.ini

    * Fix accel timescale (calibration no longer takes forever)

    * Fix non-sfusion sensors

    * Added LSM6DSO and DSR support and refactored DSV support

    * Removed template float param from the implementation

    * sfusion: port MPU6050 driver wip, not expecting to be functional yet

    * sfusion: add headers specifying main code owners

    * connection: fix warning

    * update README.md

    * fshelper: fixed ESP8266 regression caused by abstracting FS access

    * sfusion: fix error on merge

    * bno080: differentiate bno080, bno085, bno086 again

    * sfusion: final touches

    * restore hadData functionality, implementing it in every sensor, made configured flag bno-only

    * fix address supplement in non-sfusion sensors, do i2c bus reset for all sensors

    * sfusion: make MPU6050 driver use normal MPU6050 ImuID, change eatSamplesAndReturn function to take ms instead of seconds

    * sfusion: hotfix, don't apply sensorOffset, it's applied in sensor base

    ---------

    Co-authored-by: Przemysław Romaniak <[email protected]>
    Co-authored-by: Gorbit99 <[email protected]>
    Co-authored-by: nekomona <[email protected]>
    Co-authored-by: nekomona <[email protected]>
    Co-authored-by: kounocom <[email protected]>
    Co-authored-by: Przemyslaw Romaniak <[email protected]>

commit 4157ab9
Author: unlogisch04 <[email protected]>
Date:   Mon May 6 21:34:53 2024 +0200

    add macro for calculating radians (#4)

    * feat: add macro for calculating radians

    * style: silence unused variable warning

    * remove unnecessary float cast in macro

    ---------

    Co-authored-by: Pespiri <[email protected]>
    Co-authored-by: Fredrik Hatletvedt <[email protected]>

commit 3ae17ab
Author: Meia Kouno <[email protected]>
Date:   Sun May 5 02:35:22 2024 +0300

    Fix enabling motion bias estimation (SlimeVR#325)

commit d71c65c
Author: unlogisch04 <[email protected]>
Date:   Sat May 4 19:04:08 2024 +0200

     fshelper: fixed ESP8266 regression caused by abstracting FS access SlimeVR#321 (SlimeVR#328)

    * fshelper: fixed ESP8266 regression caused by abstracting FS access SlimeVR#321

    * Removing not needed ifdef

    l0ud spotted that this is not need.

    Co-Authored-By: Przemyslaw Romaniak <[email protected]>

    ---------

    Co-authored-by: Przemyslaw Romaniak <[email protected]>
  • Loading branch information
unlogisch04 committed May 7, 2024
1 parent 8015b00 commit e3e381f
Show file tree
Hide file tree
Showing 52 changed files with 2,823 additions and 960 deletions.
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 =
; 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
7 changes: 1 addition & 6 deletions src/FSHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,9 @@ bool ensureDirectory(const char* directory) {
}
}

#ifdef ESP32
auto dir = LittleFS.open(directory);
auto dir = LittleFS.open(directory, "r");
auto isDirectory = dir.isDirectory();
dir.close();
#else
auto dir = LittleFS.openDir(directory);
auto isDirectory = dir.isDirectory();
#endif

if (!isDirectory) {
if (!LittleFS.remove(directory)) {
Expand Down
Loading

0 comments on commit e3e381f

Please sign in to comment.