X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=sigsession.cpp;h=47d9585b999cfd9fe263a29097f3f24b7582481d;hp=21c5624bc40790ca410002e0b5320a70ff99ae2d;hb=e9ef6d40c7d94d7a4a86128081140b6bb23216d2;hpb=04abfae9c8f8e4884e6535d6584df8b5f1e3a1db diff --git a/sigsession.cpp b/sigsession.cpp index 21c5624b..47d9585b 100644 --- a/sigsession.cpp +++ b/sigsession.cpp @@ -58,7 +58,7 @@ void SigSession::load_file(const std::string &name) } void SigSession::start_capture(struct sr_dev_inst *sdi, - uint64_t sample_rate) + uint64_t record_length, uint64_t sample_rate) { sr_session_new(); sr_session_datafeed_callback_add(data_feed_in_proc); @@ -69,9 +69,8 @@ void SigSession::start_capture(struct sr_dev_inst *sdi, return; } - uint64_t limit_samples = 10000; if (sr_dev_config_set(sdi, SR_HWCAP_LIMIT_SAMPLES, - &limit_samples) != SR_OK) { + &record_length) != SR_OK) { qDebug() << "Failed to configure time-based sample limit."; sr_session_destroy(); return; @@ -98,6 +97,11 @@ vector< shared_ptr >& SigSession::get_signals() return _signals; } +boost::shared_ptr SigSession::get_data() +{ + return _logic_data; +} + void SigSession::data_feed_in(const struct sr_dev_inst *sdi, struct sr_datafeed_packet *packet) {