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

BMI220 firmware support #357

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
2 changes: 2 additions & 0 deletions src/consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ enum class ImuID {
BMI160,
ICM20948,
ICM42688,
BMI220,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put new sensor at the end, regardless of alphabetical order, server expects particular ID.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for interrupting, I will change it later

BMI270,
LSM6DS3TRC,
LSM6DSV,
Expand All @@ -57,6 +58,7 @@ enum class ImuID {
#define IMU_ICM20948 ICM20948Sensor
#define IMU_ICM42688 SoftFusionICM42688
#define IMU_BMI270 SoftFusionBMI270
#define IMU_BMI220 SoftFusionBMI220
#define IMU_LSM6DS3TRC SoftFusionLSM6DS3TRC
#define IMU_LSM6DSV SoftFusionLSM6DSV
#define IMU_LSM6DSO SoftFusionLSM6DSO
Expand Down
2 changes: 2 additions & 0 deletions src/sensors/SensorManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "softfusion/drivers/lsm6ds3trc.h"
#include "softfusion/drivers/icm42688.h"
#include "softfusion/drivers/bmi270.h"
#include "softfusion/drivers/bmi220.h"
#include "softfusion/drivers/lsm6dsv.h"
#include "softfusion/drivers/lsm6dso.h"
#include "softfusion/drivers/lsm6dsr.h"
Expand All @@ -52,6 +53,7 @@ namespace SlimeVR
using SoftFusionLSM6DS3TRC = SoftFusionSensor<SoftFusion::Drivers::LSM6DS3TRC, SoftFusion::I2CImpl>;
using SoftFusionICM42688 = SoftFusionSensor<SoftFusion::Drivers::ICM42688, SoftFusion::I2CImpl>;
using SoftFusionBMI270 = SoftFusionSensor<SoftFusion::Drivers::BMI270, SoftFusion::I2CImpl>;
using SoftFusionBMI220 = SoftFusionSensor<SoftFusion::Drivers::BMI220, SoftFusion::I2CImpl>;
using SoftFusionLSM6DSV = SoftFusionSensor<SoftFusion::Drivers::LSM6DSV, SoftFusion::I2CImpl>;
using SoftFusionLSM6DSO = SoftFusionSensor<SoftFusion::Drivers::LSM6DSO, SoftFusion::I2CImpl>;
using SoftFusionLSM6DSR = SoftFusionSensor<SoftFusion::Drivers::LSM6DSR, SoftFusion::I2CImpl>;
Expand Down
2 changes: 2 additions & 0 deletions src/sensors/sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ const char * getIMUNameByType(ImuID imuType) {
return "ICM42688";
case ImuID::BMI270:
return "BMI270";
case ImuID::BMI220:
return "BMI220";
case ImuID::LSM6DS3TRC:
return "LSM6DS3TRC";
case ImuID::LSM6DSV:
Expand Down
Loading