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

Commits on Jun 12, 2020

  1. Removed Oscilloscope::PollTriggerFifo() since HasPendingWaveforms() b…

    …asically does the same thing. Fixes #143.
    azonenberg committed Jun 12, 2020
    Copy the full SHA
    47761de View commit details
Showing with 4 additions and 16 deletions.
  1. +4 −15 scopehal/Oscilloscope.cpp
  2. +0 −1 scopehal/Oscilloscope.h
19 changes: 4 additions & 15 deletions scopehal/Oscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -127,14 +127,14 @@ OscilloscopeChannel* Oscilloscope::GetChannelByDisplayName(string name)

bool Oscilloscope::WaitForTrigger(int timeout)
{
bool trig = false;
for(int i=0; i<timeout*100 && !trig; i++)
for(int i=0; i<timeout*100; i++)
{
trig = (PollTriggerFifo() == Oscilloscope::TRIGGER_MODE_TRIGGERED);
if(HasPendingWaveforms())
return true;
usleep(10 * 1000);
}

return trig;
return false;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -167,17 +167,6 @@ void Oscilloscope::ClearPendingWaveforms()
}
}

/**
@brief Just like PollTrigger(), but checks the fifo instead
*/
Oscilloscope::TriggerMode Oscilloscope::PollTriggerFifo()
{
if(HasPendingWaveforms())
return Oscilloscope::TRIGGER_MODE_TRIGGERED;
else
return Oscilloscope::TRIGGER_MODE_RUN;
}

/**
@brief Just like AcquireData(), but only pulls from the fifo
*/
1 change: 0 additions & 1 deletion scopehal/Oscilloscope.h
Original file line number Diff line number Diff line change
@@ -493,7 +493,6 @@ class Oscilloscope : public virtual Instrument
bool HasPendingWaveforms();
void ClearPendingWaveforms();
size_t GetPendingWaveformCount();
virtual Oscilloscope::TriggerMode PollTriggerFifo();
virtual bool AcquireDataFifo();

protected: