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

Commits on Jul 30, 2020

  1. Copy the full SHA
    87727df View commit details
  2. Copy the full SHA
    9009645 View commit details
Showing with 13 additions and 10 deletions.
  1. +7 −4 scopehal/LeCroyOscilloscope.cpp
  2. +3 −3 scopehal/ProtocolDecoder.cpp
  3. +3 −3 scopehal/ProtocolDecoder.h
11 changes: 7 additions & 4 deletions scopehal/LeCroyOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -126,11 +126,7 @@ void LeCroyOscilloscope::IdentifyHardware()
else if(m_model.find("DDA5") == 0)
m_modelid = MODEL_DDA_5K;
else if(m_model.find("WAVERUNNER8") == 0)
{
m_modelid = MODEL_WAVERUNNER_8K;
if(m_model.find("4M") != string::npos)
m_hasFastSampleRate = true;
}
else if(m_model.find("SDA3") == 0)
m_modelid = MODEL_SDA_3K;
else if (m_vendor.compare("SIGLENT") == 0)
@@ -208,6 +204,13 @@ void LeCroyOscilloscope::DetectOptions()
LogDebug("* AFG (function generator)\n");
}

//Look for M option (extra sample rate and memory)
else if(o == "-M")
{
m_hasFastSampleRate = true;
LogDebug("* -M (extra sample rate and memory)\n");
}

//Ignore protocol decodes, we do those ourselves
else if( (o == "I2C") || (o == "UART") || (o == "SPI") )
{
6 changes: 3 additions & 3 deletions scopehal/ProtocolDecoder.cpp
Original file line number Diff line number Diff line change
@@ -150,7 +150,7 @@ string ProtocolDecoderParameter::ToString()
else if(fabs(m_intval) > 1000.0f)
snprintf(str_out, sizeof(str_out), "%f k", m_intval / 1000.0f);
else
snprintf(str_out, sizeof(str_out), "%d", m_intval);
snprintf(str_out, sizeof(str_out), "%ld", m_intval);
break;
break;
case TYPE_FILENAME:
@@ -161,7 +161,7 @@ string ProtocolDecoderParameter::ToString()
return str_out;
}

int ProtocolDecoderParameter::GetIntVal()
int64_t ProtocolDecoderParameter::GetIntVal()
{
return m_intval;
}
@@ -181,7 +181,7 @@ vector<string> ProtocolDecoderParameter::GetFileNames()
return m_filenames;
}

void ProtocolDecoderParameter::SetIntVal(int i)
void ProtocolDecoderParameter::SetIntVal(int64_t i)
{
m_intval = i;
m_floatval = i;
6 changes: 3 additions & 3 deletions scopehal/ProtocolDecoder.h
Original file line number Diff line number Diff line change
@@ -58,14 +58,14 @@ class ProtocolDecoderParameter
bool GetBoolVal()
{ return (m_intval != 0); }

int GetIntVal();
int64_t GetIntVal();
float GetFloatVal();
std::string GetFileName();
std::vector<std::string> GetFileNames();

void SetBoolVal(bool b)
{ m_intval = b; }
void SetIntVal(int i);
void SetIntVal(int64_t i);
void SetFloatVal(float f);
void SetFileName(std::string f);
void SetFileNames(std::vector<std::string> names);
@@ -80,7 +80,7 @@ class ProtocolDecoderParameter
protected:
ParameterTypes m_type;

int m_intval;
int64_t m_intval;
float m_floatval;
std::string m_filename;
std::vector<std::string> m_filenames;