diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 854269907..a9023d2b0 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -319,7 +319,7 @@ MainWindow::MainWindow(const QString& cfgfile, bool edit_conf, QWidget *parent) // I/Q playback connect(iq_tool, SIGNAL(startRecording(QString, QString)), this, SLOT(startIqRecording(QString, QString))); - connect(iq_tool, SIGNAL(startRecording(QString)), remote, SLOT(startIqRecorder(QString))); + connect(iq_tool, SIGNAL(startRecording(QString, QString)), remote, SLOT(startIqRecorder(QString, QString))); connect(iq_tool, SIGNAL(stopRecording()), this, SLOT(stopIqRecording())); connect(iq_tool, SIGNAL(stopRecording()), remote, SLOT(stopIqRecorder())); connect(iq_tool, SIGNAL(startPlayback(QString,float,qint64)), this, SLOT(startIqPlayback(QString,float,qint64))); diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index ffd6fac1f..be29c7376 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -388,13 +388,13 @@ void RemoteControl::stopAudioRecorder() audio_recorder_status = false; } -/*! \brief Start iq recorder (from another window). */ -void RemoteControl::startIqRecorder(QString unused) +/*! \brief Start IQ recorder (from another window). */ +void RemoteControl::startIqRecorder(QString unused1, QString unused2) { iq_recorder_status = true; } -/*! \brief Stop iq recorder (from another window). */ +/*! \brief Stop IQ recorder (from another window). */ void RemoteControl::stopIqRecorder() { iq_recorder_status = false; @@ -775,7 +775,7 @@ QString RemoteControl::cmd_get_func(QStringList cmdlist) QString func = cmdlist.value(1, ""); if (func == "?") - answer = QString("RECORD DSP RDS MUTE\n"); + answer = QString("RECORD IQRECORD DSP RDS MUTE\n"); else if (func.compare("RECORD", Qt::CaseInsensitive) == 0) answer = QString("%1\n").arg(audio_recorder_status); else if (func.compare("IQRECORD", Qt::CaseInsensitive) == 0) @@ -802,7 +802,7 @@ QString RemoteControl::cmd_set_func(QStringList cmdlist) if (func == "?") { - answer = QString("RECORD DSP RDS MUTE\n"); + answer = QString("RECORD IQRECORD DSP RDS MUTE\n"); } else if ((func.compare("RECORD", Qt::CaseInsensitive) == 0) && ok) { @@ -822,21 +822,18 @@ QString RemoteControl::cmd_set_func(QStringList cmdlist) } else if ((func.compare("IQRECORD", Qt::CaseInsensitive) == 0) && ok) { - iq_recorder_status = status; - if (status) + if (!receiver_running) { - if (receiver_running) - { - emit startIqRecorderEvent(); - answer = QString("RPRT 0\n"); - } - else - answer = QString("RPRT 1\n"); // Seend error + answer = QString("RPRT 1\n"); } else { - emit stopIqRecorderEvent(); answer = QString("RPRT 0\n"); + iq_recorder_status = status; + if (status) + emit startIqRecorderEvent(); + else + emit stopIqRecorderEvent(); } } else if ((func.compare("DSP", Qt::CaseInsensitive) == 0) && ok) diff --git a/src/applications/gqrx/remote_control.h b/src/applications/gqrx/remote_control.h index a5e1d8b6d..8084d36ef 100644 --- a/src/applications/gqrx/remote_control.h +++ b/src/applications/gqrx/remote_control.h @@ -96,7 +96,7 @@ public slots: void setAudioMuted(bool muted); void startAudioRecorder(QString unused); void stopAudioRecorder(); - void startIqRecorder(QString unused); + void startIqRecorder(QString unused1, QString unused2); void stopIqRecorder(); bool setGain(QString name, double gain); void setRDSstatus(bool enabled); @@ -147,8 +147,8 @@ private slots: QString rc_program_id; /*!< RDS Program identification */ QString rds_station; /*!< RDS program service (station) name */ QString rds_radiotext; /*!< RDS Radiotext */ - bool audio_recorder_status; /*!< Recording enabled */ - bool iq_recorder_status; /*!< Iq Recording enabled */ + bool audio_recorder_status; /*!< Audio recording enabled */ + bool iq_recorder_status; /*!< IQ recording enabled */ bool receiver_running; /*!< Whether the receiver is running or not */ bool hamlib_compatible; gain_list_t gains; /*!< Possible and current gain settings */ diff --git a/src/qtgui/iq_tool.cpp b/src/qtgui/iq_tool.cpp index 56e3e890c..6a376d7fc 100644 --- a/src/qtgui/iq_tool.cpp +++ b/src/qtgui/iq_tool.cpp @@ -185,7 +185,7 @@ void CIqTool::on_recButton_clicked(bool checked) } } -/*! Public slot to trig iq recording by external events (e.g. remote control). +/*! Public slot to start IQ recording by external events (e.g. remote control). * * If a recording is already in progress we ignore the event. */ @@ -193,7 +193,7 @@ void CIqTool::startIqRecorder(void) { if (ui->recButton->isChecked()) { - qDebug() << __func__ << "An iq recording is already in progress"; + qDebug() << __func__ << "An IQ recording is already in progress"; return; } @@ -201,7 +201,7 @@ void CIqTool::startIqRecorder(void) ui->recButton->click(); } -/*! Public slot to stop stop recording by external events (e.g. remote control). +/*! Public slot to stop IQ recording by external events (e.g. remote control). * * The event is ignored if no recording is in progress. */ @@ -210,7 +210,7 @@ void CIqTool::stopIqRecorder(void) if (ui->recButton->isChecked()) ui->recButton->click(); // emulate a button click else - qDebug() << __func__ << "No iq recording in progress"; + qDebug() << __func__ << "No IQ recording in progress"; } /*! \brief Cancel a recording. diff --git a/src/qtgui/iq_tool.h b/src/qtgui/iq_tool.h index 345aa5c0a..dc56bd35a 100644 --- a/src/qtgui/iq_tool.h +++ b/src/qtgui/iq_tool.h @@ -71,8 +71,8 @@ class CIqTool : public QDialog public slots: void cancelRecording(); void cancelPlayback(); - void startIqRecorder(void); /*!< Used if Iq Recorder is started e.g from remote control */ - void stopIqRecorder(void); /*!< Used if Iq Recorder is stopped e.g. from remote control */ + void startIqRecorder(void); /*!< Used if IQ Recorder is started e.g. from remote control */ + void stopIqRecorder(void); /*!< Used if IQ Recorder is stopped e.g. from remote control */ private slots: void on_recDirEdit_textChanged(const QString &text);