mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-09-28 07:46:37 -04:00
Merge pull request #1270 from srcejon/fix_1269
NoiseFigure plugin: Fix #1269 and #1268
This commit is contained in:
commit
6eb06e2b93
@ -311,7 +311,7 @@ void NoiseFigure::nextState()
|
||||
}
|
||||
}
|
||||
m_state = SET_SWEEP_VALUE;
|
||||
QTimer::singleShot(0, this, SLOT(nextState()));
|
||||
QTimer::singleShot(0, this, &NoiseFigure::nextState);
|
||||
break;
|
||||
|
||||
case SET_SWEEP_VALUE:
|
||||
@ -320,7 +320,7 @@ void NoiseFigure::nextState()
|
||||
{
|
||||
qDebug() << "NoiseFigure::nextState: Set " << m_settings.m_setting << " to " << m_sweepValue;
|
||||
m_state = POWER_ON;
|
||||
QTimer::singleShot(100, this, SLOT(nextState()));
|
||||
QTimer::singleShot(100, this, &NoiseFigure::nextState);
|
||||
} else
|
||||
{
|
||||
qDebug() << "NoiseFigure::nextState: Unable to set " << m_settings.m_setting << " to " << m_sweepValue;
|
||||
@ -330,7 +330,7 @@ void NoiseFigure::nextState()
|
||||
case POWER_ON:
|
||||
// Power on noise source
|
||||
powerOn();
|
||||
QTimer::singleShot(m_settings.m_powerDelay * 1000.0, this, SLOT(nextState()));
|
||||
QTimer::singleShot(m_settings.m_powerDelay * 1000.0, this, &NoiseFigure::nextState);
|
||||
m_state = MEASURE_ON;
|
||||
break;
|
||||
|
||||
@ -343,7 +343,7 @@ void NoiseFigure::nextState()
|
||||
case POWER_OFF:
|
||||
// Power off noise source
|
||||
powerOff();
|
||||
QTimer::singleShot(m_settings.m_powerDelay * 1000.0, this, SLOT(nextState()));
|
||||
QTimer::singleShot(m_settings.m_powerDelay * 1000.0, this, &NoiseFigure::nextState);
|
||||
m_state = MEASURE_OFF;
|
||||
break;
|
||||
|
||||
@ -392,7 +392,7 @@ void NoiseFigure::nextState()
|
||||
m_sweepValue += m_settings.m_step * scaleFactor;
|
||||
}
|
||||
m_state = SET_SWEEP_VALUE;
|
||||
QTimer::singleShot(0, this, SLOT(nextState()));
|
||||
QTimer::singleShot(0, this, &NoiseFigure::nextState);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -490,14 +490,14 @@ bool NoiseFigure::handleMessage(const Message& cmd)
|
||||
if (!m_settings.m_visaDevice.isEmpty())
|
||||
{
|
||||
if (openVISADevice()) {
|
||||
QTimer::singleShot(0, this, SLOT(nextState()));
|
||||
QTimer::singleShot(0, this, &NoiseFigure::nextState);
|
||||
} else if (getMessageQueueToGUI()) {
|
||||
getMessageQueueToGUI()->push(MsgFinished::create(QString("Failed to open VISA device %1").arg(m_settings.m_visaDevice)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QTimer::singleShot(0, this, SLOT(nextState()));
|
||||
QTimer::singleShot(0, this, &NoiseFigure::nextState);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include "util/visa.h"
|
||||
|
||||
#include "noisefigurecontroldialog.h"
|
||||
|
||||
NoiseFigureControlDialog::NoiseFigureControlDialog(NoiseFigureSettings *settings, QWidget* parent) :
|
||||
@ -33,13 +31,6 @@ NoiseFigureControlDialog::NoiseFigureControlDialog(NoiseFigureSettings *settings
|
||||
ui->powerOnSCPI->setPlainText(settings->m_powerOnSCPI);
|
||||
ui->powerOffSCPI->setPlainText(settings->m_powerOffSCPI);
|
||||
ui->delay->setValue(settings->m_powerDelay);
|
||||
VISA visa;
|
||||
if (!visa.isAvailable())
|
||||
{
|
||||
ui->device->setEnabled(false);
|
||||
ui->powerOnSCPI->setEnabled(false);
|
||||
ui->powerOffSCPI->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
NoiseFigureControlDialog::~NoiseFigureControlDialog()
|
||||
|
@ -29,7 +29,7 @@
|
||||
const PluginDescriptor NoiseFigurePlugin::m_pluginDescriptor = {
|
||||
NoiseFigure::m_channelId,
|
||||
QStringLiteral("Noise Figure"),
|
||||
QStringLiteral("7.0.0"),
|
||||
QStringLiteral("7.3.1"),
|
||||
QStringLiteral("(c) Jon Beniston, M7RCE"),
|
||||
QStringLiteral("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -90,7 +90,7 @@ You can choose between linear and barycentric rational interpolation, and the di
|
||||
<h3>13: Open Noise Source Control dialog</h3>
|
||||
|
||||
Opens the noise source control dialog, to allow setting how the plugin turns the power to the noise source off and on. Two control methods are supported: A program or script can be run to turn the power on or off,
|
||||
or the VISA library (if installed) can be used to send SCPI commands to a programmable power supply or other test equipment. If a VISA library is not found, the VISA and SCPI fields will be disabled.
|
||||
or the VISA library (if installed) can be used to send SCPI commands to a programmable power supply or other test equipment.
|
||||
|
||||
The delay setting determines how long after the noise source's power is turned on or off, before the noise figure measurement starts. This should be long enough to allow the noise source output to settle, but
|
||||
not too long so that tests over a large number of frequencies take a long time to run. The ideal value will vary with the noise source and power supply.
|
||||
|
Loading…
Reference in New Issue
Block a user