Skip to content

Commit

Permalink
LeCroyOscilloscope: do not report 1M ohm coupling as available when a…
Browse files Browse the repository at this point in the history
… ProLink input is active. Fixes #562.
  • Loading branch information
azonenberg committed Mar 9, 2022
1 parent b81e4fa commit 2341209
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions scopehal/LeCroyOscilloscope.cpp
Expand Up @@ -1261,11 +1261,24 @@ void LeCroyOscilloscope::DisableChannel(size_t i)
}
}

vector<OscilloscopeChannel::CouplingType> LeCroyOscilloscope::GetAvailableCouplings(size_t /*i*/)
vector<OscilloscopeChannel::CouplingType> LeCroyOscilloscope::GetAvailableCouplings(size_t i)
{
vector<OscilloscopeChannel::CouplingType> ret;
ret.push_back(OscilloscopeChannel::COUPLE_DC_1M);
ret.push_back(OscilloscopeChannel::COUPLE_AC_1M);

//For WaveMaster/SDA/DDA scopes, we cannot use 1M ohm coupling if the ProLink input is selected
bool isProBus = true;
if(HasInputMux(i))
{
if(GetInputMuxSetting(i) == 0)
isProBus = false;
}

if(isProBus)
{
ret.push_back(OscilloscopeChannel::COUPLE_DC_1M);
ret.push_back(OscilloscopeChannel::COUPLE_AC_1M);
}

ret.push_back(OscilloscopeChannel::COUPLE_DC_50);
ret.push_back(OscilloscopeChannel::COUPLE_GND);
return ret;
Expand Down

0 comments on commit 2341209

Please sign in to comment.