fix decode issue when capture count less than set sample count

This commit is contained in:
DreamSourceLab 2015-05-03 20:14:17 +08:00
parent a4e991f181
commit e91c93f673
3 changed files with 9 additions and 1 deletions

View File

@ -433,6 +433,11 @@ void DecoderStack::decode_proc()
_decode_state = Stopped;
}
uint64_t DecoderStack::sample_count() const
{
return _sample_count;
}
void DecoderStack::annotation_callback(srd_proto_data *pdata, void *decoder)
{
assert(pdata);

View File

@ -120,6 +120,8 @@ public:
void options_changed(bool changed);
uint64_t sample_count() const;
private:
boost::optional<uint64_t> wait_for_data() const;

View File

@ -547,7 +547,8 @@ bool DecodeTrace::draw_unresolved_period(QPainter &p, int h, int left,
shared_ptr<Logic> data;
shared_ptr<LogicSignal> logic_signal;
const int64_t sample_count = _session.get_device()->get_sample_limit();
//const int64_t sample_count = _session.get_device()->get_sample_limit();
const int64_t sample_count = _decoder_stack->sample_count();
if (sample_count == 0)
return true;