Skip to content

Commit fcfb1d9

Browse files
VojislavMMaureenHelm
authored andcommitted
drivers: sensors: fix of sensor channel get for z axis
the correct value is returned when using sensor channel get function to read z-axis value Signed-off-by: Vojislav Milivojevic <[email protected]>
1 parent e4ed1d3 commit fcfb1d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/sensor/bmm150/bmm150.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static int bmm150_channel_get(const struct device *dev,
353353
bmm150_convert(val, drv_data->sample_y);
354354
break;
355355
case SENSOR_CHAN_MAGN_Z:
356-
bmm150_convert(val, drv_data->sample_x);
356+
bmm150_convert(val, drv_data->sample_z);
357357
break;
358358
case SENSOR_CHAN_MAGN_XYZ:
359359
bmm150_convert(val, drv_data->sample_x);

0 commit comments

Comments
 (0)