diff --git a/Software/PC_Application/.gitignore b/Software/PC_Application/.gitignore index 273a686..633b8e2 100644 --- a/Software/PC_Application/.gitignore +++ b/Software/PC_Application/.gitignore @@ -76,6 +76,7 @@ Application /LibreVNA-GUI/LibreVNA-GUI /LibreVNA-Test/LibreVNA-Test /LibreVNA-GUI/users*appdatalocaltemp* +/LibreVNA/build diff --git a/Software/PC_Application/LibreVNA-GUI/.qmake.stash b/Software/PC_Application/LibreVNA-GUI/.qmake.stash deleted file mode 100644 index 414d2d9..0000000 --- a/Software/PC_Application/LibreVNA-GUI/.qmake.stash +++ /dev/null @@ -1,21 +0,0 @@ -QMAKE_CXX.QT_COMPILER_STDCXX = 201402L -QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 8 -QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 1 -QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0 -QMAKE_CXX.COMPILER_MACROS = \ - QT_COMPILER_STDCXX \ - QMAKE_GCC_MAJOR_VERSION \ - QMAKE_GCC_MINOR_VERSION \ - QMAKE_GCC_PATCH_VERSION -QMAKE_CXX.INCDIRS = \ - C:/Qt/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++ \ - C:/Qt/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32 \ - C:/Qt/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward \ - C:/Qt/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include \ - C:/Qt/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed \ - C:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include -QMAKE_CXX.LIBDIRS = \ - C:/Qt/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0 \ - C:/Qt/Tools/mingw810_64/lib/gcc \ - C:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/lib \ - C:/Qt/Tools/mingw810_64/lib diff --git a/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp b/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp index c6575b3..29be257 100644 --- a/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp +++ b/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp @@ -158,6 +158,26 @@ VNA::VNA(AppWindow *window, QString name) cal.getKit().setIdealDefault(); + calDialog = new QProgressDialog(); + calDialog->setCancelButtonText("Abort"); + calDialog->setWindowTitle("Taking calibration measurement..."); + calDialog->setValue(0); + calDialog->setWindowModality(Qt::ApplicationModal); + calDialog->reset(); + calDialog->setMinimumDuration(0); + + // A modal QProgressDialog calls processEvents() in setValue(). Needs to use a queued connection to update the progress + // value from within the NewDatapoint slot to prevent possible re-entrancy. + connect(this, &VNA::calibrationMeasurementPercentage, calDialog, &QProgressDialog::setValue, Qt::QueuedConnection); + + connect(calDialog, &QProgressDialog::canceled, this, [=]() { + // the user aborted the calibration measurement + calMeasuring = false; + cal.clearMeasurements(calMeasurements); + cal.measurementsAbort(); + // delete calDialog; + }); + // portExtension.setCalkit(&cal.getCalibrationKit()); // De-embedding menu @@ -960,8 +980,6 @@ void VNA::NewDatapoint(DeviceDriver::VNAMeasurement m) cal.addMeasurements(calMeasurements, m_avg); if(m_avg.pointNum == settings.npoints - 1) { calMeasuring = false; - calDialog->deleteLater(); - calDialog = nullptr; cal.measurementsComplete(); } } @@ -1346,25 +1364,8 @@ void VNA::StartCalibrationMeasurements(std::set m } else { text.append("multiple calibration standards."); } - calDialog = new QProgressDialog(); calDialog->setLabelText(text); - calDialog->setCancelButtonText("Abort"); - calDialog->setWindowTitle("Taking calibration measurement..."); - calDialog->setValue(0); - calDialog->setWindowModality(Qt::ApplicationModal); - // always show the dialog - calDialog->setMinimumDuration(0); - // A modal QProgressDialog calls processEvents() in setValue(). Needs to use a queued connection to update the progress - // value from within the NewDatapoint slot to prevent possible re-entrancy. - connect(this, &VNA::calibrationMeasurementPercentage, calDialog, &QProgressDialog::setValue, Qt::QueuedConnection); - connect(calDialog, &QProgressDialog::canceled, this, [=]() { - // the user aborted the calibration measurement - calMeasuring = false; - cal.clearMeasurements(calMeasurements); - cal.measurementsAbort(); - delete calDialog; - }, Qt::UniqueConnection); // Trigger sweep to start from beginning running = true; ConfigureDevice(true, [=](bool){