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: 1c254db2f295
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: a7b548721c70
Choose a head ref
  • 1 commit
  • 5 files changed
  • 1 contributor

Commits on Sep 3, 2020

  1. When packets are clicked in the protocol analyzer view they're now ce…

    …ntered in the view instead of way off on the left where they're hard to see
    azonenberg committed Sep 3, 2020
    Copy the full SHA
    a7b5487 View commit details
Showing with 13 additions and 2 deletions.
  1. +1 −1 lib
  2. +1 −1 src/glscopeclient/ProtocolAnalyzerWindow.cpp
  3. +2 −0 src/glscopeclient/WaveformArea.h
  4. +8 −0 src/glscopeclient/WaveformArea_events.cpp
  5. +1 −0 src/glscopeclient/WaveformArea_rendering.cpp
2 changes: 1 addition & 1 deletion lib
Submodule lib updated from 18c305 to 8cb296
2 changes: 1 addition & 1 deletion src/glscopeclient/ProtocolAnalyzerWindow.cpp
Original file line number Diff line number Diff line change
@@ -217,7 +217,7 @@ void ProtocolAnalyzerWindow::OnSelectionChanged()
m_parent->JumpToHistory(row[m_columns.m_capturekey]);

//Set the offset of the decoder's group
m_area->m_group->m_xAxisOffset = row[m_columns.m_offset];
m_area->CenterTimestamp(row[m_columns.m_offset]);
m_area->m_group->m_frame.queue_draw();
}

2 changes: 2 additions & 0 deletions src/glscopeclient/WaveformArea.h
Original file line number Diff line number Diff line change
@@ -179,6 +179,8 @@ class WaveformArea : public Gtk::GLArea
void MapAllBuffers();
void UnmapAllBuffers();

void CenterTimestamp(int64_t time);

protected:
void SharedCtorInit();

8 changes: 8 additions & 0 deletions src/glscopeclient/WaveformArea_events.cpp
Original file line number Diff line number Diff line change
@@ -1323,3 +1323,11 @@ void WaveformArea::OnStatistics()
else
m_group->ToggleOff(m_selectedChannel.m_channel);
}

void WaveformArea::CenterTimestamp(int64_t time)
{
//Figure out how wide our view is, then offset the point by half that
int64_t width = PixelsToXAxisUnits(m_width);
m_group->m_xAxisOffset = time - width/2;
m_parent->ClearPersistence(m_group);
}
1 change: 1 addition & 0 deletions src/glscopeclient/WaveformArea_rendering.cpp
Original file line number Diff line number Diff line change
@@ -199,6 +199,7 @@ void WaveformArea::PrepareGeometry(WaveformRenderData* wdata)
float alpha_scaled = m_parent->GetTraceAlpha() * 2 / samplesPerPixel;

//Config stuff
//TODO: we should be able to only update this stuff if we pan/zoom, without redoing the waveform data itself
wdata->m_mappedConfigBuffer[0] = m_height; //windowHeight
wdata->m_mappedConfigBuffer[1] = m_plotRight; //windowWidth
wdata->m_mappedConfigBuffer[2] = wdata->m_count; //depth