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

Commits on Sep 11, 2020

  1. Copy the full SHA
    307ca55 View commit details
Showing with 18 additions and 3 deletions.
  1. +1 −1 lib
  2. +14 −2 src/glscopeclient/ChannelPropertiesDialog.cpp
  3. +3 −0 src/glscopeclient/ChannelPropertiesDialog.h
2 changes: 1 addition & 1 deletion lib
Submodule lib updated from 563245 to f46b28
16 changes: 14 additions & 2 deletions src/glscopeclient/ChannelPropertiesDialog.cpp
Original file line number Diff line number Diff line change
@@ -47,6 +47,8 @@ ChannelPropertiesDialog::ChannelPropertiesDialog(
: Gtk::Dialog(string("Channel properties"), *parent, Gtk::DIALOG_MODAL)
, m_groupList(1)
, m_chan(chan)
, m_hasThreshold(false)
, m_hasHysteresis(false)
{
add_button("OK", Gtk::RESPONSE_OK);
add_button("Cancel", Gtk::RESPONSE_CANCEL);
@@ -117,6 +119,8 @@ ChannelPropertiesDialog::ChannelPropertiesDialog(
m_thresholdEntry.set_text(volts.PrettyPrint(scope->GetDigitalThreshold(index)));

anchorLabel = &m_thresholdLabel;

m_hasThreshold = true;
}

if(scope->IsDigitalHysteresisConfigurable())
@@ -129,6 +133,8 @@ ChannelPropertiesDialog::ChannelPropertiesDialog(
m_hysteresisEntry.set_text(volts.PrettyPrint(scope->GetDigitalHysteresis(index)));

anchorLabel = &m_hysteresisLabel;

m_hasHysteresis = true;
}

//See what else is in the bank
@@ -168,10 +174,16 @@ void ChannelPropertiesDialog::ConfigureChannel()
m_chan->m_displayname = m_channelDisplayNameEntry.get_text();
m_chan->m_displaycolor = m_channelColorButton.get_color().to_string();

Unit volts(Unit::UNIT_VOLTS);

if(m_hasThreshold)
m_chan->SetDigitalThreshold(volts.ParseString(m_thresholdEntry.get_text()));

if(m_hasHysteresis)
m_chan->SetDigitalHysteresis(volts.ParseString(m_hysteresisEntry.get_text()));

Unit ps(Unit::UNIT_PS);
m_chan->SetDeskew(ps.ParseString(m_deskewEntry.get_text()));

//TODO
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3 changes: 3 additions & 0 deletions src/glscopeclient/ChannelPropertiesDialog.h
Original file line number Diff line number Diff line change
@@ -71,6 +71,9 @@ class ChannelPropertiesDialog : public Gtk::Dialog
Gtk::ListViewText m_groupList;

OscilloscopeChannel* m_chan;

bool m_hasThreshold;
bool m_hasHysteresis;
};

#endif