Skip to content

Commit

Permalink
drivers: sensor: mpu9250: fix mismatched value in log message
Browse files Browse the repository at this point in the history
The print message prints cfg->accel_fs when cfg->gyro_fs is too big.

Signed-off-by: Han Wu <wuhanstudio@qq.com>
  • Loading branch information
wuhanstudio authored and aescolar committed Oct 9, 2024
1 parent 0a56dc8 commit 1726443
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/sensor/tdk/mpu9250/mpu9250.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ static int mpu9250_init(const struct device *dev)
drv_data->accel_sensitivity_shift = 14 - cfg->accel_fs;

if (cfg->gyro_fs > MPU9250_GYRO_FS_MAX) {
LOG_ERR("Gyro FS is too big: %d", cfg->accel_fs);
LOG_ERR("Gyro FS is too big: %d", cfg->gyro_fs);
return -EINVAL;
}

Expand Down

0 comments on commit 1726443

Please sign in to comment.