summaryrefslogtreecommitdiff
path: root/src/bin/eeze
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2013-04-17 13:11:10 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2013-04-18 15:50:40 +0100
commit1316de8fd3afbe067ffdfc31900c76640b252e12 (patch)
tree8db189913f9c7e0ad88d68d40e73046700f807a3 /src/bin/eeze
parent0d078be2078445e621311b17a2056825996846d9 (diff)
eeze/sensor: Add temperature sensor to my testing code
Diffstat (limited to 'src/bin/eeze')
-rw-r--r--src/bin/eeze/eeze_sensor_test.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/bin/eeze/eeze_sensor_test.c b/src/bin/eeze/eeze_sensor_test.c
index 56eae9f850..dcf6991e87 100644
--- a/src/bin/eeze/eeze_sensor_test.c
+++ b/src/bin/eeze/eeze_sensor_test.c
@@ -141,7 +141,19 @@ main(void)
141 else 141 else
142 printf("Could not find a light sensor!\n"); 142 printf("Could not find a light sensor!\n");
143 143
144 printf("=== Test snyc read update: ===\n"); 144 sens = eeze_sensor_new(EEZE_SENSOR_TYPE_TEMPERATURE);
145 if (sens)
146 {
147 if (!eeze_sensor_x_get(sens, &x)) printf("fail get x\n");
148 if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n");
149 if (!eeze_sensor_timestamp_get(sens, &timestamp)) printf("fail get timestamp\n");
150 printf("Temperature output: accuracy %i, temperature %f °C at time: %f\n", acc, x, timestamp);
151 eeze_sensor_free(sens);
152 }
153 else
154 printf("Could not find a temperature sensor!\n");
155
156 printf("=== Test sync read update: ===\n");
145 /* Get updated values on a sensor. This readout is synchronous. This way we 157 /* Get updated values on a sensor. This readout is synchronous. This way we
146 * can force a read out of the physical sensor instead of using the cached 158 * can force a read out of the physical sensor instead of using the cached
147 * values. Depending on the hardware this can take a long time. If you don't have special 159 * values. Depending on the hardware this can take a long time. If you don't have special