mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-07 15:33:51 +00:00
mode: remove mode handler dependency in child modes
This commit is contained in:
parent
2fbe6e84be
commit
6bd80c5944
5 changed files with 11 additions and 9 deletions
|
|
@ -22,7 +22,6 @@
|
|||
#include "Calibration/manualcalibrationdialog.h"
|
||||
#include "Util/util.h"
|
||||
#include "Tools/parameters.h"
|
||||
#include "modehandler.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QVBoxLayout>
|
||||
|
|
@ -802,7 +801,7 @@ using namespace std;
|
|||
|
||||
void VNA::NewDatapoint(Protocol::Datapoint d)
|
||||
{
|
||||
if(window->getModeHandler()->getActiveMode() != this) {
|
||||
if(isActive != true) {
|
||||
// ignore
|
||||
return;
|
||||
}
|
||||
|
|
@ -973,7 +972,7 @@ void VNA::SettingsChanged(bool resetTraces, std::function<void (Device::Transmis
|
|||
s.cdbm_excitation_stop = stop * 100;
|
||||
s.logSweep = false;
|
||||
}
|
||||
if(window->getDevice() && window->getModeHandler()->getActiveMode() == this) {
|
||||
if(window->getDevice() && isActive) {
|
||||
if(s.excitePort1 == 0 && s.excitePort2 == 0) {
|
||||
// no signal at either port, just set the device to idle
|
||||
window->getDevice()->SetIdle();
|
||||
|
|
@ -1487,7 +1486,7 @@ void VNA::SetupSCPI()
|
|||
return ret;
|
||||
}));
|
||||
scpi_cal->add(new SCPICommand("MEASure", [=](QStringList params) -> QString {
|
||||
if(params.size() != 1 || CalibrationMeasurementActive() || !window->getDevice() || window->getModeHandler()->getActiveMode() != this) {
|
||||
if(params.size() != 1 || CalibrationMeasurementActive() || !window->getDevice() || isActive != true) {
|
||||
// no measurement specified, still busy or invalid mode
|
||||
return SCPI::getResultName(SCPI::Result::Error);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue