Skip to content

Commit 68643e9

Browse files
authored
Merge branch 'ngscopeclient:master' into stream-browser-dialog-update
2 parents 9598004 + b397e0e commit 68643e9

14 files changed

Lines changed: 263 additions & 53 deletions

release-notes/CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ This is a running list of significant bug fixes and new features since the last
55
## New features since v0.1.1
66

77
* Core: Changed rate limiting sleep in InstrumentThread loop from 10ms to 1ms to avoid bogging down high performance instruments like the ThunderScope
8+
* Core: Scopesession loading now uses multithreaded IO for significant performance gains especially when many channels and deep history are involved
89
* Drivers: ThunderScope now overlaps socket IO and GPU processing of waveforms giving a significant increase in WFM/s rate
9-
* Filters: Added GPU acceleration for several filters including CDR PLL (7.5x speedup), 100baseTX (2.5x speedup), eye pattern (25x speedup), histogram (12x speedup), TIE (5.3x speedup) and more (https://github.com/ngscopeclient/scopehal/issues/977).
10-
* Filters: CDR PLL now outputs the input signal sampled by the recovered clock in a second data stream.
10+
* Filters: Added GPU acceleration for several filters including CDR PLL (7.5x speedup), 100baseTX (10x speedup), eye pattern (25x speedup), histogram (12x speedup), TIE (5.3x speedup) and more (https://github.com/ngscopeclient/scopehal/issues/977).
11+
* Filters: CDR PLL now outputs the input signal sampled by the recovered clock in a second data stream (https://github.com/ngscopeclient/scopehal/issues/991)
1112
* Filters: Peak detector for FFT etc now does quadratic interpolation for sub-sample peak fitting
1213
* Filters: Horizontal bathtub curve now works properly with MLT-3 / PAM-3 eyes as well as NRZ. No PAM-4 or higher support yet.
1314
* Filters: PcapNG export now has an additional mode selector for use with named pipes, allowing live streaming of PcapNG formatted data to WireShark
@@ -21,9 +22,14 @@ We try to maintain compatibility with older versions of ngscopeclient but occasi
2122

2223
## Bugs fixed since v0.1.1
2324

25+
* Filters: broken CSV import with \r\n line endings (https://github.com/ngscopeclient/scopehal-apps/issues/939)
2426
* Filters: PcapNG export did not handle named pipes correctly (no github ticket)
2527
* Filters: FFT waveforms were shifted one bin to the right of the correct position
2628
* Filters: Frequency and period measurement had a rounding error during integer-to-floating-point conversion causing half a cycle of the waveform to be dropped under some circumstances leading to an incorrect result, with worse error at low frequencies and short memory depths. This only affected the "summary" output not the trend plot.
29+
* GUI: Crash when closing a session (https://github.com/ngscopeclient/scopehal-apps/issues/934)
2730
* GUI: Pressing middle mouse on the Y axis to autoscale would fail, setting the full scale range to zero volts, if the waveform was resident in GPU memory and the CPU-side copy of the buffer was stale
31+
* GUI: History dialog allowed zero or negative values for history depth (https://github.com/ngscopeclient/scopehal-apps/issues/940)
2832

2933
## Other changes since v0.1.1
34+
35+
* General UI overhaul of stream browser to make things more intuitive and reduce the number of clicks needed to perform common tasks

src/ngscopeclient/HistoryDialog.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2025 Andrew D. Zonenberg and contributors *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -142,6 +142,10 @@ bool HistoryDialog::DoRender()
142142
"Adjust the cap on total history depth, in waveforms.\n"
143143
"Large history depths can use significant amounts of RAM with deep memory.");
144144

145+
//Clamp depth so it can't go below 1
146+
if(m_mgr.m_maxDepth < 1)
147+
m_mgr.m_maxDepth = 1;
148+
145149
if(ImGui::BeginTable("history", 3, flags))
146150
{
147151
ImGui::TableSetupScrollFreeze(0, 1); //Header row does not scroll

src/ngscopeclient/HistoryManager.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,33 @@ void HistoryManager::LoadEmptyHistoryToSession(Session& session)
214214
}
215215
}
216216

217+
/**
218+
@brief Retroactively modify history for an instrument
219+
220+
This is used during session loading if we find waveforms in certain legacy formats that need to be converted
221+
ex post facto
222+
*/
223+
void HistoryManager::Retcon(shared_ptr<Oscilloscope> scope, size_t chan, size_t stream, WaveformBase* wfm)
224+
{
225+
TimePoint tp(wfm->m_startTimestamp, wfm->m_startFemtoseconds);
226+
227+
for(auto& point : m_history)
228+
{
229+
if(point->m_time != tp)
230+
continue;
231+
232+
//Make sure we have history for this scope
233+
auto jt = point->m_history.find(scope);
234+
if(jt == point->m_history.end())
235+
return;
236+
237+
//Overwrite the waveform.
238+
//Does not free the old one, it's assumed this is done by SetData() on the scope before calling this function
239+
jt->second[StreamDescriptor(scope->GetChannel(chan), stream)] = wfm;
240+
break;
241+
}
242+
}
243+
217244
/**
218245
@brief Adds new data to the history
219246
@@ -262,6 +289,7 @@ void HistoryManager::AddHistory(
262289

263290
//If we already have a history point for the same exact timestamp, do nothing
264291
//Either a bug or we're in append mode
292+
//TODO: when loading multiscope scopesessions, do we want to add stuff here??
265293
if(HasHistory(tp))
266294
return;
267295

src/ngscopeclient/HistoryManager.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -77,6 +77,8 @@ class HistoryManager
7777

7878
bool OnMemoryPressure(MemoryPressureLevel level, MemoryPressureType type, size_t requestedSize);
7979

80+
void Retcon(std::shared_ptr<Oscilloscope> scope, size_t chan, size_t stream, WaveformBase* wfm);
81+
8082
void AddHistory(
8183
const std::vector<std::shared_ptr<Oscilloscope>>& scopes,
8284
bool deleteOld = true,

src/ngscopeclient/MainWindow.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2025 Andrew D. Zonenberg and contributors *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -171,9 +171,7 @@ MainWindow::MainWindow(shared_ptr<QueueHandle> queue)
171171
m_toolbarIconSize = 0;
172172
LoadToolbarIcons();
173173
LoadGradients();
174-
m_texmgr.LoadTexture("warning", FindDataFile("icons/48x48/dialog-warning-2.png"));
175-
m_texmgr.LoadTexture("visible-spectrum-380nm-750nm",
176-
FindDataFile("icons/gradients/visible-spectrum-380nm-750nm.png"));
174+
LoadMiscIcons();
177175
LoadFilterIcons();
178176
LoadStatusBarIcons();
179177
LoadWaveformShapeIcons();
@@ -1317,6 +1315,9 @@ void MainWindow::DockingArea()
13171315
{
13181316
LogTrace("Docking initial workspace\n");
13191317

1318+
//Undock anything that might already be there
1319+
ImGui::DockBuilderRemoveNodeChildNodes(topNode->ID);
1320+
13201321
//Split the top into two sub nodes (unless imgui already did it for us during a session reset)
13211322
ImGuiID leftPanelID;
13221323
ImGuiID rightPanelID;
@@ -1331,10 +1332,10 @@ void MainWindow::DockingArea()
13311332
ImGui::DockBuilderDockWindow(m_streamBrowser->GetTitleAndID().c_str(), leftPanelID);
13321333
ImGui::DockBuilderDockWindow(m_initialWorkspaceDockRequest->GetTitleAndID().c_str(), rightPanelID);
13331334

1334-
m_initialWorkspaceDockRequest = nullptr;
1335-
13361335
//Finish up
13371336
ImGui::DockBuilderFinish(dockspace_id);
1337+
1338+
m_initialWorkspaceDockRequest = nullptr;
13381339
}
13391340
}
13401341
else

src/ngscopeclient/MainWindow.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2025 Andrew D. Zonenberg and contributors *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -130,7 +130,7 @@ class MainWindow : public VulkanWindow
130130
{ m_splitRequests.push_back(SplitGroupRequest(group, direction, stream)); }
131131

132132
void ShowChannelProperties(OscilloscopeChannel* channel);
133-
void ShowInstrumentProperties(std::shared_ptr<Instrument> instrumet);
133+
void ShowInstrumentProperties(std::shared_ptr<Instrument> instrument);
134134
void ShowTriggerProperties();
135135
void ShowManageInstruments();
136136
void ShowSyncWizard(std::shared_ptr<TriggerGroup> group, std::shared_ptr<Oscilloscope> secondary);
@@ -275,6 +275,7 @@ class MainWindow : public VulkanWindow
275275
std::vector<std::string> m_eyeGradients;
276276

277277
void LoadFilterIcons();
278+
void LoadMiscIcons();
278279
void LoadStatusBarIcons();
279280
void LoadWaveformShapeIcons();
280281
void LoadAppIcon();

src/ngscopeclient/MainWindow_Icons.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2025 Andrew D. Zonenberg and contributors *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -793,6 +793,17 @@ string MainWindow::GetIconForWaveformShape(FunctionGenerator::WaveShape shape)
793793
return "shape-default";
794794
}
795795

796+
/**
797+
@brief Load various miscellaneous icons and textures
798+
*/
799+
void MainWindow::LoadMiscIcons()
800+
{
801+
m_texmgr.LoadTexture("warning", FindDataFile("icons/48x48/dialog-warning-2.png"));
802+
m_texmgr.LoadTexture("info", FindDataFile("icons/48x48/dialog-information-3.png"));
803+
m_texmgr.LoadTexture("visible-spectrum-380nm-750nm",
804+
FindDataFile("icons/gradients/visible-spectrum-380nm-750nm.png"));
805+
}
806+
796807
/**
797808
@brief Load toolbar icons from disk if preferences changed
798809
*/

0 commit comments

Comments
 (0)