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

Commits on Oct 12, 2020

  1. Copy the full SHA
    2a17c88 View commit details
Showing with 11 additions and 7 deletions.
  1. +10 −7 scopeprotocols/Ethernet10BaseTDecoder.cpp
  2. +1 −0 scopeprotocols/Ethernet10BaseTDecoder.h
17 changes: 10 additions & 7 deletions scopeprotocols/Ethernet10BaseTDecoder.cpp
Original file line number Diff line number Diff line change
@@ -39,7 +39,10 @@ using namespace std;
Ethernet10BaseTDecoder::Ethernet10BaseTDecoder(string color)
: EthernetProtocolDecoder(color)
{
}

Ethernet10BaseTDecoder::~Ethernet10BaseTDecoder()
{
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -98,10 +101,10 @@ void Ethernet10BaseTDecoder::Refresh()
//Look for a falling edge with at least -500 mV differential (falling edge of the first preamble bit)
if(!FindFallingEdge(i, din))
{
LogDebug("Capture ended before finding another preamble\n");
LogTrace("Capture ended before finding another preamble\n");
break;
}
LogDebug("Start of frame\n");
LogTrace("Start of frame\n");

uint8_t current_byte = 0;
int bitcount = 0;
@@ -123,7 +126,7 @@ void Ethernet10BaseTDecoder::Refresh()
//LogDebug("Looking for %d -> %d edge\n", current_state, !current_state);
if(!FindEdge(i, din, !current_state))
{
LogDebug("Capture ended while looking for middle of this bit\n");
LogTrace("Capture ended while looking for middle of this bit\n");
done = true;
break;
}
@@ -140,13 +143,13 @@ void Ethernet10BaseTDecoder::Refresh()
delta * 1.0f / ui_width);*/
if(delta > 10 * ui_width)
{
LogDebug("Premature end of frame (middle of a bit)\n");
LogTrace("Premature end of frame (middle of a bit)\n");
i++;
break;
}
if( (delta < eye_start) || (delta > eye_end) )
{
LogDebug("Edge was in the wrong place, skipping it and attempting resync\n");
LogTrace("Edge was in the wrong place, skipping it and attempting resync\n");
i++;
ui_start = din->m_offsets[i] * cap->m_timescale;
current_state = !current_state;
@@ -178,7 +181,7 @@ void Ethernet10BaseTDecoder::Refresh()
//See if we have an edge at the end of this bit period
if(!FindEdge(i, din, current_state))
{
LogDebug("Capture ended while looking for end of this bit\n");
LogTrace("Capture ended while looking for end of this bit\n");
done = true;
break;
}
@@ -188,7 +191,7 @@ void Ethernet10BaseTDecoder::Refresh()
//If the next edge is more than ten UIs after this one, declare the frame over
if(delta > 10*ui_width)
{
LogDebug("Normal end of frame\n");
LogTrace("Normal end of frame\n");
i++;
break;
}
1 change: 1 addition & 0 deletions scopeprotocols/Ethernet10BaseTDecoder.h
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@ class Ethernet10BaseTDecoder : public EthernetProtocolDecoder
{
public:
Ethernet10BaseTDecoder(std::string color);
virtual ~Ethernet10BaseTDecoder();

virtual void Refresh();
static std::string GetProtocolName();