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: 05da14cd8b45
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: 450bfe1e3819
Choose a head ref
  • 6 commits
  • 8 files changed
  • 1 contributor

Commits on Oct 23, 2020

  1. Copy the full SHA
    a055688 View commit details
  2. Updated docs

    azonenberg committed Oct 23, 2020
    Copy the full SHA
    9fb5b16 View commit details
  3. Copy the full SHA
    6bd55ca View commit details
  4. Updated about dialog

    azonenberg committed Oct 23, 2020
    Copy the full SHA
    9885889 View commit details
  5. Updated submodules

    azonenberg committed Oct 23, 2020
    Copy the full SHA
    629a5b5 View commit details
  6. Copy the full SHA
    450bfe1 View commit details
Showing with 21 additions and 12 deletions.
  1. +1 −1 CMakeLists.txt
  2. +1 −1 doc
  3. +1 −1 lib
  4. +8 −3 src/glscopeclient/OscilloscopeWindow.cpp
  5. +2 −2 src/glscopeclient/OscilloscopeWindow.h
  6. +2 −2 src/glscopeclient/ScopeApp.cpp
  7. +2 −1 src/glscopeclient/ScopeApp.h
  8. +4 −1 src/glscopeclient/main.cpp
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ endif()
if(ANALYZE)
find_program(CPPCHECK_PATH cppcheck DOC "Path to cppcheck when ANALYZE is enabled")
if(CPPCHECK_PATH)
set(CMAKE_CXX_CPPCHECK "${CPPCHECK_PATH};-DFT_USE_AUTOCONF_SIZEOF_TYPES;--enable=warning,performance,portability;--suppress=*:*sigc*;--suppress=*:*glibmm*;--suppress=*:*gtkmm*;--inline-suppr;-q;--std=c++11")
set(CMAKE_CXX_CPPCHECK "${CPPCHECK_PATH};-DFT_USE_AUTOCONF_SIZEOF_TYPES;-D__GNUC__;--enable=warning,performance,portability;--suppress=*:*sigc*;--suppress=*:*glibmm*;--suppress=*:*gtkmm*;--inline-suppr;-q;--std=c++11")
message(STATUS "Found CPPCheck: ${CPPCHECK_PATH}")
else()
message(STATUS "CPPCheck not found")
2 changes: 1 addition & 1 deletion doc
11 changes: 8 additions & 3 deletions src/glscopeclient/OscilloscopeWindow.cpp
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ using namespace std;
/**
@brief Initializes the main window
*/
OscilloscopeWindow::OscilloscopeWindow(const vector<Oscilloscope*>& scopes, bool nodigital)
OscilloscopeWindow::OscilloscopeWindow(const vector<Oscilloscope*>& scopes, bool nodigital, bool nospectrum)
: m_iconEnterFullscreen("icons/24x24/fullscreen-enter.png")
, m_iconExitFullscreen("icons/24x24/fullscreen-exit.png")
, m_scopes(scopes)
@@ -79,7 +79,7 @@ OscilloscopeWindow::OscilloscopeWindow(const vector<Oscilloscope*>& scopes, bool
set_default_size(1280, 800);

//Add widgets
CreateWidgets(nodigital);
CreateWidgets(nodigital, nospectrum);

ArmTrigger(false);
m_toggleInProgress = false;
@@ -133,7 +133,7 @@ OscilloscopeWindow::~OscilloscopeWindow()
/**
@brief Helper function for creating widgets and setting up signal handlers
*/
void OscilloscopeWindow::CreateWidgets(bool nodigital)
void OscilloscopeWindow::CreateWidgets(bool nodigital, bool nospectrum)
{
//Set up window hierarchy
add(m_vbox);
@@ -365,6 +365,10 @@ void OscilloscopeWindow::CreateWidgets(bool nodigital)
auto wg = group;
if(chan->GetXAxisUnits() == Unit(Unit::UNIT_HZ))
{
//Skip spectrum channels on request
if(nospectrum)
continue;

//This is the first frequency domain channel, make a new group
if(!spectrumGroup)
{
@@ -2731,6 +2735,7 @@ void OscilloscopeWindow::OnAboutDialog()
"Benjamin Vernoux",
"four0four",
"Katharina B",
"Kenley Cheung",
"Mike Walters",
"noopwafel",
"Pepijn De Vos",
4 changes: 2 additions & 2 deletions src/glscopeclient/OscilloscopeWindow.h
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ class MultimeterDialog;
class OscilloscopeWindow : public Gtk::Window
{
public:
OscilloscopeWindow(const std::vector<Oscilloscope*>& scopes, bool nodigital);
OscilloscopeWindow(const std::vector<Oscilloscope*>& scopes, bool nodigital, bool nospectrum);
~OscilloscopeWindow();

void OnAutofitHorizontal();
@@ -145,7 +145,7 @@ class OscilloscopeWindow : public Gtk::Window
void UpdateStatusBar();

//Initialization
void CreateWidgets(bool nodigital);
void CreateWidgets(bool nodigital, bool nospectrum);

//Widgets
Gtk::VBox m_vbox;
4 changes: 2 additions & 2 deletions src/glscopeclient/ScopeApp.cpp
Original file line number Diff line number Diff line change
@@ -43,11 +43,11 @@ ScopeApp::~ScopeApp()
ShutDownSession();
}

void ScopeApp::run(string fileToLoad, bool reconnect, bool nodata, bool retrigger, bool nodigital)
void ScopeApp::run(string fileToLoad, bool reconnect, bool nodata, bool retrigger, bool nodigital, bool nospectrum)
{
register_application();

m_window = new OscilloscopeWindow(m_scopes, nodigital);
m_window = new OscilloscopeWindow(m_scopes, nodigital, nospectrum);
add_window(*m_window);

//Handle file loads specified on the command line
3 changes: 2 additions & 1 deletion src/glscopeclient/ScopeApp.h
Original file line number Diff line number Diff line change
@@ -51,7 +51,8 @@ class ScopeApp : public Gtk::Application

std::vector<Oscilloscope*> m_scopes;

virtual void run(std::string fileToLoad, bool reconnect, bool nodata, bool retrigger, bool nodigital);
virtual void run(
std::string fileToLoad, bool reconnect, bool nodata, bool retrigger, bool nodigital, bool nospectrum);

void DispatchPendingEvents();

5 changes: 4 additions & 1 deletion src/glscopeclient/main.cpp
Original file line number Diff line number Diff line change
@@ -108,6 +108,7 @@ int main(int argc, char* argv[])
bool nodata = false;
bool retrigger = false;
bool nodigital = false;
bool nospectrum = false;
for(int i=1; i<argc; i++)
{
string s(argv[i]);
@@ -135,6 +136,8 @@ int main(int argc, char* argv[])
retrigger = true;
else if(s == "--nodigital")
nodigital = true;
else if(s == "--nospectrum")
nospectrum = true;
else if(s[0] == '-')
{
fprintf(stderr, "Unrecognized command-line argument \"%s\", use --help\n", s.c_str());
@@ -288,7 +291,7 @@ int main(int argc, char* argv[])
g_app->m_scopes.push_back(scope);
}

g_app->run(fileToLoad, reconnect, nodata, retrigger, nodigital);
g_app->run(fileToLoad, reconnect, nodata, retrigger, nodigital, nospectrum);
delete g_app;
return 0;
}