driver/sensor: lis2mdl: Fix the temperature fractional value
The temperature fractional value has to be assigned multiplied by 10^6. Signed-off-by: Armando Visconti <armando.visconti@st.com>
This commit is contained in:
parent
3a7c37ab29
commit
89199dcbaf
@ -148,7 +148,7 @@ static void lis2mdl_channel_get_temp(struct device *dev,
|
||||
struct lis2mdl_data *drv_data = dev->driver_data;
|
||||
|
||||
val->val1 = drv_data->temp_sample / 100;
|
||||
val->val2 = drv_data->temp_sample % 100;
|
||||
val->val2 = (drv_data->temp_sample % 100) * 10000;
|
||||
}
|
||||
|
||||
static int lis2mdl_channel_get(struct device *dev, enum sensor_channel chan,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user