]> sigrok.org Git - libsigrok.git/commitdiff
output: also print meta strings in analog output module
authorGerhard Sittig <redacted>
Wed, 1 May 2019 18:28:50 +0000 (20:28 +0200)
committerGerhard Sittig <redacted>
Sun, 9 Jun 2019 12:51:02 +0000 (14:51 +0200)
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

index 6632cda68844fc631e8ac1143af6dd2b7119e5ab..5c624e050033729273b0972fb4c6c580cecd80c8 100644 (file)
@@ -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");
                }