From aef64fcb1790d44fcfaadcf2ff979c859e50f62a Mon Sep 17 00:00:00 2001 From: Thomas Stranger Date: Thu, 25 Nov 2021 09:44:41 +0100 Subject: [PATCH] drivers: sensor: shtcx: fix This commit fixes humidity value and model dependent timing parameters. Signed-off-by: Thomas Stranger --- drivers/sensor/shtcx/shtcx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/sensor/shtcx/shtcx.c b/drivers/sensor/shtcx/shtcx.c index 43b264c1a3a..7e51aa44e0c 100644 --- a/drivers/sensor/shtcx/shtcx.c +++ b/drivers/sensor/shtcx/shtcx.c @@ -27,10 +27,10 @@ static const uint16_t measure_cmd[2][2] = { /* measure_wait_us[shtcx_chip][MEASURE_MODE] */ static const uint16_t measure_wait_us[2][2] = { - /* shtc3: 12.1ms, 0.8ms */ - { 1210, 800 }, /* shtc3 */ /* shtc1: 14.4ms, 0.94ms */ { 14400, 940 }, /* shtc1 */ + /* shtc3: 12.1ms, 0.8ms */ + { 1210, 800 }, /* shtc3 */ }; /* @@ -176,7 +176,7 @@ static int shtcx_channel_get(const struct device *dev, if (chan == SENSOR_CHAN_AMBIENT_TEMP) { shtcx_temperature_from_raw(data->sample.temp, val); } else if (chan == SENSOR_CHAN_HUMIDITY) { - shtcx_humidity_from_raw(data->sample.temp, val); + shtcx_humidity_from_raw(data->sample.humidity, val); } else { return -ENOTSUP; }