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: 9b597e0e21a1
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: 06db80ae9c94
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Sep 25, 2020

  1. Copy the full SHA
    06db80a View commit details
Showing with 7 additions and 16 deletions.
  1. +1 −1 lib
  2. +6 −15 src/glscopeclient/WaveformArea_cairo.cpp
2 changes: 1 addition & 1 deletion lib
Submodule lib updated from 299e60 to 707381
21 changes: 6 additions & 15 deletions src/glscopeclient/WaveformArea_cairo.cpp
Original file line number Diff line number Diff line change
@@ -569,22 +569,13 @@ void WaveformArea::RenderChannelLabel(Cairo::RefPtr< Cairo::Context > cr)

else
{
label += " : ";

//Format sample depth
size_t len = data->m_offsets.size();
if(len > 1e6)
snprintf(tmp, sizeof(tmp), "%.0f MS", len * 1e-6f);
else if(len > 1e3)
snprintf(tmp, sizeof(tmp), "%.0f kS", len * 1e-3f);
else
snprintf(tmp, sizeof(tmp), "%zu S", len);
label += tmp;
label += "\n";

//Format timebase
//Format sample rate and timebase
Unit depth(Unit::UNIT_SAMPLEDEPTH);
Unit rate(Unit::UNIT_SAMPLERATE);
label += rate.PrettyPrint(1e12 / data->m_timescale);
label +=
" : " +
depth.PrettyPrint(data->m_offsets.size()) + "\n" +
rate.PrettyPrint(1e12 / data->m_timescale);
}
}