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: 4c05c1461c4f
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: 9b597e0e21a1
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Sep 25, 2020

  1. Updated submodules

    azonenberg committed Sep 25, 2020
    Copy the full SHA
    2c13d88 View commit details
  2. Copy the full SHA
    c2b0fbc View commit details
  3. WaveformArea: use Unit class instead of homegrown conversion code for…

    … pretty printing sample rates
    azonenberg committed Sep 25, 2020
    Copy the full SHA
    9b597e0 View commit details
Showing with 4 additions and 15 deletions.
  1. +1 −1 lib
  2. +2 −14 src/glscopeclient/WaveformArea_cairo.cpp
  3. +1 −0 src/glscopeclient/WaveformArea_events.cpp
2 changes: 1 addition & 1 deletion lib
Submodule lib updated from 5da1ab to 299e60
16 changes: 2 additions & 14 deletions src/glscopeclient/WaveformArea_cairo.cpp
Original file line number Diff line number Diff line change
@@ -583,20 +583,8 @@ void WaveformArea::RenderChannelLabel(Cairo::RefPtr< Cairo::Context > cr)
label += "\n";

//Format timebase
double gsps = 1000.0f / data->m_timescale;
if(gsps > 1)
{
//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
snprintf(tmp, sizeof(tmp), "%.1f kS/s", gsps * 1000 * 1000);
label += tmp;
Unit rate(Unit::UNIT_SAMPLERATE);
label += rate.PrettyPrint(1e12 / data->m_timescale);
}
}

1 change: 1 addition & 0 deletions src/glscopeclient/WaveformArea_events.cpp
Original file line number Diff line number Diff line change
@@ -631,6 +631,7 @@ bool WaveformArea::on_motion_notify_event(GdkEventMotion* event)
double dv = YPositionToVolts(event->y) - m_dragStartVoltage;
double old_offset = m_channel.m_channel->GetOffset();
m_channel.m_channel->SetOffset(old_offset + dv);
SetGeometryDirty();
queue_draw();
}
break;