summaryrefslogtreecommitdiff
path: root/samples/sensor/thermometer/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/sensor/thermometer/src/main.c')
-rw-r--r--samples/sensor/thermometer/src/main.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/samples/sensor/thermometer/src/main.c b/samples/sensor/thermometer/src/main.c
index e368978cc..560c4fc60 100644
--- a/samples/sensor/thermometer/src/main.c
+++ b/samples/sensor/thermometer/src/main.c
@@ -20,13 +20,7 @@
static double convert_to_double(struct sensor_value *v)
{
- switch (v->type) {
- case SENSOR_VALUE_TYPE_INT_PLUS_MICRO:
- return v->val1 + ((double)v->val2 / 1000000);
- case SENSOR_VALUE_TYPE_DOUBLE:
- return v->dval;
- }
- return 0;
+ return v->val1 + ((double)v->val2 / 1000000);
}
void main(void)