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

Commits on May 18, 2021

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    dtzWill Will Dietz
    Copy the full SHA
    cf69d7e View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    524f9ec View commit details
Showing with 15 additions and 8 deletions.
  1. +4 −2 scopehal/CMakeLists.txt
  2. +7 −3 scopehal/Filter.cpp
  3. +4 −3 scopehal/Oscilloscope.cpp
6 changes: 4 additions & 2 deletions scopehal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -3,9 +3,11 @@ link_directories(${GTKMM_LIBRARY_DIRS} ${SIGCXX_LIBRARY_DIRS})

find_library(LXI_LIB lxi)

# Additional WinAPI libraries
# Additional Windows/Linux libraries
if(WIN32)
set(WIN_LIBS shlwapi)
else()
set(LIN_LIBS dl)
endif()

if(LXI_LIB)
@@ -103,7 +105,7 @@ configure_file(config.h.in config.h)
add_library(scopehal SHARED
${SCOPEHAL_SOURCES})
target_link_libraries(scopehal ${SIGCXX_LIBRARIES} ${GTKMM_LIBRARIES} xptools log graphwidget yaml-cpp
${LXI_LIBRARIES} ${WIN_LIBS} ${LIBFFTS_LIBRARIES} ${OpenCL_LIBRARIES} ${CLFFT_LIBRARIES})
${LXI_LIBRARIES} ${WIN_LIBS} ${LIN_LIBS} ${LIBFFTS_LIBRARIES} ${OpenCL_LIBRARIES} ${CLFFT_LIBRARIES})

target_include_directories(scopehal
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
10 changes: 7 additions & 3 deletions scopehal/Filter.cpp
Original file line number Diff line number Diff line change
@@ -689,11 +689,15 @@ void Filter::FindFallingEdges(DigitalWaveform* data, vector<int64_t>& edges)

string Filter::SerializeConfiguration(IDTable& table, size_t /*indent*/)
{
string config = " : \n";
config += FlowGraphNode::SerializeConfiguration(table, 8);
string base = FlowGraphNode::SerializeConfiguration(table, 8);

//Channel info
string config;
char tmp[1024];
snprintf(tmp, sizeof(tmp), " filter%d:\n", table[static_cast<FlowGraphNode*>(this)]);
config += tmp;
config += base;

//Channel info
snprintf(tmp, sizeof(tmp), " protocol: \"%s\"\n", GetProtocolDisplayName().c_str());
config += tmp;
snprintf(tmp, sizeof(tmp), " color: \"%s\"\n", m_displaycolor.c_str());
7 changes: 4 additions & 3 deletions scopehal/Oscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -219,9 +219,10 @@ string Oscilloscope::SerializeConfiguration(IDTable& table)
{
//Save basic scope info
char tmp[1024];
snprintf(tmp, sizeof(tmp), " : \n");
int iscope = table.emplace(this);
snprintf(tmp, sizeof(tmp), " scope%d:\n", iscope);
string config = tmp;
snprintf(tmp, sizeof(tmp), " id: %d\n", table.emplace(this));
snprintf(tmp, sizeof(tmp), " id: %d\n", iscope);
config += tmp;
snprintf(tmp, sizeof(tmp), " nick: \"%s\"\n", m_nickname.c_str());
config += tmp;
@@ -255,7 +256,7 @@ string Oscilloscope::SerializeConfiguration(IDTable& table)
continue; //skip any kind of math functions etc

//Basic channel info
snprintf(tmp, sizeof(tmp), " : \n");
snprintf(tmp, sizeof(tmp), " ch%zu:\n", i);
config += tmp;
snprintf(tmp, sizeof(tmp), " id: %d\n", table.emplace(chan));
config += tmp;