const float LogicSegment::LogMipMapScaleFactor = logf(MipMapScaleFactor);
const uint64_t LogicSegment::MipMapDataUnit = 64*1024; // bytes
-LogicSegment::LogicSegment(pv::data::Logic& owner, shared_ptr<sigrok::Logic> data,
- uint64_t samplerate) :
- Segment(samplerate, data->unit_size()),
- owner_(owner),
- last_append_sample_(0)
-{
- lock_guard<recursive_mutex> lock(mutex_);
- memset(mip_map_, 0, sizeof(mip_map_));
- append_payload(data);
-}
-
LogicSegment::LogicSegment(pv::data::Logic& owner, unsigned int unit_size,
uint64_t samplerate) :
Segment(samplerate, unit_size),
typedef pair<int64_t, bool> EdgePair;
public:
- LogicSegment(pv::data::Logic& owner, shared_ptr<sigrok::Logic> data, uint64_t samplerate);
LogicSegment(pv::data::Logic& owner, unsigned int unit_size, uint64_t samplerate);
virtual ~LogicSegment();
// Create a new data segment
cur_logic_segment_ = make_shared<data::LogicSegment>(
- *logic_data_, logic, cur_samplerate_);
+ *logic_data_, logic->unit_size(), cur_samplerate_);
logic_data_->push_segment(cur_logic_segment_);
// @todo Putting this here means that only listeners querying
// frame_began is DecoderStack, but in future we need to signal
// this after both analog and logic sweeps have begun.
frame_began();
- } else {
- // Append to the existing data segment
- cur_logic_segment_->append_payload(logic);
}
+ cur_logic_segment_->append_payload(logic);
+
data_received();
}