diff --git a/Software/Integrationtests/tests/TestBase.py b/Software/Integrationtests/tests/TestBase.py index d1b5d0d..2213005 100644 --- a/Software/Integrationtests/tests/TestBase.py +++ b/Software/Integrationtests/tests/TestBase.py @@ -23,7 +23,7 @@ class TestBase(unittest.TestCase): time.sleep(1) - self.vna = libreVNA('localhost', 19544) + self.vna = libreVNA('localhost', 19544, timeout=4) try: self.vna.cmd("*CLS;:DEV:CONN") except Exception as e: diff --git a/Software/PC_Application/LibreVNA-GUI/appwindow.cpp b/Software/PC_Application/LibreVNA-GUI/appwindow.cpp index d89e55a..91aeafd 100644 --- a/Software/PC_Application/LibreVNA-GUI/appwindow.cpp +++ b/Software/PC_Application/LibreVNA-GUI/appwindow.cpp @@ -537,10 +537,9 @@ void AppWindow::SetupSCPI() }, nullptr, false)); scpi_dev->add(new SCPICommand("LIST", nullptr, [=](QStringList) -> QString { QString ret; - for(auto driver : DeviceDriver::getDrivers()) { - for(auto d : driver->GetAvailableDevices()) { - ret += d + ","; - } + UpdateDeviceList(); + for(auto entry : deviceList) { + ret += entry.serial + ","; } // remove last comma ret.chop(1); diff --git a/Software/PC_Application/LibreVNA-GUI/scpi.cpp b/Software/PC_Application/LibreVNA-GUI/scpi.cpp index 023871b..397e41a 100644 --- a/Software/PC_Application/LibreVNA-GUI/scpi.cpp +++ b/Software/PC_Application/LibreVNA-GUI/scpi.cpp @@ -11,6 +11,7 @@ SCPI::SCPI() : OCAS = false; SESR = 0x00; ESE = 0xFF; + processing = false; add(new SCPICommand("*CLS", [=](QStringList) { SESR = 0x00; @@ -178,11 +179,14 @@ QString SCPI::getResultName(SCPI::Result r) void SCPI::input(QString line) { cmdQueue.append(line); - process(); + if(!processing) { + process(); + } } void SCPI::process() { + processing = true; while(!WAIexecuting && !cmdQueue.isEmpty()) { auto cmd = cmdQueue.front(); cmdQueue.pop_front(); @@ -214,6 +218,7 @@ void SCPI::process() } } } + processing = false; } void SCPI::someOperationCompleted() diff --git a/Software/PC_Application/LibreVNA-GUI/scpi.h b/Software/PC_Application/LibreVNA-GUI/scpi.h index c0e3b15..e206689 100644 --- a/Software/PC_Application/LibreVNA-GUI/scpi.h +++ b/Software/PC_Application/LibreVNA-GUI/scpi.h @@ -121,6 +121,7 @@ private: bool WAIexecuting; QList cmdQueue; + bool processing; }; #endif // SCPI_H