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: e90ef48c9f56
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0a7708203f40
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 2, 2021

  1. Copy the full SHA
    39198cd View commit details
  2. Merge pull request #447 from mubes/doze_compile_error

    Fix windows compilation error due to lack of usleep
    azonenberg authored May 2, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0a77082 View commit details
Showing with 8 additions and 6 deletions.
  1. +8 −6 scopehal/SiglentSCPIOscilloscope.cpp
14 changes: 8 additions & 6 deletions scopehal/SiglentSCPIOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -52,6 +52,8 @@
#include <immintrin.h>
#include <stdarg.h>
#include <omp.h>
#include <thread>
#include <chrono>

#include "DropoutTrigger.h"
#include "EdgeTrigger.h"
@@ -69,9 +71,9 @@ static const struct
float val;
} c_threshold_table[] = {{"TTL", 1.5F}, {"CMOS", 2.5F}, {"LVCMOS33", 3.3F}, {"LVCMOS25", 1.5F}, {NULL, 0}};

static const int c_setting_delay = 50000; // Delay in uS required when setting parameters via SCPI
static const char* c_custom_thresh = "CUSTOM,"; // Prepend string for custom digital threshold
static const float c_thresh_thresh = 0.01f; // Zero equivalence threshold for fp comparisons
static const std::chrono::milliseconds c_setting_delay(50); // Delay required when setting parameters via SCPI
static const char* c_custom_thresh = "CUSTOM,"; // Prepend string for custom digital threshold
static const float c_thresh_thresh = 0.01f; // Zero equivalence threshold for fp comparisons

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Construction / destruction
@@ -972,7 +974,7 @@ vector<WaveformBase*> SiglentSCPIOscilloscope::ProcessAnalogWaveform(const char*
time_t ttime,
double basetime,
double* wavetime,
int /* ch */)
int /* ch */)
{
vector<WaveformBase*> ret;

@@ -2073,7 +2075,7 @@ void SiglentSCPIOscilloscope::SetDigitalThreshold(size_t channel, float level)
sendOnly(":DIGITAL:THRESHOLD%d CUSTOM,%1.2E", (channel / 8) + 1, level);

// This is a kludge to get the custom threshold to stick.
usleep(c_setting_delay);
this_thread::sleep_for(c_setting_delay);
} while(fabsf((GetDigitalThreshold(channel + m_analogChannelCount + 1) - level)) > 0.1f);
}
}
@@ -2540,7 +2542,7 @@ void SiglentSCPIOscilloscope::PushEdgeTrigger(EdgeTrigger* trig, const std::stri
}
//Level
sendOnly(":TRIGGER:%s:LEVEL %e", trigType.c_str(), trig->GetLevel());
usleep(c_setting_delay);
this_thread::sleep_for(c_setting_delay);
}

/**