projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f96c34
)
Fixed usage of sr_datafeed_logic::length
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 13 Jan 2013 11:55:51 +0000
(11:55 +0000)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 13 Jan 2013 11:57:03 +0000
(11:57 +0000)
The length field is a measure of bytes not samples. The previous
usage would fail unless the unitsize was set to 1.
pv/data/logicsnapshot.cpp
patch
|
blob
|
history
diff --git
a/pv/data/logicsnapshot.cpp
b/pv/data/logicsnapshot.cpp
index 9b3eedd107ad31f33eab0f0ef45950cb06a0cae0..5665d35f8c3d58916b3df6ed41c11227f13d39cf 100644
(file)
--- a/
pv/data/logicsnapshot.cpp
+++ b/
pv/data/logicsnapshot.cpp
@@
-60,10
+60,11
@@
void LogicSnapshot::append_payload(
const sr_datafeed_logic &logic)
{
assert(_unit_size == logic.unitsize);
+ assert((logic.length % _unit_size) == 0);
lock_guard<recursive_mutex> lock(_mutex);
- append_data(logic.data, logic.length);
+ append_data(logic.data, logic.length
/ _unit_size
);
// Generate the first mip-map from the data
append_payload_to_mipmap();