]> sigrok.org Git - libsigrok.git/commit - src/hardware/demo/api.c
demo: Properly stop acquisition after reaching our sample quota
authorAlexandru Gagniuc <redacted>
Sat, 1 Dec 2012 18:49:15 +0000 (12:49 -0600)
committerUwe Hermann <redacted>
Sat, 1 Dec 2012 21:00:16 +0000 (22:00 +0100)
commitc216d62307a000c75265594a34e8fefee7ba9efc
tree69d1be73b0a71c305053599a767b1c1f9083cadd
parent49145a63c73e212e43f1ec901bfb4fe9f99e3caf
demo: Properly stop acquisition after reaching our sample quota

The demo driver was using sr_session_source_add_channel() to add
a poll source, but was relying on sr_session_run_poll() to call
sr_session_source_remove(). This, coupled with the design of the
driver caused errors once the samples were collected.

The error stream was most likely related to failing to properly close
one of the channels.

Signed-off-by: Alexandru Gagniuc <redacted>
hardware/demo/demo.c