]> sigrok.org Git - sigrok-cli.git/commitdiff
More GVariant conversions
authorBert Vermeulen <redacted>
Sun, 31 Mar 2013 08:21:11 +0000 (10:21 +0200)
committerBert Vermeulen <redacted>
Sun, 31 Mar 2013 08:21:11 +0000 (10:21 +0200)
sigrok-cli.c

index f0e2bd68e124eab50329c4478468347431feda00..d21ae1c8da159ed293715720c1bae2425be91e4c 100644 (file)
@@ -461,11 +461,11 @@ static void show_dev_detail(void)
                                continue;
                        }
                        printf(" - supported time bases:\n");
-                       int32 = g_variant_get_fixed_array(gvar_list,
-                                       &num_elements, sizeof(int32_t));
+                       int64 = g_variant_get_fixed_array(gvar_list,
+                                       &num_elements, sizeof(uint64_t));
                        for (i = 0; i < num_elements / 2; i++)
                                printf("      %s\n", sr_period_string(
-                                               int32[i * 2] * int32[i * 2 + 1]));
+                                               int64[i * 2] * int64[i * 2 + 1]));
                        g_variant_unref(gvar_list);
 
                } else if (srci->key == SR_CONF_TRIGGER_SOURCE) {
@@ -505,11 +505,11 @@ static void show_dev_detail(void)
                                continue;
                        }
                        printf(" - supported volts/div:\n");
-                       int32 = g_variant_get_fixed_array(gvar_list,
-                                       &num_elements, sizeof(int32_t));
+                       int64 = g_variant_get_fixed_array(gvar_list,
+                                       &num_elements, sizeof(uint64_t));
                        for (i = 0; i < num_elements / 2; i++)
-                               printf("      %s\n", sr_period_string(
-                                               int32[i * 2] * int32[i * 2 + 1]));
+                               printf("      %s\n", sr_voltage_string(
+                                               int64[i * 2], int64[i * 2 + 1]));
                        g_variant_unref(gvar_list);
 
                } else if (srci->key == SR_CONF_COUPLING) {