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: 7ba0cd6a10f4
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: 792b33d48770
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Oct 11, 2020

  1. WaveformArea: now use Unit framework for pretty printing UIs and bit …

    …rate in eye pattern infobox
    azonenberg committed Oct 11, 2020
    Copy the full SHA
    792b33d View commit details
Showing with 3 additions and 8 deletions.
  1. +1 −1 lib
  2. +2 −7 src/glscopeclient/WaveformArea_cairo.cpp
2 changes: 1 addition & 1 deletion lib
Submodule lib updated 1 files
+12 −6 scopehal/Unit.cpp
9 changes: 2 additions & 7 deletions src/glscopeclient/WaveformArea_cairo.cpp
Original file line number Diff line number Diff line change
@@ -535,13 +535,8 @@ void WaveformArea::RenderChannelLabel(Cairo::RefPtr< Cairo::Context > cr)
size_t uis = eye->GetTotalUIs();
float gbps = 1e3f / eye->GetUIWidth();

if(uis < 1e6)
snprintf(tmp, sizeof(tmp), "\n%6.2fk UI\t%.4f Gbps", uis * 1e-3f, gbps);
else if(uis < 1e9)
snprintf(tmp, sizeof(tmp), "\n%6.2fM UI\t%.4f Gbps", uis * 1e-6f, gbps);
else
snprintf(tmp, sizeof(tmp), "\n%6.2fG UI\t%.4f Gbps", uis * 1e-6f, gbps);
label += tmp;
label += string("\n") + Unit(Unit::UNIT_UI).PrettyPrint(uis) + "\t" +
Unit(Unit::UNIT_BITRATE).PrettyPrint(1e12f / eye->GetUIWidth());

auto mask = ed->GetMask();
auto maskname = mask.GetMaskName();