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: 540e779e0181
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: abbf63c5c0e6
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 30, 2021

  1. Copy the full SHA
    6cdb09d View commit details
  2. Merge pull request #437 from fsedano/fix_data

    Avoid asking for data if not needed on RS driver
    azonenberg authored Apr 30, 2021
    Copy the full SHA
    abbf63c View commit details
Showing with 8 additions and 2 deletions.
  1. +8 −2 scopehal/RohdeSchwarzOscilloscope.cpp
10 changes: 8 additions & 2 deletions scopehal/RohdeSchwarzOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -470,8 +470,14 @@ bool RohdeSchwarzOscilloscope::AcquireData()
//This is basically the same function as a LeCroy WAVEDESC, but much less detailed
m_transport->SendCommand(m_channels[i]->GetHwname() + ":DATA:HEAD?");
string reply = m_transport->ReadReply();
sscanf(reply.c_str(), "%lf,%lf,%zu,%d", &xstart, &xstop, &length, &ignored);

int rc = sscanf(reply.c_str(), "%lf,%lf,%zu,%d", &xstart, &xstop, &length, &ignored);
if (rc != 4 || length == 0) {
/* No data - Skip query the scope and move on */
AnalogWaveform* cap = new AnalogWaveform;
cap->Resize(0);
pending_waveforms[i].push_back(cap);
continue;
}
//Figure out the sample rate
double capture_len_sec = xstop - xstart;
double sec_per_sample = capture_len_sec / length;