[aravis/dom] arv-tool: show min/max for integer and float nodes in 'control' command.



commit 8686808f519cf494f6671ede9cc51026675272fe
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Fri Mar 2 15:28:18 2012 +0100

    arv-tool: show min/max for integer and float nodes in 'control' command.

 src/arvtool.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/src/arvtool.c b/src/arvtool.c
index e68cb6b..cdb9f58 100644
--- a/src/arvtool.c
+++ b/src/arvtool.c
@@ -138,8 +138,22 @@ arv_tool_execute_command (int argc, char **argv, const char *device_name)
 							arv_gc_feature_node_set_value_from_string (ARV_GC_FEATURE_NODE (feature),
 												   tokens[1]);
 
-						printf ("%s = %s\n", tokens[0],
-							arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (feature)));
+						if (ARV_IS_GC_INTEGER (feature))
+							printf ("%s = %" G_GINT64_FORMAT
+								" (min:%" G_GINT64_FORMAT 
+								"-max:%" G_GINT64_FORMAT
+								")\n", tokens[0],
+								arv_gc_integer_get_value (ARV_GC_INTEGER (feature)),
+								arv_gc_integer_get_min (ARV_GC_INTEGER (feature)),
+								arv_gc_integer_get_max (ARV_GC_INTEGER (feature)));
+						else if (ARV_IS_GC_FLOAT (feature))
+							printf ("%s = %g (min:%g-max:%g)\n", tokens[0],
+								arv_gc_float_get_value (ARV_GC_FLOAT (feature)),
+								arv_gc_float_get_min (ARV_GC_FLOAT (feature)),
+								arv_gc_float_get_max (ARV_GC_FLOAT (feature)));
+						else
+							printf ("%s = %s\n", tokens[0],
+								arv_gc_feature_node_get_value_as_string (ARV_GC_FEATURE_NODE (feature)));
 					}
 				}
 			g_strfreev (tokens);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]