Skip to content

Commit

Permalink
Convert MPU No-DMP sensor type to normal one to correctly display in …
Browse files Browse the repository at this point in the history
…server
  • Loading branch information
furrycoding committed Jan 14, 2024
1 parent 7291baf commit 1296ab2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/sensors/mpu6050sensor_nodmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ struct fifo_sample {

void MPU6050NoDMPSensor::motionSetup()
{
switch (sensorType) {
case IMU_MPU6050_NODMP:
sensorType = IMU_MPU6050;
break;
case IMU_MPU6500_NODMP:
sensorType = IMU_MPU6500;
break;
default:
m_Logger.warn("MPU6050 No-DMP driver used with unknown IMU type - this shouldn't happen!");
}

imu.initialize(addr);
if (!imu.testConnection())
{
Expand Down

0 comments on commit 1296ab2

Please sign in to comment.