Skip to content

Commit

Permalink
drivers: sensor: lsm6dsv16x: fix gyro range
Browse files Browse the repository at this point in the history
The range and sensitivity tables don't match the datasheet
or the DTS binding file.  This changes the array lookup tables
to match the datasheet and binding file.

Signed-off-by: Mike Voytovich <[email protected]>
  • Loading branch information
mikevoyt authored and MaureenHelm committed Dec 4, 2023
1 parent 3832c67 commit 3c2a896
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/sensor/lsm6dsv16x/lsm6dsv16x.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ static int lsm6dsv16x_accel_range_to_fs_val(int32_t range)
return -EINVAL;
}

static const uint16_t lsm6dsv16x_gyro_fs_map[] = {250, 125, 500, 0, 1000, 0, 2000};
static const uint16_t lsm6dsv16x_gyro_fs_sens[] = {2, 1, 4, 0, 8, 0, 16};
static const uint16_t lsm6dsv16x_gyro_fs_map[] = {125, 250, 500, 1000, 2000, 0, 0,
0, 0, 0, 0, 0, 4000};
static const uint16_t lsm6dsv16x_gyro_fs_sens[] = {1, 2, 4, 8, 16, 0, 0, 0, 0, 0, 0, 0, 32};

static int lsm6dsv16x_gyro_range_to_fs_val(int32_t range)
{
Expand Down

0 comments on commit 3c2a896

Please sign in to comment.