Skip to content

Commit bf21ef6

Browse files
committed
SiglentSCPIOscilloscope: fix regression around digital channel ID for download status
1 parent d83f232 commit bf21ef6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scopehal/SiglentSCPIOscilloscope.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,7 +2179,7 @@ bool SiglentSCPIOscilloscope::AcquireData()
21792179
if(!paginated)
21802180
{ // All data fits one page
21812181
m_transport->SendCommand(":WAVEFORM:SOURCE D" + to_string(i) + ";:WAVEFORM:DATA?");
2182-
digitalWaveformDataSize[i] = ReadWaveformBlock(acqDigitalBytes, digitalWaveformDataBytes[i], false, [i, this] (float progress) { ChannelsDownloadStatusUpdate(i, InstrumentChannel::DownloadState::DOWNLOAD_IN_PROGRESS, progress); });
2182+
digitalWaveformDataSize[i] = ReadWaveformBlock(acqDigitalBytes, digitalWaveformDataBytes[i], false, [i, this] (float progress) { ChannelsDownloadStatusUpdate(i + m_analogChannelCount, InstrumentChannel::DownloadState::DOWNLOAD_IN_PROGRESS, progress); });
21832183
// This is the 0x0a0a at the end
21842184
m_transport->ReadRawData(2, (unsigned char*)tmp);
21852185
}
@@ -2192,7 +2192,7 @@ bool SiglentSCPIOscilloscope::AcquireData()
21922192
m_transport->SendCommand(":WAVEFORM:START "+ to_string(page*pageSize) + ";:WAVEFORM:DATA?");
21932193
auto progress = [i, this, page, pages] (float progress) {
21942194
float linear_progress = ((float)page + progress) / (float)pages; // the last page will go slightly faster, but oh well
2195-
ChannelsDownloadStatusUpdate(i, InstrumentChannel::DownloadState::DOWNLOAD_IN_PROGRESS, linear_progress);
2195+
ChannelsDownloadStatusUpdate(i + m_analogChannelCount, InstrumentChannel::DownloadState::DOWNLOAD_IN_PROGRESS, linear_progress);
21962196
};
21972197
digitalWaveformDataSize[i] += ReadWaveformBlock(acqDigitalBytes-digitalWaveformDataSize[i], digitalWaveformDataBytes[i]+digitalWaveformDataSize[i], false, progress);
21982198
// This is the 0x0a0a at the end

0 commit comments

Comments
 (0)