mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 15:04:11 +00:00
Merge branch 'master' into integer_spur_improvement
This commit is contained in:
commit
224b2abc5c
8 changed files with 187 additions and 60 deletions
|
|
@ -237,7 +237,7 @@ void LibreCALDialog::updateCalibrationStartStatus()
|
|||
ui->start->setEnabled(canStart);
|
||||
if(canStart) {
|
||||
ui->lCalibrationStatus->setText("Ready to start");
|
||||
ui->lCalibrationStatus->setStyleSheet("QLabel { color : black; }");
|
||||
ui->lCalibrationStatus->setStyleSheet("");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ void LibreCALDialog::updateDeviceStatus()
|
|||
}
|
||||
if(device->stabilized()) {
|
||||
ui->lDeviceStatus->setText("LibreCAL ready for calibration");
|
||||
ui->lDeviceStatus->setStyleSheet("QLabel { color : black; }");
|
||||
ui->lDeviceStatus->setStyleSheet("");
|
||||
} else {
|
||||
ui->lDeviceStatus->setText("Heating up, please wait with calibration");
|
||||
ui->lDeviceStatus->setStyleSheet("QLabel { color : orange; }");
|
||||
|
|
@ -263,6 +263,7 @@ void LibreCALDialog::updateDeviceStatus()
|
|||
|
||||
void LibreCALDialog::determineAutoPorts()
|
||||
{
|
||||
disableUI();
|
||||
ui->progressCal->setValue(0);
|
||||
ui->lCalibrationStatus->setText("Autodetecting port connections...");
|
||||
ui->lCalibrationStatus->setStyleSheet("QLabel { color : green; }");
|
||||
|
|
@ -422,7 +423,7 @@ void LibreCALDialog::startCalibration()
|
|||
|
||||
ui->progressCal->setValue(0);
|
||||
ui->lCalibrationStatus->setText("Creating calibration kit from coefficients...");
|
||||
ui->lCalibrationStatus->setStyleSheet("QLabel { color : black; }");
|
||||
ui->lCalibrationStatus->setStyleSheet("");
|
||||
auto& kit = cal->getKit();
|
||||
kit.clearStandards();
|
||||
kit.manufacturer = "LibreCAL ("+coeffSet.name+")";
|
||||
|
|
@ -606,7 +607,9 @@ void LibreCALDialog::startCalibration()
|
|||
disconnect(cal, &Calibration::measurementsUpdated, this, nullptr);
|
||||
connect(cal, &Calibration::measurementsUpdated, this, startNextCalibrationStep, Qt::QueuedConnection);
|
||||
connect(cal, &Calibration::measurementsAborted, this, [=](){
|
||||
setTerminationOnAllUsedPorts(CalDevice::Standard(CalDevice::Standard::Type::None));
|
||||
enableUI();
|
||||
ui->lCalibrationStatus->setText("Ready to start");
|
||||
});
|
||||
|
||||
startNextCalibrationStep();
|
||||
|
|
|
|||
|
|
@ -417,8 +417,11 @@ void TracePlot::finishContextMenu()
|
|||
contextmenu->addAction(removeTile);
|
||||
connect(removeTile, &QAction::triggered, [=]() {
|
||||
markedForDeletion = true;
|
||||
QTimer::singleShot(0, [=](){
|
||||
parentTile->closeTile();
|
||||
// 'this' object will be deleted when returning function but the following lambda
|
||||
// might be executed after that and we still need to know which tile to close.
|
||||
// Capture parentTile explicitly by value
|
||||
QTimer::singleShot(0, [p=this->parentTile](){
|
||||
p->closeTile();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,11 @@ VNA::VNA(AppWindow *window, QString name)
|
|||
|
||||
// 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(this, &VNA::calibrationMeasurementPercentage, calDialog, [=](int percent) {
|
||||
if(calMeasuring || percent == 100) {
|
||||
calDialog->setValue(percent);
|
||||
}
|
||||
}, Qt::QueuedConnection);
|
||||
|
||||
connect(calDialog, &QProgressDialog::canceled, this, [=]() {
|
||||
// the user aborted the calibration measurement
|
||||
|
|
@ -1222,6 +1226,7 @@ bool VNA::SpanMatchCal()
|
|||
SetStartFreq(cal.getMinFreq());
|
||||
SetStopFreq(cal.getMaxFreq());
|
||||
SetPoints(cal.getNumPoints());
|
||||
UpdateCalWidget();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue