summaryrefslogtreecommitdiff
path: root/src/bin/eeze
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2013-03-27 12:03:32 +0000
committerStefan Schmidt <s.schmidt@samsung.com>2013-03-27 13:14:21 +0000
commit2613394b66d1188139cfdefe3be86202a96bd201 (patch)
tree62b2904fd9aab77ede925e86474a903207d1f9c8 /src/bin/eeze
parent2063e4353d86bdd89d66f6aca69a480f92254b93 (diff)
eeze/sensor: Create a new sensor object for the async test.
Its a demo so we should do all the steps and create a new object instead of re-using the other one.
Diffstat (limited to 'src/bin/eeze')
-rw-r--r--src/bin/eeze/eeze_sensor_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/eeze/eeze_sensor_test.c b/src/bin/eeze/eeze_sensor_test.c
index 0a1fc949ed..67dca6c236 100644
--- a/src/bin/eeze/eeze_sensor_test.c
+++ b/src/bin/eeze/eeze_sensor_test.c
@@ -136,6 +136,7 @@ main(void)
136 if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n"); 136 if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n");
137 if (!eeze_sensor_timestamp_get(sens, &timestamp)) printf("fail get timestamp\n"); 137 if (!eeze_sensor_timestamp_get(sens, &timestamp)) printf("fail get timestamp\n");
138 printf("Light output: accuracy %i, lux %f at time: %lli\n", acc, x, timestamp); 138 printf("Light output: accuracy %i, lux %f at time: %lli\n", acc, x, timestamp);
139 eeze_sensor_free(sens);
139 } 140 }
140 else 141 else
141 printf("Could not find a light sensor!\n"); 142 printf("Could not find a light sensor!\n");
@@ -144,6 +145,7 @@ main(void)
144 * can force a read out of the physical sensor instead of using the cached 145 * can force a read out of the physical sensor instead of using the cached
145 * values. Depending on the hardware this can take a long time. If you don't have special 146 * values. Depending on the hardware this can take a long time. If you don't have special
146 * requirements the cached values should be used. */ 147 * requirements the cached values should be used. */
148 sens = eeze_sensor_new(EEZE_SENSOR_TYPE_LIGHT);
147 eeze_sensor_read(sens); 149 eeze_sensor_read(sens);
148 if (!sens) printf("can't find an light sensor!\n"); 150 if (!sens) printf("can't find an light sensor!\n");
149 if (!eeze_sensor_x_get(sens, &x)) printf("fail get x\n"); 151 if (!eeze_sensor_x_get(sens, &x)) printf("fail get x\n");