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

Commits on Mar 13, 2020

  1. Copy the full SHA
    077ba4b View commit details
  2. Copy the full SHA
    9ad4c5e View commit details
Showing with 16 additions and 6 deletions.
  1. +3 −5 scopehal/LeCroyOscilloscope.cpp
  2. +13 −1 scopehal/VICPSocketTransport.cpp
8 changes: 3 additions & 5 deletions scopehal/LeCroyOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -396,16 +396,16 @@ bool LeCroyOscilloscope::IsChannelEnabled(size_t i)
if(i == m_extTrigChannel->GetIndex())
return false;

lock_guard<recursive_mutex> lock(m_cacheMutex);
//Need to lock the main mutex first to prevent deadlocks
lock_guard<recursive_mutex> lock(m_mutex);
lock_guard<recursive_mutex> lock2(m_cacheMutex);

//Analog
if(i < m_analogChannelCount)
{
if(m_channelsEnabled.find(i) != m_channelsEnabled.end())
return m_channelsEnabled[i];

lock_guard<recursive_mutex> lock2(m_mutex);

//See if the channel is enabled, hide it if not
string cmd = m_channels[i]->GetHwname() + ":TRACE?";
m_transport->SendCommand(cmd);
@@ -419,8 +419,6 @@ bool LeCroyOscilloscope::IsChannelEnabled(size_t i)
//Digital
else
{
lock_guard<recursive_mutex> lock2(m_mutex);

//See if the channel is on
m_transport->SendCommand(string("VBS? 'return = app.LogicAnalyzer.Digital1.") + m_channels[i]->GetHwname() + "'");
string str = m_transport->ReadReply();
14 changes: 13 additions & 1 deletion scopehal/VICPSocketTransport.cpp
Original file line number Diff line number Diff line change
@@ -164,7 +164,19 @@ string VICPSocketTransport::ReadReply()

//Skip empty blocks, or just newlines
if( (len == 0) || (rxbuf == "\n"))
{}
{
//Special handling needed for EOI.
if(header[0] & OP_EOI)
{
//EOI on an empty block is a stop if we have data from previous blocks.
if(!payload.empty())
break;

//But if we have no data, hold off and wait for the next frame
else
continue;
}
}

//Actual frame data
else