projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef7e314
)
Check that at least one probe is enabled before acquisition begins
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Mon, 11 Mar 2013 23:30:34 +0000
(23:30 +0000)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Mon, 11 Mar 2013 23:30:34 +0000
(23:30 +0000)
pv/sigsession.cpp
patch
|
blob
|
history
diff --git
a/pv/sigsession.cpp
b/pv/sigsession.cpp
index 8ab7dab845708a1cc1c818e549096a1807b647b3..a611e7ac7c14159eed9d8e4c569e2a8b79bb9880 100644
(file)
--- a/
pv/sigsession.cpp
+++ b/
pv/sigsession.cpp
@@
-77,6
+77,21
@@
void SigSession::start_capture(struct sr_dev_inst *sdi,
{
stop_capture();
{
stop_capture();
+ // Check that at least one probe is enabled
+ const GSList *l;
+ for (l = sdi->probes; l; l = l->next) {
+ sr_probe *const probe = (sr_probe*)l->data;
+ assert(probe);
+ if (probe->enabled)
+ break;
+ }
+
+ if (!l) {
+ error_handler(tr("No probes enabled."));
+ return;
+ }
+
+ // Begin the session
_sampling_thread.reset(new boost::thread(
&SigSession::sample_thread_proc, this, sdi,
record_length, error_handler));
_sampling_thread.reset(new boost::thread(
&SigSession::sample_thread_proc, this, sdi,
record_length, error_handler));