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

Commits on Apr 30, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    df8c160 View commit details
Showing with 15 additions and 1 deletion.
  1. +13 −1 scopehal/OscilloscopeChannel.cpp
  2. +2 −0 scopehal/OscilloscopeChannel.h
14 changes: 13 additions & 1 deletion scopehal/OscilloscopeChannel.cpp
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
* *
* ANTIKERNEL v0.1 *
* *
* Copyright (c) 2012-2020 Andrew D. Zonenberg *
* Copyright (c) 2012-2021 Andrew D. Zonenberg *
* All rights reserved. *
* *
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -182,6 +182,18 @@ OscilloscopeChannel::CouplingType OscilloscopeChannel::GetCoupling()
return OscilloscopeChannel::COUPLE_SYNTHETIC;
}

vector<OscilloscopeChannel::CouplingType> OscilloscopeChannel::GetAvailableCouplings()
{
if(m_scope)
return m_scope->GetAvailableCouplings(m_index);
else
{
vector<OscilloscopeChannel::CouplingType> ret;
ret.push_back(COUPLE_SYNTHETIC);
return ret;
}
}

void OscilloscopeChannel::SetCoupling(CouplingType type)
{
if(m_scope)
2 changes: 2 additions & 0 deletions scopehal/OscilloscopeChannel.h
Original file line number Diff line number Diff line change
@@ -163,6 +163,8 @@ class OscilloscopeChannel
virtual CouplingType GetCoupling();
virtual void SetCoupling(CouplingType type);

virtual std::vector<OscilloscopeChannel::CouplingType> GetAvailableCouplings();

virtual double GetAttenuation();
virtual void SetAttenuation(double atten);