mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-01-08 17:50:33 +01:00
Reset refernence on *RST, fix VNA:ACQ:RUN? query
This commit is contained in:
parent
c1d1bc7aed
commit
2963e8b3d5
|
|
@ -546,6 +546,9 @@ bool LibreVNADriver::setExtRef(QString option_in, QString option_out)
|
|||
case Reference::TypeIn::None:
|
||||
p.reference.UseExternalRef = 0;
|
||||
p.reference.AutomaticSwitch = 0;
|
||||
if(hardwareVersion == 0x01) {
|
||||
lastStatus.V1.extRefInUse = 0;
|
||||
}
|
||||
break;
|
||||
case Reference::TypeIn::Auto:
|
||||
p.reference.UseExternalRef = 0;
|
||||
|
|
@ -554,6 +557,9 @@ bool LibreVNADriver::setExtRef(QString option_in, QString option_out)
|
|||
case Reference::TypeIn::External:
|
||||
p.reference.UseExternalRef = 1;
|
||||
p.reference.AutomaticSwitch = 0;
|
||||
if(hardwareVersion == 0x01) {
|
||||
lastStatus.V1.extRefInUse = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
switch(refOut) {
|
||||
|
|
|
|||
|
|
@ -966,7 +966,9 @@ void SpectrumAnalyzer::SetupSCPI()
|
|||
scpi_acq->add(new SCPICommand("RUN", [=](QStringList) -> QString {
|
||||
Run();
|
||||
return SCPI::getResultName(SCPI::Result::Empty);
|
||||
}, nullptr));
|
||||
}, [=](QStringList) -> QString {
|
||||
return running ? SCPI::getResultName(SCPI::Result::True) : SCPI::getResultName(SCPI::Result::False);
|
||||
}));
|
||||
scpi_acq->add(new SCPICommand("STOP", [=](QStringList) -> QString {
|
||||
Stop();
|
||||
return SCPI::getResultName(SCPI::Result::Empty);
|
||||
|
|
|
|||
|
|
@ -1421,7 +1421,9 @@ void VNA::SetupSCPI()
|
|||
scpi_acq->add(new SCPICommand("RUN", [=](QStringList) -> QString {
|
||||
Run();
|
||||
return SCPI::getResultName(SCPI::Result::Empty);
|
||||
}, nullptr));
|
||||
}, [=](QStringList) -> QString {
|
||||
return running ? SCPI::getResultName(SCPI::Result::True) : SCPI::getResultName(SCPI::Result::False);
|
||||
}));
|
||||
scpi_acq->add(new SCPICommand("STOP", [=](QStringList) -> QString {
|
||||
Stop();
|
||||
return SCPI::getResultName(SCPI::Result::Empty);
|
||||
|
|
@ -1479,16 +1481,6 @@ void VNA::SetupSCPI()
|
|||
}, [=](QStringList) -> QString {
|
||||
return singleSweep ? SCPI::getResultName(SCPI::Result::True) : SCPI::getResultName(SCPI::Result::False);
|
||||
}));
|
||||
scpi_acq->add(new SCPICommand("RUN", [=](QStringList) -> QString {
|
||||
Run();
|
||||
return SCPI::getResultName(SCPI::Result::Empty);
|
||||
}, [=](QStringList) -> QString {
|
||||
return running ? SCPI::getResultName(SCPI::Result::True) : SCPI::getResultName(SCPI::Result::False);
|
||||
}));
|
||||
scpi_acq->add(new SCPICommand("STOP", [=](QStringList) -> QString {
|
||||
Stop();
|
||||
return SCPI::getResultName(SCPI::Result::Empty);
|
||||
}, nullptr));
|
||||
auto scpi_stim = new SCPINode("STIMulus");
|
||||
SCPINode::add(scpi_stim);
|
||||
scpi_stim->add(new SCPICommand("LVL", [=](QStringList params) -> QString {
|
||||
|
|
|
|||
|
|
@ -322,6 +322,8 @@ void AppWindow::SetInitialState()
|
|||
modeHandler->createMode("Spectrum Analyzer", Mode::Type::SA);
|
||||
modeHandler->setCurrentIndex(vnaIndex);
|
||||
}
|
||||
|
||||
ResetReference();
|
||||
}
|
||||
|
||||
bool AppWindow::ConnectToDevice(QString serial, DeviceDriver *driver)
|
||||
|
|
@ -1043,6 +1045,12 @@ int AppWindow::UpdateDeviceList()
|
|||
return available;
|
||||
}
|
||||
|
||||
void AppWindow::ResetReference()
|
||||
{
|
||||
toolbars.reference.type->setCurrentIndex(0);
|
||||
toolbars.reference.outFreq->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
//void AppWindow::StartManualControl()
|
||||
//{
|
||||
// if(!vdevice || vdevice->isCompoundDevice()) {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ private slots:
|
|||
void DisconnectDevice();
|
||||
int UpdateDeviceList();
|
||||
// void StartManualControl();
|
||||
void ResetReference();
|
||||
void UpdateReferenceToolbar();
|
||||
void UpdateReference();
|
||||
void DeviceStatusUpdated();
|
||||
|
|
|
|||
Loading…
Reference in a new issue