]> sigrok.org Git - libsigrok.git/blobdiff - src/output/ascii.c
output: simplify trigger marker position calculation (readability)
[libsigrok.git] / src / output / ascii.c
index 3962fe9d80215fcde193e5556d78c3ab70f3ded1..9e04e768502a3e817048b8a7a34780e065c5b3ab 100644 (file)
@@ -200,10 +200,9 @@ static int receive(const struct sr_output *o, const struct sr_datafeed_packet *p
                                        g_string_append_c(*out, '\n');
                                        if (j == ctx->num_enabled_channels - 1 && ctx->trigger > -1) {
                                                /*
-                                                * Each group of 8 bits occupies 8 bit positions
-                                                * and no separator. With this dense presentation
-                                                * the "calculation" of the trigger position is
-                                                * rather straight forward.
+                                                * Sample data lines have one character per bit and
+                                                * no separator between bytes. Align trigger marker
+                                                * to this layout.
                                                 */
                                                offset = ctx->trigger;
                                                g_string_append_printf(*out, "T:%*s^ %d\n", offset, "", ctx->trigger);