X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Foutput%2Fbits.c;h=c3f2ef32dc26c53abf916c86b81d4c00eae07bcd;hb=5e5fde6e2c3aabfc61bcd35a53ab0d401b2176ba;hp=768a985ed84efe134cfedd091cd2810f3fb633a7;hpb=b20eb52055042a1a1dd61d928a3f3a4b706c7d01;p=libsigrok.git diff --git a/src/output/bits.c b/src/output/bits.c index 768a985e..c3f2ef32 100644 --- a/src/output/bits.c +++ b/src/output/bits.c @@ -168,6 +168,11 @@ static int receive(const struct sr_output *o, const struct sr_datafeed_packet *p g_string_append_len(*out, ctx->lines[j]->str, ctx->lines[j]->len); g_string_append_c(*out, '\n'); if (j == ctx->num_enabled_channels - 1 && ctx->trigger > -1) { + /* + * Sample data lines have one character per bit, + * plus one separator per byte. Align trigger marker + * to this layout. + */ offset = ctx->trigger + ctx->trigger / 8; g_string_append_printf(*out, "T:%*s^ %d\n", offset, "", ctx->trigger); ctx->trigger = -1;