Skip to content

Commit f4c0d5b

Browse files
committed
Updated to latest scopehal with bug fixes and filter error reporting support. Began work on filter error reporting in graph editor.
1 parent e5191cd commit f4c0d5b

3 files changed

Lines changed: 52 additions & 7 deletions

File tree

lib

release-notes/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This is a running list of significant bug fixes and new features since the last
1515
* Filters: Horizontal bathtub curve now works properly with MLT-3 / PAM-3 eyes as well as NRZ. No PAM-4 or higher support yet.
1616
* Filters: PcapNG export now has an additional mode selector for use with named pipes, allowing live streaming of PcapNG formatted data to WireShark
1717
* GUI: enabled mouseover BER measurements on MLT-3 / PAM-3 eyes as well as NRZ. No PAM-4 or higher support yet.
18+
* GUI: Filter graph editor now allows filters and instrument channels to display error messages when their configuration is invalid or something goes wrong. Not all drivers/filters take advantage of this yet.
1819

1920
## Breaking changes since v0.1.1
2021

@@ -35,6 +36,7 @@ We try to maintain compatibility with older versions of ngscopeclient but occasi
3536
* GUI: Crash when closing a session (https://github.com/ngscopeclient/scopehal-apps/issues/934)
3637
* 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
3738
* GUI: History dialog allowed zero or negative values for history depth (https://github.com/ngscopeclient/scopehal-apps/issues/940)
39+
* Session files: Windows build could not load session files containing sample rates or memory depths in excess of 2^32
3840

3941
## Other changes since v0.1.1
4042

src/ngscopeclient/FilterGraphEditor.cpp

Lines changed: 49 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 *
@@ -2197,29 +2197,29 @@ void FilterGraphEditor::DoNodeForChannel(
21972197
//TODO: add an option for toggling this
21982198
//TODO: add preference for colors
21992199
//Draw a bubble above the text with the runtime stats
2200+
float messageSpacing = 0.1 * headerheight;
2201+
float nextIconBot = pos.y - messageSpacing;
22002202
if(runtime > 0)
22012203
{
22022204
auto runtimeText = fs.PrettyPrint(runtime, 3);
22032205
auto runtimeSize = ImGui::CalcTextSize(runtimeText.c_str());
22042206

22052207
auto timebgColor = ColorFromString("#404040");
22062208
auto timeTextColor = ColorFromString("#ffffff");
2207-
float timespacing = 0.1 * headerheight;
2208-
float runtimeBot = pos.y - timespacing;
22092209
float bubbleHeight = runtimeSize.y + 2*ImGui::GetStyle().FramePadding.y;
22102210

22112211
ImVec2 clockiconpos(
22122212
pos.x + ImGui::GetStyle().FramePadding.x,
2213-
runtimeBot - bubbleHeight + ImGui::GetStyle().FramePadding.y);
2213+
nextIconBot - bubbleHeight + ImGui::GetStyle().FramePadding.y);
22142214
ImVec2 clockiconsize(runtimeSize.y, runtimeSize.y);
22152215

22162216
ImVec2 textpos(
22172217
clockiconpos.x + clockiconsize.x + ImGui::GetStyle().ItemSpacing.x,
22182218
clockiconpos.y );
22192219

22202220
bgList->AddRectFilled(
2221-
ImVec2(pos.x + 1, runtimeBot - bubbleHeight),
2222-
ImVec2(textpos.x + runtimeSize.x + ImGui::GetStyle().FramePadding.y, runtimeBot),
2221+
ImVec2(pos.x + 1, nextIconBot - bubbleHeight),
2222+
ImVec2(textpos.x + runtimeSize.x + ImGui::GetStyle().FramePadding.y, nextIconBot),
22232223
timebgColor,
22242224
rounding,
22252225
ImDrawFlags_RoundCornersAll);
@@ -2233,7 +2233,50 @@ void FilterGraphEditor::DoNodeForChannel(
22332233
textpos,
22342234
timeTextColor,
22352235
runtimeText.c_str());
2236+
2237+
nextIconBot -= runtimeSize.y + 3*messageSpacing;
2238+
}
2239+
2240+
//Display errors
2241+
if(channel->HasErrors())
2242+
{
2243+
auto errorText = /*channel->GetErrorLog()*/ string("ERROR");
2244+
auto errorSize = ImGui::CalcTextSize(errorText.c_str());
2245+
2246+
//TODO: preferences?
2247+
auto bgColor = ColorFromString("#404040");
2248+
auto textColor = ColorFromString("#ffffff");
2249+
float bubbleHeight = errorSize.y + 2*ImGui::GetStyle().FramePadding.y;
2250+
2251+
ImVec2 erriconpos(
2252+
pos.x + ImGui::GetStyle().FramePadding.x,
2253+
nextIconBot - bubbleHeight + ImGui::GetStyle().FramePadding.y);
2254+
ImVec2 erriconsize(errorSize.y, errorSize.y);
2255+
2256+
ImVec2 textpos(
2257+
erriconpos.x + erriconsize.x + ImGui::GetStyle().ItemSpacing.x,
2258+
erriconpos.y );
2259+
2260+
bgList->AddRectFilled(
2261+
ImVec2(pos.x + 1, nextIconBot - bubbleHeight),
2262+
ImVec2(textpos.x + errorSize.x + ImGui::GetStyle().FramePadding.y, nextIconBot),
2263+
bgColor,
2264+
rounding,
2265+
ImDrawFlags_RoundCornersAll);
2266+
2267+
bgList->AddImage(
2268+
m_parent->GetTextureManager()->GetTexture("error"),
2269+
erriconpos,
2270+
erriconpos + erriconsize );
2271+
2272+
bgList->AddText(
2273+
textpos,
2274+
textColor,
2275+
errorText.c_str());
2276+
2277+
nextIconBot -= errorSize.y + 3*messageSpacing;
22362278
}
2279+
22372280
ImGui::PopFont(); // headerfont
22382281

22392282
//Draw the force vector

0 commit comments

Comments
 (0)