diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp
index 1d5ab54c8..10cd502ee 100644
--- a/src/applications/gqrx/mainwindow.cpp
+++ b/src/applications/gqrx/mainwindow.cpp
@@ -228,6 +228,7 @@ MainWindow::MainWindow(const QString& cfgfile, bool edit_conf, QWidget *parent)
connect(uiDockRxOpt, SIGNAL(fmEmphSelected(double)), this, SLOT(setFmEmph(double)));
connect(uiDockRxOpt, SIGNAL(amDcrToggled(bool)), this, SLOT(setAmDcr(bool)));
connect(uiDockRxOpt, SIGNAL(cwOffsetChanged(int)), this, SLOT(setCwOffset(int)));
+ connect(uiDockRxOpt, SIGNAL(ssbStepsChanged(int)), this, SLOT(setSbSteps(int)));
connect(uiDockRxOpt, SIGNAL(amSyncDcrToggled(bool)), this, SLOT(setAmSyncDcr(bool)));
connect(uiDockRxOpt, SIGNAL(amSyncPllBwSelected(float)), this, SLOT(setAmSyncPllBw(float)));
connect(uiDockRxOpt, SIGNAL(agcToggled(bool)), this, SLOT(setAgcOn(bool)));
@@ -1059,6 +1060,7 @@ void MainWindow::selectDemod(const QString& strModulation)
void MainWindow::selectDemod(int mode_idx)
{
double cwofs = 0.0;
+ int ssbstep = 50;
int filter_preset = uiDockRxOpt->currentFilter();
int flo=0, fhi=0, click_res=100;
bool rds_enabled;
@@ -1149,17 +1151,19 @@ void MainWindow::selectDemod(int mode_idx)
case DockRxOpt::MODE_LSB:
/* LSB */
rx->set_demod(receiver::RX_DEMOD_SSB);
+ ssbstep = uiDockRxOpt->getSbSteps();
ui->plotter->setDemodRanges(-40000, -100, -5000, 0, false);
uiDockAudio->setFftRange(0,3000);
- click_res = 100;
+ click_res = ssbstep;
break;
case DockRxOpt::MODE_USB:
/* USB */
rx->set_demod(receiver::RX_DEMOD_SSB);
+ ssbstep = uiDockRxOpt->getSbSteps();
ui->plotter->setDemodRanges(0, 5000, 100, 40000, false);
uiDockAudio->setFftRange(0,3000);
- click_res = 100;
+ click_res = ssbstep;
break;
case DockRxOpt::MODE_CWL:
@@ -1245,6 +1249,12 @@ void MainWindow::setCwOffset(int offset)
rx->set_cw_offset(offset);
}
+void MainWindow::setSbSteps(int click_res)
+{
+ ui->plotter->setClickResolution(click_res);
+ ui->plotter->setFilterClickResolution(click_res);
+}
+
/**
* @brief AM-Sync DCR status changed (slot).
* @param enabled Whether DCR is enabled or not.
diff --git a/src/applications/gqrx/mainwindow.h b/src/applications/gqrx/mainwindow.h
index cceef6ee6..8adca7a77 100644
--- a/src/applications/gqrx/mainwindow.h
+++ b/src/applications/gqrx/mainwindow.h
@@ -156,6 +156,7 @@ private slots:
void setFmEmph(double tau);
void setAmDcr(bool enabled);
void setCwOffset(int offset);
+ void setSbSteps(int click_res);
void setAmSyncDcr(bool enabled);
void setAmSyncPllBw(float pll_bw);
void setAgcOn(bool agc_on);
diff --git a/src/qtgui/demod_options.cpp b/src/qtgui/demod_options.cpp
index c1f4b113a..bed714189 100644
--- a/src/qtgui/demod_options.cpp
+++ b/src/qtgui/demod_options.cpp
@@ -172,6 +172,16 @@ int CDemodOptions::getCwOffset(void) const
return ui->cwOffsetSpin->value();
}
+void CDemodOptions::setSbSteps(int offset)
+{
+ ui->SSB_Steps->setValue(offset);
+}
+
+int CDemodOptions::getSbSteps(void) const
+{
+ return ui->SSB_Steps->value();
+}
+
void CDemodOptions::setMaxDev(float max_dev)
{
ui->maxdevSelector->setCurrentIndex(maxdev_to_index(max_dev));
@@ -212,6 +222,11 @@ void CDemodOptions::on_cwOffsetSpin_valueChanged(int value)
emit cwOffsetChanged(value);
}
+void CDemodOptions::on_SSB_Steps_valueChanged(int value)
+{
+ emit ssbStepsChanged(value);
+}
+
void CDemodOptions::on_syncdcrCheckBox_toggled(bool checked)
{
emit amSyncDcrToggled(checked);
diff --git a/src/qtgui/demod_options.h b/src/qtgui/demod_options.h
index 581ef8194..beb864fb6 100644
--- a/src/qtgui/demod_options.h
+++ b/src/qtgui/demod_options.h
@@ -47,7 +47,8 @@ class CDemodOptions : public QDialog
PAGE_AM_OPT = 2,
PAGE_CW_OPT = 3,
PAGE_AMSYNC_OPT = 4,
- PAGE_NUM = 5
+ PAGE_SB_OPT = 5,
+ PAGE_NUM = 6
};
explicit CDemodOptions(QWidget *parent = 0);
@@ -58,6 +59,9 @@ class CDemodOptions : public QDialog
void setCurrentPage(int index);
int currentPage() const;
+ void setSbSteps(int offset);
+ int getSbSteps(void) const;
+
void setCwOffset(int offset);
int getCwOffset(void) const;
@@ -83,6 +87,9 @@ class CDemodOptions : public QDialog
/*! \brief CW offset changed. */
void cwOffsetChanged(int offset);
+ /*! \brief SSB Steps changed. */
+ void ssbStepsChanged(int offset);
+
/*! \brief Signal emitted when AM-Sync DCR is toggled. */
void amSyncDcrToggled(bool enabled);
@@ -94,6 +101,7 @@ private slots:
void on_emphSelector_activated(int index);
void on_dcrCheckBox_toggled(bool checked);
void on_cwOffsetSpin_valueChanged(int value);
+ void on_SSB_Steps_valueChanged(int value);
void on_syncdcrCheckBox_toggled(bool checked);
void on_pllBwSelector_activated(int index);
diff --git a/src/qtgui/demod_options.ui b/src/qtgui/demod_options.ui
index c0dc77b09..a33c64099 100644
--- a/src/qtgui/demod_options.ui
+++ b/src/qtgui/demod_options.ui
@@ -354,9 +354,43 @@ to react to changes in the carrier frequency however.
+
+
+
+
+ 20
+ 30
+ 161
+ 29
+
+
+
+ -
+
+
+ SSB Stepsize
+
+
+
+ -
+
+
+ Hz
+
+
+ 500
+
+
+ 50
+
+
+
+
-
-
+
+
+
+
diff --git a/src/qtgui/dockrxopt.cpp b/src/qtgui/dockrxopt.cpp
index 068b6a228..823a88a46 100644
--- a/src/qtgui/dockrxopt.cpp
+++ b/src/qtgui/dockrxopt.cpp
@@ -113,6 +113,7 @@ DockRxOpt::DockRxOpt(qint64 filterOffsetRange, QWidget *parent) :
connect(demodOpt, SIGNAL(fmEmphSelected(double)), this, SLOT(demodOpt_fmEmphSelected(double)));
connect(demodOpt, SIGNAL(amDcrToggled(bool)), this, SLOT(demodOpt_amDcrToggled(bool)));
connect(demodOpt, SIGNAL(cwOffsetChanged(int)), this, SLOT(demodOpt_cwOffsetChanged(int)));
+ connect(demodOpt, SIGNAL(ssbStepsChanged(int)), this, SLOT(demodOpt_ssbStepsChanged(int)));
connect(demodOpt, SIGNAL(amSyncDcrToggled(bool)), this, SLOT(demodOpt_amSyncDcrToggled(bool)));
connect(demodOpt, SIGNAL(amSyncPllBwSelected(float)), this, SLOT(demodOpt_amSyncPllBwSelected(float)));
@@ -407,6 +408,11 @@ int DockRxOpt::getCwOffset() const
return demodOpt->getCwOffset();
}
+int DockRxOpt::getSbSteps() const
+{
+ return demodOpt->getSbSteps();
+}
+
/** Read receiver configuration from settings data. */
void DockRxOpt::readSettings(QSettings *settings)
{
@@ -420,6 +426,10 @@ void DockRxOpt::readSettings(QSettings *settings)
if (conv_ok)
demodOpt->setCwOffset(int_val);
+ int_val = settings->value("receiver/ssb_step", 50).toInt(&conv_ok);
+ if (conv_ok)
+ demodOpt->setSbSteps(int_val);
+
int_val = settings->value("receiver/fm_maxdev", 2500).toInt(&conv_ok);
if (conv_ok)
demodOpt->setMaxDev(int_val);
@@ -498,6 +508,12 @@ void DockRxOpt::saveSettings(QSettings *settings)
else
settings->setValue("receiver/cwoffset", cwofs);
+ int ssb_step = demodOpt->getSbSteps();
+ if (ssb_step == 50)
+ settings->remove("receiver/ssb_step");
+ else
+ settings->setValue("receiver/ssb_step", ssb_step);
+
// currently we do not need the decimal
int_val = (int)demodOpt->getMaxDev();
if (int_val == 2500)
@@ -648,6 +664,8 @@ void DockRxOpt::updateDemodOptPage(int demod)
demodOpt->setCurrentPage(CDemodOptions::PAGE_AM_OPT);
else if (demod == MODE_CWL || demod == MODE_CWU)
demodOpt->setCurrentPage(CDemodOptions::PAGE_CW_OPT);
+ else if (demod == MODE_LSB || demod == MODE_USB)
+ demodOpt->setCurrentPage(CDemodOptions::PAGE_SB_OPT);
else if (demod == MODE_AM_SYNC)
demodOpt->setCurrentPage(CDemodOptions::PAGE_AMSYNC_OPT);
else
@@ -797,6 +815,11 @@ void DockRxOpt::demodOpt_cwOffsetChanged(int offset)
emit cwOffsetChanged(offset);
}
+void DockRxOpt::demodOpt_ssbStepsChanged(int offset)
+{
+ emit ssbStepsChanged(offset);
+}
+
/**
* @brief AM-Sync DC removal toggled by user.
* @param enabled Whether DCR is enabled or not.
diff --git a/src/qtgui/dockrxopt.h b/src/qtgui/dockrxopt.h
index 7c7877216..f4d56bc4b 100644
--- a/src/qtgui/dockrxopt.h
+++ b/src/qtgui/dockrxopt.h
@@ -109,6 +109,7 @@ class DockRxOpt : public QDockWidget
void getFilterPreset(int mode, int preset, int * lo, int * hi) const;
int getCwOffset() const;
+ int getSbSteps() const;
double getSqlLevel(void) const;
@@ -204,6 +205,7 @@ public slots:
void noiseBlankerChanged(int nbid, bool on, float threshold);
void cwOffsetChanged(int offset);
+ void ssbStepsChanged(int offset);
private slots:
void on_freqSpinBox_valueChanged(double freq);
@@ -229,6 +231,7 @@ private slots:
void demodOpt_fmEmphSelected(double tau);
void demodOpt_amDcrToggled(bool enabled);
void demodOpt_cwOffsetChanged(int offset);
+ void demodOpt_ssbStepsChanged(int offset);
void demodOpt_amSyncDcrToggled(bool enabled);
void demodOpt_amSyncPllBwSelected(float pll_bw);