projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a7b603
)
view/analogsignal: set samplerate to 1.0 if samplerate is not known
author
Stefan Brüns
<stefan.bruens@rwth-aachen.de>
Sun, 29 Nov 2015 04:30:33 +0000
(
05:30
+0100)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Mon, 21 Dec 2015 14:38:36 +0000
(15:38 +0100)
This fixes parts of bug #387.
pv/view/analogsignal.cpp
patch
|
blob
|
history
diff --git
a/pv/view/analogsignal.cpp
b/pv/view/analogsignal.cpp
index 218a959dd422aed5e6560398bb436a85b86317d5..683757d1a52cffc1f781bee07d73ca3b16f8b43c 100644
(file)
--- a/
pv/view/analogsignal.cpp
+++ b/
pv/view/analogsignal.cpp
@@
-128,7
+128,7
@@
void AnalogSignal::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
segments.front();
const double pixels_offset = pp.pixels_offset();
- const double samplerate =
segment->samplerate(
);
+ const double samplerate =
max(1.0, segment->samplerate()
);
const pv::util::Timestamp& start_time = segment->start_time();
const int64_t last_sample = segment->get_sample_count() - 1;
const double samples_per_pixel = samplerate * pp.scale();