]> sigrok.org Git - libsigrok.git/commitdiff
sr: output up to 12 significant digits for floats
authorBert Vermeulen <redacted>
Sun, 2 Sep 2012 13:41:19 +0000 (15:41 +0200)
committerBert Vermeulen <redacted>
Sun, 2 Sep 2012 13:42:56 +0000 (15:42 +0200)
output/float.c

index 650decc793532d0cd92310bba7db5e180b32a5f7..5c9631f4b2844007b90f094523a769a30b8f8656 100644 (file)
@@ -126,7 +126,7 @@ static int data(struct sr_output *o, const uint8_t *data_in,
        max = length_in / sizeof(float);
        for (i = 0; i < max;) {
                for (j = 0; j < ctx->num_enabled_probes; j++) {
-                       g_string_append_printf(outstr, "%s: %f\n",
+                       g_string_append_printf(outstr, "%s: %.12f\n",
                                        (char *)g_ptr_array_index(ctx->probelist, j),
                                        fdata[i++]);
                }