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

Commits on Mar 15, 2020

  1. Copy the full SHA
    768a0cd View commit details
Showing with 7 additions and 8 deletions.
  1. +7 −8 scopehal/ProtocolDecoder.cpp
15 changes: 7 additions & 8 deletions scopehal/ProtocolDecoder.cpp
Original file line number Diff line number Diff line change
@@ -78,27 +78,26 @@ void ProtocolDecoderParameter::ParseString(string str)
m_intval = 1;
else
m_intval = 0;

m_floatval = m_intval;
break;

//Parse both int and float as float
//so e.g. 1.5M parses correctly
case TYPE_FLOAT:
case TYPE_INT:
sscanf(str.c_str(), "%20f", &m_floatval);
m_floatval *= scale;
m_intval = m_floatval;
m_filename = "";
break;
case TYPE_INT:
sscanf(str.c_str(), "%10d", &m_intval);
m_floatval = m_intval;
m_filename = "";
break;

case TYPE_FILENAME:
m_intval = 0;
m_floatval = 0;
m_filename = str;
break;
}

m_intval *= scale;
m_floatval *= scale;
}

string ProtocolDecoderParameter::ToString()