aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2017-02-14 23:30:13 +0100
committerSven Schnelle <svens@stackframe.org>2017-02-14 23:32:45 +0100
commit471ac344a5885c73f58cbcd0d0c87f416926afc2 (patch)
tree85d8960a28fe0ab19a3df7a85825458d74fc15cb
parentb020b81b24bf6987cccffc3ea84049e66b9ccdb3 (diff)
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>
-rw-r--r--src/hardware/demo/api.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hardware/demo/api.c b/src/hardware/demo/api.c
index 96f5c07..c6c27e3 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;
}