diff options
author | Bogdan Davidoaia <bogdan.davidoaia@linaro.org> | 2017-01-12 15:28:25 +0200 |
---|---|---|
committer | Anas Nashif <nashif@linux.intel.com> | 2017-01-15 01:09:33 +0000 |
commit | 30162aedf103479817faaf26fd7ddb56b6fc60b3 (patch) | |
tree | e66eeaa817e0f9209492ebe6f9a9c118ca7fa64a /drivers/grove | |
parent | 662a2d64761ae51d094344d48e1f193ded53ef82 (diff) |
sensor: remove sensor value type
Remove the type field from the sensor value structure. All values will
have the type previously defined by SENSOR_VALUE_TYPE_INT_PLUS_MICRO.
This simplifies the interface, as apps will know what value type to
expect. Apps that prefer to use double values can optain them using the
sensor_value_to_double function.
Change-Id: I3588d74258030eb16c3f89d8eead13cca4606b18
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
Diffstat (limited to 'drivers/grove')
-rw-r--r-- | drivers/grove/light_sensor.c | 1 | ||||
-rw-r--r-- | drivers/grove/temperature_sensor.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/drivers/grove/light_sensor.c b/drivers/grove/light_sensor.c index f5841cb0d..4872f1046 100644 --- a/drivers/grove/light_sensor.c +++ b/drivers/grove/light_sensor.c @@ -59,7 +59,6 @@ static int gls_channel_get(struct device *dev, ldr_val = (1023.0 - analog_val) * 10.0 / analog_val; dval = 10000.0 / pow(ldr_val * 15.0, 4.0/3.0); - val->type = SENSOR_VALUE_TYPE_INT_PLUS_MICRO; val->val1 = (int32_t)dval; val->val2 = ((int32_t)(dval * 1000000)) % 1000000; diff --git a/drivers/grove/temperature_sensor.c b/drivers/grove/temperature_sensor.c index 1b56f1b7d..b978f43ff 100644 --- a/drivers/grove/temperature_sensor.c +++ b/drivers/grove/temperature_sensor.c @@ -66,7 +66,6 @@ static int gts_channel_get(struct device *dev, dval = 1 / (log(1023.0 / analog_val - 1.0) / B_CONST + 1 / 298.15) - 273.15; - val->type = SENSOR_VALUE_TYPE_INT_PLUS_MICRO; val->val1 = (int32_t)dval; val->val2 = ((int32_t)(dval * 1000000)) % 1000000; |