Skip to content

Commit

Permalink
improve handling of SCPI commands received with short/no time between
Browse files Browse the repository at this point in the history
  • Loading branch information
jankae committed Dec 2, 2024
1 parent 57e6812 commit 82e2158
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 0 additions & 2 deletions Software/Integrationtests/tests/TestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ def setUp(self):
if self.vna.query(":DEV:CONN?") == "Not connected":
self.tearDown()
raise AssertionError("Not connected")
# Tests occasionally fail without this timeout - give GUI a little bit more time to properly start
time.sleep(1)

def tearDown(self):
self.gui.send_signal(SIGINT)
Expand Down
3 changes: 3 additions & 0 deletions Software/PC_Application/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ Application
/LibreVNA-GUI/users*appdatalocaltemp*
/LibreVNA/build

# qmake.stash
LibreVNA-GUI/.qmake.stash




Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ void SpectrumAnalyzer::deactivate()
{
setOperationPending(false);
StoreSweepSettings();
configurationTimer.stop();
Mode::deactivate();
}

Expand Down Expand Up @@ -874,6 +875,7 @@ void SpectrumAnalyzer::Stop()

void SpectrumAnalyzer::ConfigureDevice()
{
configurationTimer.stop();
if(running) {
changingSettings = true;

Expand Down
2 changes: 2 additions & 0 deletions Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ void VNA::deactivate()
{
setOperationPending(false);
StoreSweepSettings();
configurationTimer.stop();
Mode::deactivate();
}

Expand Down Expand Up @@ -1839,6 +1840,7 @@ void VNA::Stop()

void VNA::ConfigureDevice(bool resetTraces, std::function<void(bool)> cb)
{
configurationTimer.stop();
if(running) {
if (resetTraces) {
ResetLiveTraces();
Expand Down
2 changes: 1 addition & 1 deletion Software/PC_Application/LibreVNA-GUI/appwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ void AppWindow::SetupSCPI()
void AppWindow::StartTCPServer(int port)
{
server = new TCPServer(port);
connect(server, &TCPServer::received, &scpi, &SCPI::input);
connect(server, &TCPServer::received, &scpi, &SCPI::input, Qt::QueuedConnection);
connect(&scpi, &SCPI::output, server, &TCPServer::send);
}

Expand Down

0 comments on commit 82e2158

Please sign in to comment.