mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-01-10 10:40:13 +01:00
minor improvements to eCal dialog
This commit is contained in:
parent
c8efeea9b3
commit
ee8188775a
|
|
@ -398,7 +398,11 @@ void LibreCALDialog::startCalibration()
|
|||
measurementsTaken++;
|
||||
};
|
||||
|
||||
disconnect(cal, &Calibration::measurementsUpdated, this, nullptr);
|
||||
connect(cal, &Calibration::measurementsUpdated, this, startNextCalibrationStep);
|
||||
connect(cal, &Calibration::measurementsAborted, this, [=](){
|
||||
enableUI();
|
||||
});
|
||||
|
||||
startNextCalibrationStep();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1753,6 +1753,11 @@ void Calibration::measurementsComplete()
|
|||
emit measurementsUpdated();
|
||||
}
|
||||
|
||||
void Calibration::measurementsAbort()
|
||||
{
|
||||
emit measurementsAborted();
|
||||
}
|
||||
|
||||
void Calibration::deactivate()
|
||||
{
|
||||
lock_guard<recursive_mutex> guard(access);
|
||||
|
|
|
|||
|
|
@ -101,6 +101,8 @@ public:
|
|||
public slots:
|
||||
// Call once all datapoints of the current span have been added
|
||||
void measurementsComplete();
|
||||
// Call once when a measurement is aborted before all points have been captured
|
||||
void measurementsAbort();
|
||||
// Attempts to calculate the calibration coefficients. If not enough measurements are available, false is returned and the currently used coefficients are not changed
|
||||
bool compute(CalType type);
|
||||
// Deactivates the calibration, resets the calibration coefficients. Calibration measurements are NOT deleted.
|
||||
|
|
@ -110,6 +112,8 @@ signals:
|
|||
void startMeasurements(std::set<CalibrationMeasurement::Base*> m);
|
||||
// emitted whenever a measurement is complete (triggered by calling measurementsComplete())
|
||||
void measurementsUpdated();
|
||||
// emitted when taking a calibration measurement is aborted
|
||||
void measurementsAborted();
|
||||
// emitted when calibration coefficients were calculated/updated successfully
|
||||
void activated(CalType type);
|
||||
// emitted when the calibrationo coefficients were reset
|
||||
|
|
|
|||
|
|
@ -889,8 +889,9 @@ void VNA::NewDatapoint(DeviceDriver::VNAMeasurement m)
|
|||
cal.addMeasurements(calMeasurements, m_avg);
|
||||
if(m_avg.pointNum == settings.npoints - 1) {
|
||||
calMeasuring = false;
|
||||
cal.measurementsComplete();
|
||||
delete calDialog;
|
||||
calDialog = nullptr;
|
||||
cal.measurementsComplete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1266,6 +1267,7 @@ void VNA::StartCalibrationMeasurements(std::set<CalibrationMeasurement::Base*> m
|
|||
// the user aborted the calibration measurement
|
||||
calMeasuring = false;
|
||||
cal.clearMeasurements(calMeasurements);
|
||||
cal.measurementsAbort();
|
||||
delete calDialog;
|
||||
}, Qt::UniqueConnection);
|
||||
// Trigger sweep to start from beginning
|
||||
|
|
|
|||
Loading…
Reference in a new issue