From: Bert Vermeulen Date: Sun, 31 Mar 2013 08:21:11 +0000 (+0200) Subject: More GVariant conversions X-Git-Tag: sigrok-cli-0.4.0~18 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f73128e45d33debfa0ca99aec564c3768e98090f;p=sigrok-cli.git More GVariant conversions --- diff --git a/sigrok-cli.c b/sigrok-cli.c index f0e2bd6..d21ae1c 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -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) {