From: Aurelien Jacobs Date: Mon, 17 Nov 2014 10:40:22 +0000 (+0100) Subject: demo: Fix square pattern output shorter than other patterns. X-Git-Tag: libsigrok-0.4.0~766 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3772c04990d1f81ce3946b48034f441adaa13271;p=libsigrok.git demo: Fix square pattern output shorter than other patterns. --- diff --git a/src/hardware/demo/demo.c b/src/hardware/demo/demo.c index f06e8793..42d1d788 100644 --- a/src/hardware/demo/demo.c +++ b/src/hardware/demo/demo.c @@ -202,7 +202,7 @@ static void generate_analog_pattern(struct analog_gen *ag, uint64_t sample_rate) if (i % 5 == 0) value = -value; if (i % 10 == 0) - last_end = i - 1; + last_end = i; ag->pattern_data[i] = value; } ag->num_samples = last_end;