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