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
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7af219083857
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 063b3f458341
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Feb 17, 2020

  1. Copy the full SHA
    063b3f4 View commit details
Showing with 8 additions and 1 deletion.
  1. +1 −0 scopehal/OscilloscopeChannel.cpp
  2. +6 −0 scopehal/OscilloscopeChannel.h
  3. +0 −1 scopehal/Unit.cpp
  4. +1 −0 scopeprotocols/FFTDecoder.cpp
1 change: 1 addition & 0 deletions scopehal/OscilloscopeChannel.cpp
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ OscilloscopeChannel::OscilloscopeChannel(
, m_index(index)
, m_physical(physical)
, m_refcount(0)
, m_xAxisUnit(Unit::UNIT_PS)
, m_yAxisUnit(Unit::UNIT_VOLTS)
{
}
6 changes: 6 additions & 0 deletions scopehal/OscilloscopeChannel.h
Original file line number Diff line number Diff line change
@@ -141,6 +141,9 @@ class OscilloscopeChannel
virtual double GetOffset();
virtual void SetOffset(double offset);

virtual Unit GetXAxisUnits()
{ return m_xAxisUnit; }

virtual Unit GetYAxisUnits()
{ return m_yAxisUnit; }

@@ -172,6 +175,9 @@ class OscilloscopeChannel
///Number of references (channel is disabled when last ref is released)
size_t m_refcount;

///Unit of measurement for our horizontal axis
Unit m_xAxisUnit;

///Unit of measurement for our vertical axis
Unit m_yAxisUnit;
};
1 change: 0 additions & 1 deletion scopehal/Unit.cpp
Original file line number Diff line number Diff line change
@@ -93,7 +93,6 @@ string Unit::PrettyPrint(double value)
}
else if(fabs(value) >= 1e3)
{
LogDebug("value = %.4f ps\n", value);
value_rescaled = value / 1e3;
scale = "n";
}
1 change: 1 addition & 0 deletions scopeprotocols/FFTDecoder.cpp
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ FFTCapture::~FFTCapture()
FFTDecoder::FFTDecoder(string color)
: ProtocolDecoder(OscilloscopeChannel::CHANNEL_TYPE_ANALOG, color, CAT_MATH)
{
m_xAxisUnit = Unit(Unit::UNIT_HZ);
m_yAxisUnit = Unit(Unit::UNIT_DB);

//Set up channels