]> sigrok.org Git - libsigrok.git/commitdiff
Fix initial sample value for demo driver
authorSven Schnelle <redacted>
Tue, 14 Feb 2017 22:30:13 +0000 (23:30 +0100)
committerSven Schnelle <redacted>
Tue, 14 Feb 2017 22:32:45 +0000 (23:32 +0100)
devc->step is not reset on acquistion start, so acquisition
starts with a different value every time. Thats annoying when
using the demo driver to debug sigrok, so lets make sure that
it's reset to 0.

Signed-off-by: Sven Schnelle <redacted>
src/hardware/demo/api.c

index 96f5c07818b114e726a9d164f2576cd147667f83..c6c27e3c0b8b7fb619b2224fc69eba6646ed403d 100644 (file)
@@ -472,6 +472,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        /* We use this timestamp to decide how many more samples to send. */
        devc->start_us = g_get_monotonic_time();
        devc->spent_us = 0;
+       devc->step = 0;
 
        return SR_OK;
 }