Skip to content

Commit 08ffb43

Browse files
committed
ThunderScope: remainder of queued command API conversion
1 parent a50756c commit 08ffb43

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

scopehal/ThunderScopeOscilloscope.cpp

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -538,12 +538,7 @@ vector<uint64_t> ThunderScopeOscilloscope::GetSampleRatesNonInterleaved()
538538
{
539539
vector<uint64_t> ret;
540540

541-
string rates;
542-
{
543-
lock_guard<recursive_mutex> lock(m_mutex);
544-
m_transport->SendCommand("RATES?");
545-
rates = m_transport->ReadReply();
546-
}
541+
string rates = m_transport->SendCommandQueuedWithReply("RATES?");
547542

548543
size_t i=0;
549544
while(true)
@@ -588,12 +583,7 @@ vector<uint64_t> ThunderScopeOscilloscope::GetSampleDepthsNonInterleaved()
588583
{
589584
vector<uint64_t> ret;
590585

591-
string depths;
592-
{
593-
lock_guard<recursive_mutex> lock(m_mutex);
594-
m_transport->SendCommand("DEPTHS?");
595-
depths = m_transport->ReadReply();
596-
}
586+
string depths = m_transport->SendCommandQueuedWithReply("DEPTHS?");
597587

598588
size_t i=0;
599589
while(true)
@@ -654,23 +644,23 @@ void ThunderScopeOscilloscope::SetChannelCoupling(size_t i, OscilloscopeChannel:
654644
switch(type)
655645
{
656646
case OscilloscopeChannel::COUPLE_AC_1M:
657-
m_transport->SendCommand(":" + m_channels[i]->GetHwname() + ":COUP AC");
658-
m_transport->SendCommand(":" + m_channels[i]->GetHwname() + ":TERM 1M");
647+
m_transport->SendCommandQueued(":" + m_channels[i]->GetHwname() + ":COUP AC");
648+
m_transport->SendCommandQueued(":" + m_channels[i]->GetHwname() + ":TERM 1M");
659649
break;
660650

661651
case OscilloscopeChannel::COUPLE_DC_1M:
662-
m_transport->SendCommand(":" + m_channels[i]->GetHwname() + ":COUP DC");
663-
m_transport->SendCommand(":" + m_channels[i]->GetHwname() + ":TERM 1M");
652+
m_transport->SendCommandQueued(":" + m_channels[i]->GetHwname() + ":COUP DC");
653+
m_transport->SendCommandQueued(":" + m_channels[i]->GetHwname() + ":TERM 1M");
664654
break;
665655

666656
case OscilloscopeChannel::COUPLE_AC_50:
667-
m_transport->SendCommand(":" + m_channels[i]->GetHwname() + ":COUP AC");
668-
m_transport->SendCommand(":" + m_channels[i]->GetHwname() + ":TERM 50");
657+
m_transport->SendCommandQueued(":" + m_channels[i]->GetHwname() + ":COUP AC");
658+
m_transport->SendCommandQueued(":" + m_channels[i]->GetHwname() + ":TERM 50");
669659
break;
670660

671661
case OscilloscopeChannel::COUPLE_DC_50:
672-
m_transport->SendCommand(":" + m_channels[i]->GetHwname() + ":COUP DC");
673-
m_transport->SendCommand(":" + m_channels[i]->GetHwname() + ":TERM 50");
662+
m_transport->SendCommandQueued(":" + m_channels[i]->GetHwname() + ":COUP DC");
663+
m_transport->SendCommandQueued(":" + m_channels[i]->GetHwname() + ":TERM 50");
674664
break;
675665

676666
default:

0 commit comments

Comments
 (0)