]> sigrok.org Git - pulseview.git/commitdiff
Session: Set "segment complete" flags when no frames are used
authorSoeren Apel <redacted>
Fri, 30 Mar 2018 21:06:31 +0000 (23:06 +0200)
committerSoeren Apel <redacted>
Fri, 30 Mar 2018 21:09:51 +0000 (23:09 +0200)
Without this, A2L conversion is skipped for segment sizes smaller
than ConversionBlockSize, e.g. when acquiring only 100 samples.

pv/session.cpp

index 008ee6a282cc3ba326abe6b106a503576d7d753c..e8174915e4043c37d508c3371b0c8007d168bd06 100644 (file)
@@ -1282,6 +1282,15 @@ void Session::data_feed_in(shared_ptr<sigrok::Device> device,
                // devices use frames, and for those devices, we need to do it here.
                {
                        lock_guard<recursive_mutex> lock(data_mutex_);
+
+                       if (cur_logic_segment_)
+                               cur_logic_segment_->set_complete();
+
+                       for (auto entry : cur_analog_segments_) {
+                               shared_ptr<data::AnalogSegment> segment = entry.second;
+                               segment->set_complete();
+                       }
+
                        cur_logic_segment_.reset();
                        cur_analog_segments_.clear();
                }