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 <milivojevicvoja@yahoo.com>
This commit is contained in:
parent
e4ed1d32be
commit
fcfb1d9872
|
@ -353,7 +353,7 @@ static int bmm150_channel_get(const struct device *dev,
|
|||
bmm150_convert(val, drv_data->sample_y);
|
||||
break;
|
||||
case SENSOR_CHAN_MAGN_Z:
|
||||
bmm150_convert(val, drv_data->sample_x);
|
||||
bmm150_convert(val, drv_data->sample_z);
|
||||
break;
|
||||
case SENSOR_CHAN_MAGN_XYZ:
|
||||
bmm150_convert(val, drv_data->sample_x);
|
||||
|
|
Loading…
Reference in a new issue