1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 00:18:37 -05:00

Merge pull request #1603 from srcejon/noise_figure_fix_script_settings

Noise figure: Fix saving of power on command setting.
This commit is contained in:
Edouard Griffiths 2023-02-23 14:01:44 +01:00 committed by GitHub
commit 9b277dcf9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View File

@ -411,7 +411,11 @@ void NoiseFigure::powerOn()
#endif #endif
QString program = allArgs[0]; QString program = allArgs[0];
allArgs.pop_front(); allArgs.pop_front();
QProcess::execute(program, allArgs); qDebug() << "NoiseFigure::powerOn(): Executing" << program << allArgs;
int exitCode = QProcess::execute(program, allArgs);
if (exitCode) {
qWarning() << "NoiseFigure::powerOn():" << program << "exited with code" << exitCode;
}
} }
QStringList commands = m_settings.m_powerOnSCPI.split("\n"); QStringList commands = m_settings.m_powerOnSCPI.split("\n");
@ -434,7 +438,11 @@ void NoiseFigure::powerOff()
#endif #endif
QString program = allArgs[0]; QString program = allArgs[0];
allArgs.pop_front(); allArgs.pop_front();
QProcess::execute(program, allArgs); qDebug() << "NoiseFigure::powerOff(): Executing" << program << allArgs;
int exitCode = QProcess::execute(program, allArgs);
if (exitCode) {
qWarning() << "NoiseFigure::powerOff():" << program << "exited with code" << exitCode;
}
} }
} }

View File

@ -29,7 +29,7 @@
const PluginDescriptor NoiseFigurePlugin::m_pluginDescriptor = { const PluginDescriptor NoiseFigurePlugin::m_pluginDescriptor = {
NoiseFigure::m_channelId, NoiseFigure::m_channelId,
QStringLiteral("Noise Figure"), QStringLiteral("Noise Figure"),
QStringLiteral("7.3.1"), QStringLiteral("7.10.1"),
QStringLiteral("(c) Jon Beniston, M7RCE"), QStringLiteral("(c) Jon Beniston, M7RCE"),
QStringLiteral("https://github.com/f4exb/sdrangel"), QStringLiteral("https://github.com/f4exb/sdrangel"),
true, true,

View File

@ -93,7 +93,7 @@ QByteArray NoiseFigureSettings::serialize() const
s.writeString(10, m_visaDevice); s.writeString(10, m_visaDevice);
s.writeString(11, m_powerOnSCPI); s.writeString(11, m_powerOnSCPI);
s.writeString(12, m_powerOffSCPI); s.writeString(12, m_powerOffSCPI);
s.writeString(13, m_powerOffCommand); s.writeString(13, m_powerOnCommand);
s.writeString(14, m_powerOffCommand); s.writeString(14, m_powerOffCommand);
s.writeDouble(15, m_powerDelay); s.writeDouble(15, m_powerDelay);