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

Commits on Nov 1, 2020

  1. Copy the full SHA
    1f1bc56 View commit details
Showing with 17 additions and 0 deletions.
  1. +1 −0 scopehal/Filter.cpp
  2. +16 −0 scopehal/Filter.h
1 change: 1 addition & 0 deletions scopehal/Filter.cpp
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ Filter::Filter(
: OscilloscopeChannel(NULL, "", type, color, 1) //TODO: handle this better?
, m_category(cat)
, m_dirty(true)
, m_usingDefault(true)
{
m_physical = false;
m_filters.emplace(this);
16 changes: 16 additions & 0 deletions scopehal/Filter.h
Original file line number Diff line number Diff line change
@@ -65,6 +65,19 @@ class Filter : public OscilloscopeChannel
Filter(OscilloscopeChannel::ChannelType type, const std::string& color, Category cat);
virtual ~Filter();

/**
@brief Specifies whether we're using an auto-generated name or not
*/
void UseDefaultName(bool use)
{
m_usingDefault = use;
if(use)
SetDefaultName();
}

bool IsUsingDefaultName()
{ return m_usingDefault; }

virtual void Refresh() =0;

virtual void AddRef();
@@ -149,6 +162,9 @@ class Filter : public OscilloscopeChannel
///Indicates if our output is out-of-sync with our input
bool m_dirty;

///Indicates we're using an auto-generated name
bool m_usingDefault;

bool VerifyAllInputsOK(bool allowEmpty = false);
bool VerifyInputOK(size_t i, bool allowEmpty = false);
bool VerifyAllInputsOKAndAnalog();