X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=logicsignal.cpp;h=5be9b01576614eff7106e1dc8ae2ce77824b7b7f;hp=8d2d00453fd38ed608a7edd08844a896e30a9d34;hb=b3f22de060b73f15ad3eb2dabee04a0b4f5d947e;hpb=64b60583ff73db2bd9458817276687b030fe48e1 diff --git a/logicsignal.cpp b/logicsignal.cpp index 8d2d0045..5be9b015 100644 --- a/logicsignal.cpp +++ b/logicsignal.cpp @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the PulseView project. * * Copyright (C) 2012 Joel Holdsworth * @@ -30,6 +30,7 @@ using namespace boost; using namespace std; const float LogicSignal::Margin = 10.0f; +const float LogicSignal::Oversampling = 2.0f; const QColor LogicSignal::EdgeColour(0x80, 0x80, 0x80); const QColor LogicSignal::HighColour(0x00, 0xC0, 0x00); @@ -88,7 +89,8 @@ void LogicSignal::paint(QPainter &p, const QRect &rect, double scale, snapshot->get_subsampled_edges(edges, min(max((int64_t)floor(start), (int64_t)0), last_sample), min(max((int64_t)ceil(end), (int64_t)0), last_sample), - samples_per_pixel, _probe_index); + samples_per_pixel / Oversampling, _probe_index); + assert(edges.size() >= 2); // Paint the edges const unsigned int edge_count = edges.size() - 2;