Skip to content

Commit

Permalink
Merge pull request #151 from sparkfun/release_candidate
Browse files Browse the repository at this point in the history
v1.3.0 - resolves issue #150
  • Loading branch information
PaulZC authored Nov 11, 2024
2 parents 168c18b + 2fdf703 commit 9caa80c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library
version=1.2.13
version=1.3.0
author=SparkFun Electronics <techsupport@sparkfun.com>
maintainer=SparkFun Electronics <sparkfun.com>
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™).
Expand Down
10 changes: 7 additions & 3 deletions src/util/ICM_20948_C.c
Original file line number Diff line number Diff line change
Expand Up @@ -1793,17 +1793,21 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor(ICM_20948_Device_t *pdev, enum
}
// Also check which bits need to be set in the Data Ready Status and Motion Event Control registers
// Compare to INV_NEEDS_ACCEL_MASK, INV_NEEDS_GYRO_MASK and INV_NEEDS_COMPASS_MASK
if (((androidSensorAsBitMask & INV_NEEDS_ACCEL_MASK) > 0) || ((androidSensorAsBitMask & INV_NEEDS_ACCEL_MASK1) > 0))
// See issue #150 - thank you @dobodu
if (((pdev->_enabled_Android_0 & androidSensorAsBitMask & INV_NEEDS_ACCEL_MASK) > 0)
|| ((pdev->_enabled_Android_1 & androidSensorAsBitMask & INV_NEEDS_ACCEL_MASK1) > 0))
{
data_rdy_status |= DMP_Data_ready_Accel;
inv_event_control |= DMP_Motion_Event_Control_Accel_Calibr;
}
if (((androidSensorAsBitMask & INV_NEEDS_GYRO_MASK) > 0) || ((androidSensorAsBitMask & INV_NEEDS_GYRO_MASK1) > 0))
if (((pdev->_enabled_Android_0 & androidSensorAsBitMask & INV_NEEDS_GYRO_MASK) > 0)
|| ((pdev->_enabled_Android_1 & androidSensorAsBitMask & INV_NEEDS_GYRO_MASK1) > 0))
{
data_rdy_status |= DMP_Data_ready_Gyro;
inv_event_control |= DMP_Motion_Event_Control_Gyro_Calibr;
}
if (((androidSensorAsBitMask & INV_NEEDS_COMPASS_MASK) > 0) || ((androidSensorAsBitMask & INV_NEEDS_COMPASS_MASK1) > 0))
if (((pdev->_enabled_Android_0 & androidSensorAsBitMask & INV_NEEDS_COMPASS_MASK) > 0)
|| ((pdev->_enabled_Android_1 & androidSensorAsBitMask & INV_NEEDS_COMPASS_MASK1) > 0))
{
data_rdy_status |= DMP_Data_ready_Secondary_Compass;
inv_event_control |= DMP_Motion_Event_Control_Compass_Calibr;
Expand Down

0 comments on commit 9caa80c

Please sign in to comment.