From: Sven Schnelle Date: Tue, 14 Feb 2017 22:30:13 +0000 (+0100) Subject: Fix initial sample value for demo driver X-Git-Tag: libsigrok-0.5.0~121 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=471ac344a5885c73f58cbcd0d0c87f416926afc2 Fix initial sample value for demo driver 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 --- diff --git a/src/hardware/demo/api.c b/src/hardware/demo/api.c index 96f5c078..c6c27e3c 100644 --- a/src/hardware/demo/api.c +++ b/src/hardware/demo/api.c @@ -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; }