X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fsigsession.cpp;h=c152481e9841814d93669c8c85e3cccf2176e94c;hb=6fd0b63971f179a28c2c558055da760c2c44231a;hp=1a5ac8cad96405655af7cfd0ca0211d6695b3e2d;hpb=82f50b10f8fd45a772f9ba40c4ef1f888ed6b8b1;p=pulseview.git diff --git a/pv/sigsession.cpp b/pv/sigsession.cpp index 1a5ac8c..c152481 100644 --- a/pv/sigsession.cpp +++ b/pv/sigsession.cpp @@ -126,6 +126,28 @@ void SigSession::set_file(const string &name) throw(QString) set_device(shared_ptr(device::File::create(name))); } +void SigSession::set_default_device() +{ + shared_ptr default_device; + const list< shared_ptr > &devices = + _device_manager.devices(); + + if (!devices.empty()) { + // Fall back to the first device in the list. + default_device = devices.front(); + + // Try and find the demo device and select that by default + BOOST_FOREACH (shared_ptr dev, devices) + if (strcmp(dev->dev_inst()->driver->name, + "demo") == 0) { + default_device = dev; + break; + } + } + + set_device(default_device); +} + void SigSession::release_device(device::DevInst *dev_inst) { (void)dev_inst; @@ -290,28 +312,6 @@ void SigSession::set_capture_state(capture_state state) capture_state_changed(state); } -void SigSession::set_default_device() -{ - shared_ptr default_device; - const list< shared_ptr > &devices = - _device_manager.devices(); - - if (!devices.empty()) { - // Fall back to the first device in the list. - default_device = devices.front(); - - // Try and find the demo device and select that by default - BOOST_FOREACH (shared_ptr dev, devices) - if (strcmp(dev->dev_inst()->driver->name, - "demo") == 0) { - default_device = dev; - break; - } - } - - set_device(default_device); -} - void SigSession::update_signals(shared_ptr dev_inst) { assert(dev_inst); @@ -531,7 +531,7 @@ void SigSession::feed_in_logic(const sr_datafeed_logic &logic) _cur_logic_snapshot->append_payload(logic); } - data_updated(); + data_received(); } void SigSession::feed_in_analog(const sr_datafeed_analog &analog) @@ -592,7 +592,7 @@ void SigSession::feed_in_analog(const sr_datafeed_analog &analog) set_capture_state(Running); } - data_updated(); + data_received(); } void SigSession::data_feed_in(const struct sr_dev_inst *sdi, @@ -633,7 +633,7 @@ void SigSession::data_feed_in(const struct sr_dev_inst *sdi, _cur_logic_snapshot.reset(); _cur_analog_snapshots.clear(); } - data_updated(); + frame_ended(); break; } }