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: 7175c3f1dfde
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: ba8b90f99f68
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Sep 2, 2019

  1. Copy the full SHA
    ba8b90f View commit details
Showing with 10 additions and 0 deletions.
  1. +8 −0 psuclient/MainWindow.cpp
  2. +2 −0 psuclient/MainWindow.h
8 changes: 8 additions & 0 deletions psuclient/MainWindow.cpp
Original file line number Diff line number Diff line change
@@ -200,6 +200,9 @@ ChannelRow::ChannelRow(PowerSupply* psu, int chan)

m_softStartModeButton->set_active(m_psu->IsSoftStartEnabled(m_chan));

//Connect signal handlers after initial values are loaded
m_powerSwitch->property_active().signal_changed().connect(sigc::mem_fun(*this, &ChannelRow::OnPowerSwitch));

SetGraphLimits();
}

@@ -288,6 +291,11 @@ void ChannelRow::FormatCurrent(char* str, size_t len, double i)
snprintf(str, len, "%.3f mA", i * 1000);
}

void ChannelRow::OnPowerSwitch()
{
m_psu->SetPowerChannelActive(m_chan, m_powerSwitch->get_state());
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Construction / destruction

2 changes: 2 additions & 0 deletions psuclient/MainWindow.h
Original file line number Diff line number Diff line change
@@ -72,6 +72,8 @@ class ChannelRow
void FormatCurrent(char* str, size_t len, double i);

void SetGraphLimits();

void OnPowerSwitch();
};

/**