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
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c674b12fe6ce
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4486f5766a45
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Nov 26, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4486f57 View commit details
Showing with 9 additions and 8 deletions.
  1. +5 −0 scopeprotocols/EyePattern.cpp
  2. +4 −8 scopeprotocols/EyePattern.h
5 changes: 5 additions & 0 deletions scopeprotocols/EyePattern.cpp
Original file line number Diff line number Diff line change
@@ -442,6 +442,11 @@ void EyePattern::Refresh()

uint32_t prng = 0xdeadbeef;

//Recompute scales
float eye_width_ps = 2 * cap->m_uiWidth;
m_xscale = m_width * 1.0 / eye_width_ps;
m_xoff = -round(cap->m_uiWidth);

//Precompute some scaling factors
float yscale = m_height / GetVoltageRange();
float ymid = m_height / 2;
12 changes: 4 additions & 8 deletions scopeprotocols/EyePattern.h
Original file line number Diff line number Diff line change
@@ -132,15 +132,11 @@ class EyePattern : public Filter
SetData(NULL, 0);
}

void SetXOffset(int64_t xoff)
{
m_xoff = xoff;
}
int64_t GetXOffset()
{ return m_xoff; }

void SetXScale(float xscale)
{
m_xscale = xscale;
}
float GetXScale()
{ return m_xscale; }

size_t GetWidth() const
{ return m_width; }