X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Foutput%2Fascii.c;h=3962fe9d80215fcde193e5556d78c3ab70f3ded1;hp=d0d40b6f25089efb35b42e4464131a0bdb65afcc;hb=67b345b981a581731435f490dfbf7b13d8b1d5a9;hpb=769561cbe9ff04e02502832cae676fc591716866 diff --git a/src/output/ascii.c b/src/output/ascii.c index d0d40b6f..3962fe9d 100644 --- a/src/output/ascii.c +++ b/src/output/ascii.c @@ -199,7 +199,13 @@ 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) { - offset = ctx->trigger + ctx->trigger / 8; + /* + * 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. + */ + offset = ctx->trigger; g_string_append_printf(*out, "T:%*s^ %d\n", offset, "", ctx->trigger); ctx->trigger = -1; }