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: aece45c10626
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: 911aeaa02b6b
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Mar 21, 2020

  1. Copy the full SHA
    911aeaa View commit details
Showing with 7 additions and 1 deletion.
  1. +7 −1 glscopeclient/WaveformArea_cairo.cpp
8 changes: 7 additions & 1 deletion glscopeclient/WaveformArea_cairo.cpp
Original file line number Diff line number Diff line change
@@ -450,7 +450,13 @@ void WaveformArea::RenderChannelLabel(Cairo::RefPtr< Cairo::Context > cr)
//Format timebase
double gsps = 1000.0f / data->m_timescale;
if(gsps > 1)
snprintf(tmp, sizeof(tmp), "%.0f GS/s", gsps);
{
//If sample rate isn't a round Gsps number, add more digits
if(floor(gsps) != gsps)
snprintf(tmp, sizeof(tmp), "%.2f GS/s", gsps);
else
snprintf(tmp, sizeof(tmp), "%.0f GS/s", gsps);
}
else if(gsps > 0.001)
snprintf(tmp, sizeof(tmp), "%.0f MS/s", gsps * 1000);
else