X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fstoresession.cpp;h=809dba3e6694e37da736e6799e2deaa946e69d18;hb=38b77a3ba1738aebf516491cc95e25219938a877;hp=42b13c46c24303c5fad2ad7ef6cf55ca13322a0f;hpb=8962d7b3b640b5f07f26a4b4ebee839c4880b69d;p=pulseview.git diff --git a/pv/storesession.cpp b/pv/storesession.cpp index 42b13c46..809dba3e 100644 --- a/pv/storesession.cpp +++ b/pv/storesession.cpp @@ -93,7 +93,7 @@ const QString& StoreSession::error() const bool StoreSession::start() { - const unordered_set< shared_ptr > sigs(session_.signalbases()); + const vector< shared_ptr > sigs(session_.signalbases()); shared_ptr any_segment; shared_ptr lsegment; @@ -251,6 +251,7 @@ void StoreSession::store_proc(vector< shared_ptr > achannel_li const unsigned int samples_per_block = min(asamples_per_block, lsamples_per_block); + const auto context = session_.device_manager().context(); while (!interrupt_ && sample_count_) { progress_updated(); @@ -258,8 +259,6 @@ void StoreSession::store_proc(vector< shared_ptr > achannel_li min((uint64_t)samples_per_block, sample_count_); try { - const auto context = session_.device_manager().context(); - for (unsigned int i = 0; i < achannel_list.size(); i++) { shared_ptr achannel = (achannel_list.at(i))->channel(); shared_ptr asegment = asegment_list.at(i); @@ -303,6 +302,11 @@ void StoreSession::store_proc(vector< shared_ptr > achannel_li units_stored_ = unit_count_ - (sample_count_ >> progress_scale); } + auto dfend = context->create_end_packet(); + const string ldata_str = output_->receive(dfend); + if (output_stream_.is_open()) + output_stream_ << ldata_str; + // Zeroing the progress variables indicates completion units_stored_ = unit_count_ = 0;