projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed ruler scale units
[pulseview.git]
/
logicdatasnapshot.cpp
diff --git
a/logicdatasnapshot.cpp
b/logicdatasnapshot.cpp
index d01916a763be20e63962928870a15cf142c9032c..10744cf7d6eb40dcd148f79d348d0fde43214d08 100644
(file)
--- a/
logicdatasnapshot.cpp
+++ b/
logicdatasnapshot.cpp
@@
-55,7
+55,6
@@
void LogicDataSnapshot::append_payload(
{
assert(_unit_size == logic.unitsize);
{
assert(_unit_size == logic.unitsize);
- const uint64_t prev_length = _data_length;
append_data(logic.data, logic.length);
// Generate the first mip-map from the data
append_data(logic.data, logic.length);
// Generate the first mip-map from the data
@@
-84,7
+83,7
@@
void LogicDataSnapshot::append_payload_to_mipmap()
// Expand the data buffer to fit the new samples
prev_length = m0.length;
// Expand the data buffer to fit the new samples
prev_length = m0.length;
- m0.length = _
data_length
/ MipMapScaleFactor;
+ m0.length = _
sample_count
/ MipMapScaleFactor;
// Break off if there are no new samples to compute
if(m0.length == prev_length)
// Break off if there are no new samples to compute
if(m0.length == prev_length)
@@
-160,7
+159,7
@@
void LogicDataSnapshot::append_payload_to_mipmap()
uint64_t LogicDataSnapshot::get_sample(uint64_t index) const
{
assert(_data);
uint64_t LogicDataSnapshot::get_sample(uint64_t index) const
{
assert(_data);
- assert(index >= 0 && index < _
data_length
);
+ assert(index >= 0 && index < _
sample_count
);
return *(uint64_t*)((uint8_t*)_data + index * _unit_size);
}
return *(uint64_t*)((uint8_t*)_data + index * _unit_size);
}