Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: edc17a50b2c4
Choose a base ref
...
head repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cda45f693c2c
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Mar 3, 2020

  1. Copy the full SHA
    cda45f6 View commit details
Showing with 11 additions and 0 deletions.
  1. +11 −0 glscopeclient/WaveformArea_cairo.cpp
11 changes: 11 additions & 0 deletions glscopeclient/WaveformArea_cairo.cpp
Original file line number Diff line number Diff line change
@@ -264,6 +264,17 @@ void WaveformArea::RenderDecodeOverlays(Cairo::RefPtr< Cairo::Context > cr)
double start = (bus->GetSampleStart(i) * bus->m_timescale) + bus->m_triggerPhase;
double end = start + (bus->GetSampleLen(i) * bus->m_timescale);

//Merge with subsequent samples if they have the same value
for(size_t j=i+1; j<bus->GetDepth(); j++)
{
if(bus->m_samples[i].m_sample != bus->m_samples[j].m_sample)
break;

//Merge this sample with the next one
i++;
end = (bus->GetSampleStart(i) + bus->GetSampleLen(i)) * bus->m_timescale + bus->m_triggerPhase;
}

double xs = XAxisUnitsToXPosition(start);
double xe = XAxisUnitsToXPosition(end);