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 <svens@stackframe.org>
This commit is contained in:
Sven Schnelle 2017-02-14 23:30:13 +01:00
parent b020b81b24
commit 471ac344a5
1 changed files with 1 additions and 0 deletions

View 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;
}