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

Commits on May 3, 2021

  1. Copy the full SHA
    9769f0e View commit details
Showing with 4 additions and 2 deletions.
  1. +4 −2 scopehal/PicoOscilloscope.cpp
6 changes: 4 additions & 2 deletions scopehal/PicoOscilloscope.cpp
Original file line number Diff line number Diff line change
@@ -339,16 +339,20 @@ bool PicoOscilloscope::AcquireData()
size_t chnum;
size_t memdepth;
float scale;
float offset;
SequenceSet s;
for(size_t i=0; i<numChannels; i++)
{
//Get channel ID and memory depth (samples, not bytes)
//Scale and offset are sent in the header since they might have changed since the capture began
if(!m_dataSocket->RecvLooped((uint8_t*)&chnum, sizeof(chnum)))
return false;
if(!m_dataSocket->RecvLooped((uint8_t*)&memdepth, sizeof(memdepth)))
return false;
if(!m_dataSocket->RecvLooped((uint8_t*)&scale, sizeof(scale)))
return false;
if(!m_dataSocket->RecvLooped((uint8_t*)&offset, sizeof(offset)))
return false;
scale *= GetChannelAttenuation(chnum);

//TODO: stream timestamp from the server
@@ -358,8 +362,6 @@ bool PicoOscilloscope::AcquireData()
if(!m_dataSocket->RecvLooped((uint8_t*)buf, memdepth * sizeof(int16_t)))
return false;

auto offset = GetChannelOffset(chnum);

//Create our waveform
AnalogWaveform* cap = new AnalogWaveform;
cap->m_timescale = fs_per_sample;