Skip to content

Commit 9caa80c

Browse files
authored
Merge pull request #151 from sparkfun/release_candidate
v1.3.0 - resolves issue #150
2 parents 168c18b + 2fdf703 commit 9caa80c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library
2-
version=1.2.13
2+
version=1.3.0
33
author=SparkFun Electronics <[email protected]>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Use the low-power high-resolution ICM 20948 9 DoF IMU from Invensense with I2C or SPI. Version 1.2 of the library includes support for the InvenSense Digital Motion Processor (DMP™).

src/util/ICM_20948_C.c

+7-3
Original file line numberDiff line numberDiff line change
@@ -1793,17 +1793,21 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor(ICM_20948_Device_t *pdev, enum
17931793
}
17941794
// Also check which bits need to be set in the Data Ready Status and Motion Event Control registers
17951795
// Compare to INV_NEEDS_ACCEL_MASK, INV_NEEDS_GYRO_MASK and INV_NEEDS_COMPASS_MASK
1796-
if (((androidSensorAsBitMask & INV_NEEDS_ACCEL_MASK) > 0) || ((androidSensorAsBitMask & INV_NEEDS_ACCEL_MASK1) > 0))
1796+
// See issue #150 - thank you @dobodu
1797+
if (((pdev->_enabled_Android_0 & androidSensorAsBitMask & INV_NEEDS_ACCEL_MASK) > 0)
1798+
|| ((pdev->_enabled_Android_1 & androidSensorAsBitMask & INV_NEEDS_ACCEL_MASK1) > 0))
17971799
{
17981800
data_rdy_status |= DMP_Data_ready_Accel;
17991801
inv_event_control |= DMP_Motion_Event_Control_Accel_Calibr;
18001802
}
1801-
if (((androidSensorAsBitMask & INV_NEEDS_GYRO_MASK) > 0) || ((androidSensorAsBitMask & INV_NEEDS_GYRO_MASK1) > 0))
1803+
if (((pdev->_enabled_Android_0 & androidSensorAsBitMask & INV_NEEDS_GYRO_MASK) > 0)
1804+
|| ((pdev->_enabled_Android_1 & androidSensorAsBitMask & INV_NEEDS_GYRO_MASK1) > 0))
18021805
{
18031806
data_rdy_status |= DMP_Data_ready_Gyro;
18041807
inv_event_control |= DMP_Motion_Event_Control_Gyro_Calibr;
18051808
}
1806-
if (((androidSensorAsBitMask & INV_NEEDS_COMPASS_MASK) > 0) || ((androidSensorAsBitMask & INV_NEEDS_COMPASS_MASK1) > 0))
1809+
if (((pdev->_enabled_Android_0 & androidSensorAsBitMask & INV_NEEDS_COMPASS_MASK) > 0)
1810+
|| ((pdev->_enabled_Android_1 & androidSensorAsBitMask & INV_NEEDS_COMPASS_MASK1) > 0))
18071811
{
18081812
data_rdy_status |= DMP_Data_ready_Secondary_Compass;
18091813
inv_event_control |= DMP_Motion_Event_Control_Compass_Calibr;

0 commit comments

Comments
 (0)