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

Commits on May 10, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    makenowjust Hiroya Fujinami
    Copy the full SHA
    edfd4a3 View commit details
Showing with 8 additions and 2 deletions.
  1. +4 −1 scopeprotocols/FrequencyMeasurementDecoder.cpp
  2. +4 −1 scopeprotocols/PeriodMeasurementDecoder.cpp
5 changes: 4 additions & 1 deletion scopeprotocols/FrequencyMeasurementDecoder.cpp
Original file line number Diff line number Diff line change
@@ -122,9 +122,12 @@ void FrequencyMeasurementDecoder::Refresh()
return;
}

//Find average voltage of the waveform and use that as the zero crossing
float midpoint = Measurement::GetAvgVoltage(din);

//Timestamps of the edges
vector<int64_t> edges;
FindZeroCrossings(din, 0, edges);
FindZeroCrossings(din, midpoint, edges);
if(edges.size() < 2)
{
SetData(NULL);
5 changes: 4 additions & 1 deletion scopeprotocols/PeriodMeasurementDecoder.cpp
Original file line number Diff line number Diff line change
@@ -122,9 +122,12 @@ void PeriodMeasurementDecoder::Refresh()
return;
}

//Find average voltage of the waveform and use that as the zero crossing
float midpoint = Measurement::GetAvgVoltage(din);

//Timestamps of the edges
vector<int64_t> edges;
FindZeroCrossings(din, 0, edges);
FindZeroCrossings(din, midpoint, edges);
if(edges.size() < 2)
{
SetData(NULL);