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: d9dc36cfd1bc
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: a1b0a3a3523b
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Dec 18, 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
    a1b0a3a View commit details
Showing with 2 additions and 9 deletions.
  1. +2 −9 src/glscopeclient/ScopeSyncWizard.cpp
11 changes: 2 additions & 9 deletions src/glscopeclient/ScopeSyncWizard.cpp
Original file line number Diff line number Diff line change
@@ -461,16 +461,9 @@ bool ScopeSyncWizard::OnTimer()
m_activeSecondaryPage->m_progressBar.set_fraction(1);
m_activeSecondaryPage->m_progressBar.set_text("Done");

//Sort the list of skews
//Calculate median skew
sort(m_averageSkews.begin(), m_averageSkews.end());

//Discard the biggest and smallest two results, and average the remainder.
double sum = 0;
size_t numToAverage = m_numAverages - 4;
for(size_t i=2; i < (m_numAverages - 2); i++)
sum += m_averageSkews[i];
skew = static_cast<int64_t>(round(sum / numToAverage));
LogTrace("Average skew = %ld fs\n", skew);
skew = (m_averageSkews[4] + m_averageSkews[5]) / 2;

//Figure out where we want the secondary to go
int64_t targetOffset = scope->GetTriggerOffset() - skew;