projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
decoderstack.cpp: Improve two error messages a bit.
[pulseview.git]
/
pv
/
data
/
decoderstack.cpp
diff --git
a/pv/data/decoderstack.cpp
b/pv/data/decoderstack.cpp
index b8eff67ffd02d0dc5ab018806b056b0c9849cf67..f08e349240571cabf18f64259ca205daaef8bcb1 100644
(file)
--- a/
pv/data/decoderstack.cpp
+++ b/
pv/data/decoderstack.cpp
@@
-172,10
+172,13
@@
void DecoderStack::decode_proc(shared_ptr<data::Logic> data)
const shared_ptr<pv::data::LogicSnapshot> &snapshot =
snapshots.front();
const shared_ptr<pv::data::LogicSnapshot> &snapshot =
snapshots.front();
- const int64_t sample_count = snapshot->get_sample_count()
- 1
;
+ const int64_t sample_count = snapshot->get_sample_count();
const unsigned int chunk_sample_count =
DecodeChunkLength / snapshot->unit_size();
const unsigned int chunk_sample_count =
DecodeChunkLength / snapshot->unit_size();
+ // Clear error message upon every new session run
+ _error_message = QString();
+
// Create the session
srd_session_new(&session);
assert(session);
// Create the session
srd_session_new(&session);
assert(session);
@@
-187,7
+190,7
@@
void DecoderStack::decode_proc(shared_ptr<data::Logic> data)
if (!di)
{
if (!di)
{
- _error_message = tr("Failed to
initialise decoder
");
+ _error_message = tr("Failed to
create decoder instance
");
srd_session_destroy(session);
return;
}
srd_session_destroy(session);
return;
}
@@
-220,7
+223,7
@@
void DecoderStack::decode_proc(shared_ptr<data::Logic> data)
if (srd_session_send(session, i, i + sample_count,
chunk, chunk_end - i) != SRD_OK) {
if (srd_session_send(session, i, i + sample_count,
chunk, chunk_end - i) != SRD_OK) {
- _error_message = tr("
Failed to initialise decode
r");
+ _error_message = tr("
Decoder reported an erro
r");
break;
}
break;
}