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: c3369a46f0b2
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: 455371708425
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Jul 29, 2020

  1. OscilloscopeWindow: stop polling instruments once we close the window…

    … (prevents hang during shutdown). Fixes #125.
    azonenberg committed Jul 29, 2020
    Copy the full SHA
    4553717 View commit details
Showing with 10 additions and 1 deletion.
  1. +1 −1 lib
  2. +6 −0 src/glscopeclient/OscilloscopeWindow.cpp
  3. +3 −0 src/glscopeclient/OscilloscopeWindow.h
2 changes: 1 addition & 1 deletion lib
Submodule lib updated from 636658 to 6d7ad4
6 changes: 6 additions & 0 deletions src/glscopeclient/OscilloscopeWindow.cpp
Original file line number Diff line number Diff line change
@@ -65,6 +65,7 @@ OscilloscopeWindow::OscilloscopeWindow(vector<Oscilloscope*> scopes, bool nodigi
, m_scopeSyncWizard(NULL)
, m_haltConditionsDialog(this)
, m_triggerArmed(false)
, m_shuttingDown(false)
{
SetTitle();

@@ -399,6 +400,9 @@ void OscilloscopeWindow::CreateWidgets(bool nodigital)

bool OscilloscopeWindow::OnTimer(int /*timer*/)
{
if(m_shuttingDown)
return false;

if(m_triggerArmed)
PollScopes();

@@ -425,6 +429,8 @@ bool OscilloscopeWindow::OnTimer(int /*timer*/)
*/
bool OscilloscopeWindow::on_delete_event(GdkEventAny* /*any_event*/)
{
m_shuttingDown = true;

CloseSession();
return false;
}
3 changes: 3 additions & 0 deletions src/glscopeclient/OscilloscopeWindow.h
Original file line number Diff line number Diff line change
@@ -273,6 +273,9 @@ class OscilloscopeWindow : public Gtk::Window

//If false, ignore incoming waveforms (scope thread might have an extra trigger after you press stop)
bool m_triggerArmed;

//True if shutting down (don't process any more updates after this point
bool m_shuttingDown;
};

#endif