Skip to content

Commit

Permalink
drivers: sensor: icp10125 fix double-promotion warnings
Browse files Browse the repository at this point in the history
sensor_value_from_double was used, but sensor_value_from_float
should be used as the parameter is a float

Signed-off-by: Ryan McClelland <[email protected]>
  • Loading branch information
XenuIsWatching authored and mbolivar-ampere committed Aug 7, 2023
1 parent 37da312 commit cea56b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/sensor/icp10125/icp10125.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,13 @@ static int icp10125_sample_fetch(const struct device *dev, const enum sensor_cha

static void icp10125_convert_press_value(struct icp10125_data *data, struct sensor_value *val)
{
sensor_value_from_double(val, icp10125_calc_calibrated_press(data) / 1000.f);
sensor_value_from_float(val, icp10125_calc_calibrated_press(data) / 1000.f);
}

static void icp10125_convert_ambient_temp_value(struct icp10125_data *data,
struct sensor_value *val)
{
sensor_value_from_double(val, icp10125_calc_calibrated_ambient_temp(data));
sensor_value_from_float(val, icp10125_calc_calibrated_ambient_temp(data));
}

static int icp10125_channel_get(const struct device *dev, enum sensor_channel chan,
Expand Down

0 comments on commit cea56b0

Please sign in to comment.