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: e98bb60d3599
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: 7d279abf9f1b
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Aug 16, 2020

  1. Copy the full SHA
    7d279ab View commit details
Showing with 6 additions and 9 deletions.
  1. +1 −1 lib
  2. +1 −1 src/glscopeclient/WaveformArea.cpp
  3. +1 −1 src/glscopeclient/WaveformArea_cairo.cpp
  4. +3 −6 src/glscopeclient/WaveformArea_rendering.cpp
2 changes: 1 addition & 1 deletion lib
Submodule lib updated from 56b6fc to 06cd31
2 changes: 1 addition & 1 deletion src/glscopeclient/WaveformArea.cpp
Original file line number Diff line number Diff line change
@@ -716,7 +716,7 @@ bool WaveformArea::IsEyeOrBathtub()

bool WaveformArea::IsFFT()
{
return (m_channel->GetYAxisUnits().GetType() == Unit::UNIT_DB);
return (m_channel->GetYAxisUnits().GetType() == Unit::UNIT_DBM);
}

bool WaveformArea::IsTime()
2 changes: 1 addition & 1 deletion src/glscopeclient/WaveformArea_cairo.cpp
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ void WaveformArea::RenderGrid(Cairo::RefPtr< Cairo::Context > cr)
std::map<float, float> gridmap;

//Spectra are printed on a logarithmic scale
if(m_channel->GetYAxisUnits() == Unit::UNIT_DB)
if(m_channel->GetYAxisUnits() == Unit::UNIT_DBM)
{
for(float db=0; db >= -60; db -= 10)
gridmap[db] = DbToYPosition(db);
9 changes: 3 additions & 6 deletions src/glscopeclient/WaveformArea_rendering.cpp
Original file line number Diff line number Diff line change
@@ -182,18 +182,15 @@ void WaveformArea::PrepareGeometry(WaveformRenderData* wdata)
yoff = plotheight;
yscale = plotheight / db_range;
offset = db_offset + db_range/2;

//Convert V to dBm
const float impedance = 50;
for(size_t j=0; j<wdata->m_count; j++)
wdata->m_mappedYBuffer[j] = (10 * log10(psamps[j]*psamps[j] / impedance) + 30);
}
else
{
yoff = ybase;
yscale = m_pixelsPerVolt;
memcpy(wdata->m_mappedYBuffer, psamps, wdata->m_count*sizeof(float));
}

//Copy the waveform
memcpy(wdata->m_mappedYBuffer, psamps, wdata->m_count*sizeof(float));
}

double dt = GetTime() - start;