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: b6745078e3d1
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: 1c8a5fb5bb71
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 31, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    makenowjust Hiroya Fujinami
    Copy the full SHA
    1c8a5fb View commit details
Showing with 13 additions and 4 deletions.
  1. +13 −4 glscopeclient/WaveformArea_cairo.cpp
17 changes: 13 additions & 4 deletions glscopeclient/WaveformArea_cairo.cpp
Original file line number Diff line number Diff line change
@@ -416,11 +416,21 @@ void WaveformArea::RenderDecodeOverlays(Cairo::RefPtr< Cairo::Context > cr)

void WaveformArea::RenderChannelLabel(Cairo::RefPtr< Cairo::Context > cr)
{
//Add sample rate info to physical analog channels
//TODO: do this to some decodes too?
string label = m_channel->m_displayname;
auto data = m_channel->GetData();
if(m_channel->IsPhysicalChannel() && (data != NULL))

//Add RBW to frequency domain channels
char tmp[256];
auto xunits = m_channel->GetXAxisUnits();
if( (xunits == Unit::UNIT_HZ) && (data != NULL) )
{
snprintf(tmp, sizeof(tmp), "\nRBW: %s", xunits.PrettyPrint(data->m_timescale).c_str());
label += tmp;
}

//Add sample rate info to physical analog channels
//TODO: do this to some decodes too?
else if(m_channel->IsPhysicalChannel() && (data != NULL))
{
//Do not render sample rate on digital signals unless we have overlays, because this ~doubles the height
//of the channel and hurts packing density.
@@ -432,7 +442,6 @@ void WaveformArea::RenderChannelLabel(Cairo::RefPtr< Cairo::Context > cr)
label += " : ";

//Format sample depth
char tmp[256];
size_t len = data->m_offsets.size();
if(len > 1e6)
snprintf(tmp, sizeof(tmp), "%.0f MS", len * 1e-6f);