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: c59be665d2ae
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: 31b7f7382e7d
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Dec 4, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    31b7f73 View commit details
Showing with 23 additions and 2 deletions.
  1. +1 −1 doc
  2. +1 −1 lib
  3. +18 −0 src/glscopeclient/ChannelPropertiesDialog.cpp
  4. +3 −0 src/glscopeclient/ChannelPropertiesDialog.h
2 changes: 1 addition & 1 deletion doc
18 changes: 18 additions & 0 deletions src/glscopeclient/ChannelPropertiesDialog.cpp
Original file line number Diff line number Diff line change
@@ -52,6 +52,7 @@ ChannelPropertiesDialog::ChannelPropertiesDialog(
, m_hasFrequency(false)
, m_hasBandwidth(false)
, m_hasDeskew(false)
, m_hasInvert(false)
{
add_button("OK", Gtk::RESPONSE_OK);
add_button("Cancel", Gtk::RESPONSE_CANCEL);
@@ -141,6 +142,20 @@ ChannelPropertiesDialog::ChannelPropertiesDialog(

anchorLabel = &m_bandwidthLabel;

//Inversion
if(chan->CanInvert())
{
m_grid.attach_next_to(m_invertLabel, *anchorLabel, Gtk::POS_BOTTOM, 1, 1);
m_invertLabel.set_text("Invert");
m_invertLabel.set_halign(Gtk::ALIGN_START);
m_grid.attach_next_to(m_invertButton, m_invertLabel, Gtk::POS_RIGHT, 1, 1);
m_invertButton.set_active(chan->IsInverted());

anchorLabel = &m_invertLabel;

m_hasInvert = true;
}

//ADC configuration
if(scope->IsADCModeConfigurable())
{
@@ -301,6 +316,9 @@ void ChannelPropertiesDialog::ConfigureChannel()
if(m_hasAdcMode)
m_chan->GetScope()->SetADCMode(m_chan->GetIndex(), m_adcModeBox.get_active_row_number());

if(m_hasInvert)
m_chan->Invert(m_invertButton.get_active());

if(m_hasBandwidth)
{
auto sbw = m_bandwidthBox.get_active_text();
3 changes: 3 additions & 0 deletions src/glscopeclient/ChannelPropertiesDialog.h
Original file line number Diff line number Diff line change
@@ -63,6 +63,8 @@ class ChannelPropertiesDialog : public Gtk::Dialog
Gtk::Entry m_deskewEntry;
Gtk::Label m_attenuationLabel;
Gtk::Entry m_attenuationEntry;
Gtk::Label m_invertLabel;
Gtk::CheckButton m_invertButton;

//Analog channel configuration
Gtk::Label m_bandwidthLabel;
@@ -95,6 +97,7 @@ class ChannelPropertiesDialog : public Gtk::Dialog
bool m_hasDeskew;
bool m_hasAttenuation;
bool m_hasAdcMode;
bool m_hasInvert;
};

#endif