diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-08 13:56:00 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-08 13:56:00 +0100 |
commit | c7b0d014b3a568ceb2db5d582a57cb7002face5e (patch) | |
tree | 7d2faff2da40e016b1980472d96e6d6fc1afab40 /test | |
parent | 3804fd2355997cc5d2b811ffcbc546a367aa2b48 (diff) | |
download | uca-c7b0d014b3a568ceb2db5d582a57cb7002face5e.tar.gz uca-c7b0d014b3a568ceb2db5d582a57cb7002face5e.tar.bz2 uca-c7b0d014b3a568ceb2db5d582a57cb7002face5e.tar.xz uca-c7b0d014b3a568ceb2db5d582a57cb7002face5e.zip |
Add more offset properties
Diffstat (limited to 'test')
-rw-r--r-- | test/control.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/control.c b/test/control.c index baf6ee2..5444755 100644 --- a/test/control.c +++ b/test/control.c @@ -144,18 +144,19 @@ void fill_tree_store(GtkTreeStore *tree_store, struct uca_camera_t *cam) for (int prop_id = 0; prop_id < UCA_PROP_LAST; prop_id++) { property = uca_get_full_property(prop_id); + uint32_t result = UCA_NO_ERROR; switch (property->type) { case uca_string: - cam->get_property(cam, prop_id, value_string); + result = cam->get_property(cam, prop_id, value_string); break; case uca_uint8t: - cam->get_property(cam, prop_id, &value_8); + result = cam->get_property(cam, prop_id, &value_8); g_sprintf(value_string, "%d", value_8); break; case uca_uint32t: - cam->get_property(cam, prop_id, &value_32); + result = cam->get_property(cam, prop_id, &value_32); g_sprintf(value_string, "%d", value_32); break; } @@ -165,6 +166,9 @@ void fill_tree_store(GtkTreeStore *tree_store, struct uca_camera_t *cam) get_first_level_root(tree_store, &iter, tokens[0]); find_recursively(tree_store, &iter, &child, tokens, 1); + if (result == UCA_ERR_PROP_INVALID) + g_sprintf(value_string, "n/a"); + int count = 0; while (tokens[count++] != NULL); |