]> sigrok.org Git - libsigrok.git/commitdiff
demo: Fix square pattern output shorter than other patterns.
authorAurelien Jacobs <redacted>
Mon, 17 Nov 2014 10:40:22 +0000 (11:40 +0100)
committerBert Vermeulen <redacted>
Mon, 17 Nov 2014 12:39:53 +0000 (13:39 +0100)
src/hardware/demo/demo.c

index f06e879342cdcae2dea1946df4fd78f5f9e9ce71..42d1d7888d4f02ecd4d181c6bd7fdb7f068d98a4 100644 (file)
@@ -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;