]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/demo/demo.c
demo: Fix square pattern output shorter than other patterns.
[libsigrok.git] / 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;