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

Commits on May 8, 2021

  1. RS Scope driver: Update cache when enabling/disabling channels. Parse…

    … correct reply from scope
    fsedano committed May 8, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e270bc9 View commit details
  2. Merge pull request #465 from fsedano/fix_enable_channel

    RS Scope driver: Update cache when enabling/disabling channels. Parse…
    azonenberg authored May 8, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7312ee7 View commit details
Showing with 7 additions and 1 deletion.
  1. +7 −1 scopehal/RohdeSchwarzOscilloscope.cpp
8 changes: 7 additions & 1 deletion scopehal/RohdeSchwarzOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -227,7 +227,7 @@ bool RohdeSchwarzOscilloscope::IsChannelEnabled(size_t i)

m_transport->SendCommand(m_channels[i]->GetHwname() + ":STAT?");
string reply = m_transport->ReadReply();
if(reply == "OFF")
if(reply == "OFF" || reply == "0")
{
m_channelsEnabled[i] = false;
return false;
@@ -243,12 +243,18 @@ void RohdeSchwarzOscilloscope::EnableChannel(size_t i)
{
lock_guard<recursive_mutex> lock(m_mutex);
m_transport->SendCommand(m_channels[i]->GetHwname() + ":STAT ON");

lock_guard<recursive_mutex> lock2(m_cacheMutex);
m_channelsEnabled[i] = true;
}

void RohdeSchwarzOscilloscope::DisableChannel(size_t i)
{
lock_guard<recursive_mutex> lock(m_mutex);
m_transport->SendCommand(m_channels[i]->GetHwname() + ":STAT OFF");

lock_guard<recursive_mutex> lock2(m_cacheMutex);
m_channelsEnabled[i] = false;
}

vector<OscilloscopeChannel::CouplingType> RohdeSchwarzOscilloscope::GetAvailableCouplings(size_t /*i*/)