projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Session: Clear signal data before starting capture
[pulseview.git]
/
pv
/
session.cpp
diff --git
a/pv/session.cpp
b/pv/session.cpp
index f01696b01c7be00399348b66fb7240f7f7e83c2d..b90c03016d6b42cc924787710c7e547685728dd7 100644
(file)
--- a/
pv/session.cpp
+++ b/
pv/session.cpp
@@
-90,7
+90,6
@@
Session::Session(DeviceManager &device_manager) :
capture_state_(Stopped),
cur_samplerate_(0)
{
capture_state_(Stopped),
cur_samplerate_(0)
{
- set_default_device();
}
Session::~Session()
}
Session::~Session()
@@
-180,6
+179,11
@@
void Session::start_capture(function<void (const QString)> error_handler)
}
}
}
}
+ // Clear signal data
+ const set< shared_ptr<data::SignalData> > signal_data = get_data();
+ for (const shared_ptr<data::SignalData> d : signal_data)
+ d->clear();
+
// Begin the session
sampling_thread_ = std::thread(
&Session::sample_thread_proc, this, device_,
// Begin the session
sampling_thread_ = std::thread(
&Session::sample_thread_proc, this, device_,
@@
-412,10
+416,12
@@
void Session::sample_thread_proc(shared_ptr<devices::Device> device,
assert(device);
assert(error_handler);
assert(device);
assert(error_handler);
+ (void)device;
+
cur_samplerate_ = device_->read_config<uint64_t>(ConfigKey::SAMPLERATE);
try {
cur_samplerate_ = device_->read_config<uint64_t>(ConfigKey::SAMPLERATE);
try {
- device_->s
ession()->s
tart();
+ device_->start();
} catch(Error e) {
error_handler(e.what());
return;
} catch(Error e) {
error_handler(e.what());
return;