Skip to content

Commit 3bd615e

Browse files
committed
Siglent: fixed -Wshadow warning by renaming lambda argument
1 parent d50f63d commit 3bd615e

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

scopehal/SiglentSCPIOscilloscope.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/***********************************************************************************************************************
22
* *
3-
* libscopehal v0.1 *
3+
* libscopehal *
44
* *
5-
* Copyright (c) 2012-2023 Andrew D. Zonenberg and contributors *
5+
* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -66,7 +66,7 @@
6666
* using 4 Channels ( 700 kpts 100 MSa/s) got 1,62 WFM/s
6767
* using 1 Channels ( 1.75 Mpts 250 MSa/s) got 2,38 WFM/s
6868
* using 4 Channels ( 3.5 Mpts 500 MSa/s) got 0,39 WFM/s
69-
*
69+
*
7070
* TODO Click "Reload configuration from scope" sometimes we loosing WAVE rendering ( threading issue ?)
7171
* TODO sometimes socket timeout (Warning: Socket read failed errno=11 errno=4)
7272
*
@@ -1899,10 +1899,10 @@ vector<SparseDigitalWaveform*> SiglentSCPIOscilloscope::ProcessDigitalWaveform(c
18991899

19001900

19011901
//Read and de-duplicate the other samples
1902-
for (size_t curByteIndex = 0; curByteIndex < datalen; curByteIndex++)
1902+
for (size_t curByteIndex = 0; curByteIndex < datalen; curByteIndex++)
19031903
{
19041904
char samples = data[curByteIndex];
1905-
for (int ii = 0; ii < 8; ii++, samples >>= 1)
1905+
for (int ii = 0; ii < 8; ii++, samples >>= 1)
19061906
{ // Check if the current scope sample bit is set.
19071907
sampleValue = (samples & 0x1);
19081908
if((sampleIndex > 0) && (lastSampleValue == sampleValue) && ((sampleIndex + 3) < numSamples))
@@ -2144,8 +2144,8 @@ bool SiglentSCPIOscilloscope::AcquireData()
21442144
{
21452145
m_transport->SendCommand(":WAVEFORM:START "+ to_string(page*pageSize));
21462146
m_transport->SendCommand(":WAVEFORM:DATA?");
2147-
auto progress = [i, this, page, pages] (float progress) {
2148-
float linear_progress = ((float)page + progress) / (float)pages; // the last page will go slightly faster, but oh well
2147+
auto progress = [i, this, page, pages] (float fprogress) {
2148+
float linear_progress = ((float)page + fprogress) / (float)pages; // the last page will go slightly faster, but oh well
21492149
ChannelsDownloadStatusUpdate(i, InstrumentChannel::DownloadState::DOWNLOAD_IN_PROGRESS, linear_progress);
21502150
};
21512151
analogWaveformDataSize[i] += ReadWaveformBlock(acqBytes-analogWaveformDataSize[i], analogWaveformData[i]+analogWaveformDataSize[i], hdWorkaround, progress);
@@ -2190,8 +2190,8 @@ bool SiglentSCPIOscilloscope::AcquireData()
21902190
{
21912191
// LogDebug("Requesting %lld bytes from byte count to %d.\n",acqDigitalBytes-digitalWaveformDataSize[i],digitalWaveformDataSize[i]);
21922192
m_transport->SendCommand(":WAVEFORM:START "+ to_string(page*pageSize) + ";:WAVEFORM:DATA?");
2193-
auto progress = [i, this, page, pages] (float progress) {
2194-
float linear_progress = ((float)page + progress) / (float)pages; // the last page will go slightly faster, but oh well
2193+
auto progress = [i, this, page, pages] (float fprogress) {
2194+
float linear_progress = ((float)page + fprogress) / (float)pages; // the last page will go slightly faster, but oh well
21952195
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);
@@ -3752,7 +3752,7 @@ float SiglentSCPIOscilloscope::GetDigitalThreshold(size_t channel)
37523752
{ // Didn't match a standard, check for custom
37533753
result = strtof(&(r.c_str()[strlen(c_custom_thresh)]), NULL);
37543754
}
3755-
else
3755+
else
37563756
{
37573757
LogWarning("GetDigitalThreshold unrecognised value [%s]\n", r.c_str());
37583758
}
@@ -3920,7 +3920,7 @@ void SiglentSCPIOscilloscope::PullDropoutTrigger()
39203920
case PROTOCOL_E11:
39213921
//Level
39223922
dt->SetLevel(stof(converse(":TRIGGER:DROPOUT:LEVEL?")));
3923-
3923+
39243924
//Dropout time
39253925
dt->SetDropoutTime(fs.ParseString(converse(":TRIGGER:DROPOUT:TIME?")));
39263926

@@ -4087,7 +4087,7 @@ void SiglentSCPIOscilloscope::PullRuntTrigger()
40874087

40884088
//Upper bound
40894089
rt->SetUpperBound(v.ParseString(converse(":TRIGGER:RUNT:HLEVEL?")));
4090-
4090+
40914091
//Lower bound
40924092
rt->SetLowerInterval(fs.ParseString(converse(":TRIGGER:RUNT:TLOWER?")));
40934093

@@ -4279,7 +4279,7 @@ void SiglentSCPIOscilloscope::PullWindowTrigger()
42794279
if(m_trigger == NULL)
42804280
m_trigger = new WindowTrigger(this);
42814281
WindowTrigger* wt = dynamic_cast<WindowTrigger*>(m_trigger);
4282-
4282+
42834283
Unit v(Unit::UNIT_VOLTS);
42844284

42854285
switch(m_protocolId)
@@ -4409,7 +4409,7 @@ void SiglentSCPIOscilloscope::PushTrigger()
44094409
// TODO: Add in PULSE, VIDEO, PATTERN, QUALITFIED, SPI, IIC, CAN, LIN, FLEXRAY and CANFD Triggers
44104410

44114411
else if(et) //must be last
4412-
{
4412+
{
44134413
// set default
44144414
sendOnly("TRSE EDGE,SR,%s,HT,OFF", m_trigger->GetInput(0).m_channel->GetHwname().c_str());
44154415
PushEdgeTrigger(et, "EDGE");
@@ -4483,7 +4483,7 @@ void SiglentSCPIOscilloscope::PushTrigger()
44834483
*/
44844484
void SiglentSCPIOscilloscope::PushDropoutTrigger(DropoutTrigger* trig)
44854485
{
4486-
4486+
44874487
switch(m_protocolId)
44884488
{
44894489
// --------------------------------------------------
@@ -4586,7 +4586,7 @@ void SiglentSCPIOscilloscope::PushEdgeTrigger(EdgeTrigger* trig, const std::stri
45864586
*/
45874587
void SiglentSCPIOscilloscope::PushPulseWidthTrigger(PulseWidthTrigger* trig)
45884588
{
4589-
4589+
45904590
switch(m_protocolId)
45914591
{
45924592
// --------------------------------------------------
@@ -4614,7 +4614,7 @@ void SiglentSCPIOscilloscope::PushPulseWidthTrigger(PulseWidthTrigger* trig)
46144614
*/
46154615
void SiglentSCPIOscilloscope::PushRuntTrigger(RuntTrigger* trig)
46164616
{
4617-
4617+
46184618
switch(m_protocolId)
46194619
{
46204620
// --------------------------------------------------
@@ -4637,7 +4637,7 @@ void SiglentSCPIOscilloscope::PushRuntTrigger(RuntTrigger* trig)
46374637
LogError("Unknown protocol\n");
46384638
break;
46394639
// --------------------------------------------------
4640-
}
4640+
}
46414641
}
46424642

46434643
/**

0 commit comments

Comments
 (0)