Skip to content

Commit

Permalink
[imu] Fix Invensense V2 accelerometer DLPF config (#3152)
Browse files Browse the repository at this point in the history
  • Loading branch information
fvantienen committed Nov 2, 2023
1 parent 2ba164c commit 624214f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sw/airborne/peripherals/invensense2.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ static bool invensense2_config(struct invensense2_t *inv) {
/* Configure accelerometer */
uint8_t accel_config = 0;
if(inv->accel_dlpf != INVENSENSE2_ACCEL_DLPF_OFF)
accel_config |= BIT_ACCEL_DLPF_ENABLE | ((inv->accel_dlpf - 1) << ACCEL_DLPF_CFG_SHIFT);
accel_config |= BIT_ACCEL_DLPF_ENABLE | (inv->accel_dlpf << ACCEL_DLPF_CFG_SHIFT);
if((inv->device == INVENSENSE2_ICM20649 && inv->accel_range > 0) || inv->accel_range > 3)
accel_config |= (inv->accel_range - 1) << ACCEL_FS_SEL_SHIFT;
else
Expand Down

0 comments on commit 624214f

Please sign in to comment.