From e86cc12b66a4d1e24224cd5a766c4426d17fa56a Mon Sep 17 00:00:00 2001 From: Gerhard Sittig Date: Wed, 1 May 2019 20:28:50 +0200 Subject: [PATCH] output: also print meta strings in analog output module Meta packets not only communicate numbers, but also strings. Print them. This unbreaks the reflection of LCR meters' equivalent circuit model. --- src/output/analog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/output/analog.c b/src/output/analog.c index 6632cda6..5c624e05 100644 --- a/src/output/analog.c +++ b/src/output/analog.c @@ -118,6 +118,9 @@ static int receive(const struct sr_output *o, const struct sr_datafeed_packet *p g_string_append_printf(*out, "%" G_GUINT64_FORMAT, g_variant_get_uint64(src->data)); + } else if (srci->datatype == SR_T_STRING) { + g_string_append_printf(*out, "%s", + g_variant_get_string(src->data, NULL)); } g_string_append(*out, "\n"); }