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

Commits on May 25, 2020

  1. Copy the full SHA
    d39cbd2 View commit details
Showing with 27 additions and 8 deletions.
  1. +27 −8 scopehal/LeCroyOscilloscope.cpp
35 changes: 27 additions & 8 deletions scopehal/LeCroyOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -1017,15 +1017,34 @@ void LeCroyOscilloscope::BulkCheckChannelEnableState()

lock_guard<recursive_mutex> lock2(m_mutex);

for(auto i : uncached)
m_transport->SendCommand(m_channels[i]->GetHwname() + ":TRACE?");
for(auto i : uncached)
//Batched implementation
if(m_transport->IsCommandBatchingSupported())
{
string reply = m_transport->ReadReply();
if(reply == "OFF")
m_channelsEnabled[i] = false;
else
m_channelsEnabled[i] = true;
for(auto i : uncached)
m_transport->SendCommand(m_channels[i]->GetHwname() + ":TRACE?");
for(auto i : uncached)
{
string reply = m_transport->ReadReply();
if(reply == "OFF")
m_channelsEnabled[i] = false;
else
m_channelsEnabled[i] = true;
}
}

//Unoptimized fallback for use with transports that can't handle batching
else
{
for(auto i : uncached)
{
m_transport->SendCommand(m_channels[i]->GetHwname() + ":TRACE?");

string reply = m_transport->ReadReply();
if(reply == "OFF")
m_channelsEnabled[i] = false;
else
m_channelsEnabled[i] = true;
}
}

/*