From 507d1f2b898451c0ff1d87db5e5080dedee68e62 Mon Sep 17 00:00:00 2001
From: Dave Olsthoorn
+
+
+
+ This is Gqrx %1 Copyright (C) 2011-2016 Alexandru Csete & contributors. Gqrx is a software defined radio receiver powered by "
- "GNU Radio and the Qt toolkit. "
- " Gqrx uses the GrOsmoSDR "
- "input source block and and works with any input device supported by it including:"
- ""
- "
You can download the latest version from the " - "Gqrx website." - "
" - "" - "Gqrx is licensed under the GNU General Public License." - "
").arg(VERSION)); + "Copyright (C) 2011-2016 Alexandru Csete & contributors.
" + "Gqrx is a software defined radio receiver powered by " + "GNU Radio and the Qt toolkit. " + "
Gqrx uses the GrOsmoSDR " + "input source block and and works with any input device supported by it including:" + "
You can download the latest version from the " + "Gqrx website." + "
" + "" + "Gqrx is licensed under the GNU General Public License." + "
").arg(VERSION)); } /** From d77b682122f6f9c1b6d926d86a76f842f09c1ead Mon Sep 17 00:00:00 2001 From: Alexandru CseteThis is Gqrx %1
" "Copyright (C) 2011-2016 Alexandru Csete & contributors.
" - "Gqrx is a software defined radio receiver powered by " + "
Gqrx is a software defined radio (SDR) receiver powered by " "GNU Radio and the Qt toolkit. " "
Gqrx uses the GrOsmoSDR " - "input source block and and works with any input device supported by it including:" - "
You can download the latest version from the " "Gqrx website." "
" From ce3272fcc476f286dae43b6257a6a29609ff770f Mon Sep 17 00:00:00 2001 From: Alexandru CseteFrom 65dc5ede0cea70a6102a2d07d408ab9fe12c5959 Mon Sep 17 00:00:00 2001 From: Alexandru CseteDate: Fri, 30 Sep 2016 00:29:36 +0200 Subject: [PATCH 128/334] Use more descriptive name for config record. --- src/qtgui/dockfft.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qtgui/dockfft.cpp b/src/qtgui/dockfft.cpp index 0e25841..c952ac3 100644 --- a/src/qtgui/dockfft.cpp +++ b/src/qtgui/dockfft.cpp @@ -245,11 +245,11 @@ void DockFft::saveSettings(QSettings *settings) else settings->setValue("waterfall_max_db", intval); - // pandapter and waterfall locked together + // pandapter and waterfall ranges locked together if (ui->lockButton->isChecked()) - settings->setValue("pand_wf_locked", true); + settings->setValue("db_ranges_locked", true); else - settings->remove("pand_wf_locked"); + settings->remove("db_ranges_locked"); settings->endGroup(); } @@ -307,7 +307,7 @@ void DockFft::readSettings(QSettings *settings) setWaterfallRange(fft_min, fft_max); emit waterfallRangeChanged((float) fft_min, (float) fft_max); - bool_val = settings->value("pand_wf_locked", false).toBool(); + bool_val = settings->value("db_ranges_locked", false).toBool(); ui->lockButton->setChecked(bool_val); settings->endGroup(); From ea15a92632d497c053b4863b1b1a68e234a575d8 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Fri, 30 Sep 2016 00:29:57 +0200 Subject: [PATCH 129/334] FFT layout tweaks. --- src/qtgui/dockfft.cpp | 1 + src/qtgui/dockfft.ui | 1015 +++++++++++++++++++++-------------------- 2 files changed, 511 insertions(+), 505 deletions(-) diff --git a/src/qtgui/dockfft.cpp b/src/qtgui/dockfft.cpp index c952ac3..b5ecc7c 100644 --- a/src/qtgui/dockfft.cpp +++ b/src/qtgui/dockfft.cpp @@ -56,6 +56,7 @@ DockFft::DockFft(QWidget *parent) : // buttons can be smaller than 50x32 ui->peakDetectionButton->setMinimumSize(48, 24); ui->peakHoldButton->setMinimumSize(48, 24); + ui->lockButton->setMinimumSize(48, 24); ui->resetButton->setMinimumSize(48, 24); ui->centerButton->setMinimumSize(48, 24); ui->demodButton->setMinimumSize(48, 24); diff --git a/src/qtgui/dockfft.ui b/src/qtgui/dockfft.ui index 02b600a..3609249 100644 --- a/src/qtgui/dockfft.ui +++ b/src/qtgui/dockfft.ui @@ -6,8 +6,8 @@ 0 0 -275 -242 +312 +368 @@ -18,7 +18,7 @@ @@ -43,9 +43,6 @@ - 275 +200 200 From d5e632d15e1b38e5dd7679fdf4722d99627028e9 Mon Sep 17 00:00:00 2001 From: Alexandru Csete - - 6 -@@ -60,6 +57,12 @@ 5 + + + +0 +0 +@@ -67,7 +70,10 @@ QFrame::NoFrame QFrame::Sunken - +Qt::ScrollBarAlwaysOff +Qt::ScrollBarAsNeeded ++ QAbstractScrollArea::AdjustToContentsOnFirstShow true @@ -77,60 +83,100 @@0 0 -252 +302 339 - 5 +0 - 5 +0 - 5 +0 - 5 +0 - 5 +0 - -
+ + QLayout::SetDefaultConstraint +- 5 +0 - 5 +0 - 5 +0 - 5 +0 - -5 +6 - -
+ - +
++ ++ ++ +0 +0 ++ + +0 +0 +- Set waterfall dB range +Set pandapter dB range - +Set waterfall dB range +Set pandapter dB range ++ +-160 ++ +0 ++ +Qt::Horizontal +- +
-+ + ++ +0 +0 ++ +Current zoom level on the frequency axis ++ Current zoom level on the frequency axis - Wf. dB +1x - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - +
2 @@ -208,7 +254,105 @@- +
- +
++ ++ +FFT size ++ +Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +- +
++ ++ ++ +0 +0 ++ +Waterfall ++ +Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter +- +
++ ++ ++ +0 +0 ++ ++ +0 +22 ++ +Set zoom level on the frequency axis ++ +Set zoom level on the frequency axis ++ +1 ++ +50 ++ +5 ++ +Qt::Horizontal ++ +false ++ +false ++ +QSlider::NoTicks +- +
++ ++ +Waterfall time resolution. ++ ++ + +Res: - s +- +
++ ++ +Set zoom level on the frequency axis ++ +Set zoom level on the frequency axis ++ +Freq zoom ++ +Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +- -
@@ -242,276 +386,178 @@ - -
+ - +
++ - +The vertical time span on the waterfall. +Color for the FFT plot ++ +Color ++ +Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +- +
++ ++ ++ +0 +0 ++ ++ +50 +32 ++ +Click to select color for the FFT plot ++ +Click to select color for the FFT plot ++ ++ + +true +- +
-+ + +true ++ ++ +0 +0 ++ ++ +0 +0 ++ +<html>Number of FFT points to calculate. Higher values will require more CPU time. This will not influence the number of points on the display since that parameter is adjusted automatically according to the display size. +</html> ++ +false ++ +7 ++ +15 ++ QComboBox::InsertAlphabetically - Auto +1048576 - 5 min +524288 - 10 min +262144 - 15 min +131072 - 20 min +65536 - 30 min +32768 - 1 hour +16384 - 2 hours +8192 - 5 hours +4096 - 10 hours +3840 - 16 hours +2048 - 24 hours +1024 - +
- +48 hours +768 +- +
+ 512 - -
+ - +
-- - Waterfall time resolution. +Set pandapter dB range - + Set pandapter dB range - -Res: - s -- -
-- -- -2 -- -
-- -- -- -0 -0 -- -- -50 -32 -- -- -16777215 -16777215 -- -Reset zoom level to 1x -- -R -- -
-- -- -- -0 -0 -- -- -50 -32 -- -- -16777215 -16777215 -- -Center FFT around original center frequency -- -C -- -
-- -- -- -0 -0 -- -- -50 -32 -- -- -16777215 -16777215 -- -Center FFT around demodulator frequency -- -D -- -
-- - -- -0 -0 -- -- -0 -22 -- -Set zoom level on the frequency axis -- -Set zoom level on the frequency axis -- -1 -- -50 -- -5 -- -Qt::Horizontal -- -false -- -false +Pand. dB - QSlider::NoTicks ++ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - -
+ - +
-- - -+ 0 0 - -- -0 -22 -- -Spatial distribution between pandapter and waterfall -- -0 -- -100 -- -50 -- -Qt::Horizontal -- -
-- -- -The vertical time span on the waterfall. -- -- - -Time span -- -Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter -- -
-- Rate +Pandapter Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -537,246 +583,111 @@- -
+ - +
-- Resolution bandwidth +FFT buffer overlap between two consecutive FFT calculations. - +RBW: 0 kHz +Overlap: 0% ++ 0 - -
+ - +
-- +Color for the FFT plot +Set waterfall dB range ++ Set waterfall dB range - Color +Wf. dB Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - -
-- - +true -- +
-- - 0 0 - - -0 -0 -- -<html>Number of FFT points to calculate. Higher values will require more CPU time. This will not influence the number of points on the display since that parameter is adjusted automatically according to the display size. -</html> -- -false -- -7 -- -15 -- QComboBox::InsertAlphabetically +The vertical time span on the waterfall. - 1048576 +Auto - 524288 +5 min - 262144 +10 min - 131072 +15 min - 65536 +20 min - 32768 +30 min - 16384 +1 hour - 8192 +2 hours - 4096 +5 hours - 3840 +10 hours - 2048 +16 hours - 1024 +24 hours - -
- 768 +48 hours - -
-- -512 -- -
-- -- -- -0 -0 -- -Waterfall -- -Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter -- -
-- -- -- -0 -0 -- -Pandapter -- -Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter -- -
-- -- -- -0 -0 -- -- -50 -32 -- -Click to select color for the FFT plot -- -Click to select color for the FFT plot -- -- - -true -- -
-- -- -FFT buffer overlap between two consecutive FFT calculations. -- -Overlap: 0% -- -
-- -- -- -0 -0 -- -- -50 -32 -- -- -16777215 -16777215 -- -Fill the area below the FFT plot with a gradient -- -Fill the area below the FFT plot with a gradient -- -Fill -- -true -- -
- - -FFT size -- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter -- @@ -856,179 +767,273 @@
- -
-- -- -- -0 -0 -- -Current zoom level on the frequency axis -- -Current zoom level on the frequency axis -- -1x -- -Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter -- -
-- -- -Peak -- -Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter -- -
-- -- -Set zoom level on the frequency axis -- -Set zoom level on the frequency axis -- -Freq zoom -- -Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter -- -
+ - +
-- Set pandapter dB range +The vertical time span on the waterfall. - Set pandapter dB range +- Pand. dB +Time span Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - -
-+ - +
+- -5 +2 - -
+ - +
-- + 0 0 - - 0 -0 +50 +32 - -Set pandapter dB range -- -Set pandapter dB range -- -160 ++ -+ 16777215 +16777215 +- 0 ++ -Reset zoom level to 1x - Qt::Horizontal ++ R - -
- - Set waterfall dB range +- +
-+ + -+ 0 +0 +- Set waterfall dB range ++ -+ 50 +32 +- -160 ++ -+ 16777215 +16777215 +- 0 ++ -Center FFT around original center frequency - Qt::Horizontal ++ C - -
- - +true -- +
- + 0 0 - 0 -0 +50 +32 - 40 +16777215 16777215 - -Lock panadapter and waterfall sliders together -- Lock panadapter and waterfall sliders together +Center FFT around demodulator frequency - -Lock -- true +D - +
++ ++ ++ +0 +0 ++ ++ +50 +32 ++ ++ +16777215 +16777215 ++ +Fill the area below the FFT plot with a gradient ++ +Fill the area below the FFT plot with a gradient ++ +Fill ++ +true +- +
++ ++ +Peak ++ +Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +- +
++ ++ +Rate ++ +Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +- +
++ ++ +Set waterfall dB range ++ +Set waterfall dB range ++ +-160 ++ +0 ++ +Qt::Horizontal +- +
++ ++ +Resolution bandwidth ++ +RBW: 0 kHz +- +
++ ++ +true ++ ++ +0 +0 ++ ++ +50 +32 ++ +Lock panadapter and waterfall sliders together ++ +Lock panadapter and waterfall sliders together ++ +Lock ++ +true +- +
++ ++ ++ +0 +0 ++ ++ +0 +22 ++ +Spatial distribution between pandapter and waterfall ++ +0 ++ +100 ++ +50 ++ +Qt::Horizontal +- +
+ ++ +Qt::Vertical ++ ++ +253 +68 +- -
- -- -Qt::Vertical -- -- -20 -8 -Date: Fri, 30 Sep 2016 00:40:23 +0200 Subject: [PATCH 130/334] Use full text on buttons. Now thatbuttons have minimum size we may as well use full text on buttons instead of just their capital letters. --- src/qtgui/dockfft.ui | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qtgui/dockfft.ui b/src/qtgui/dockfft.ui index 3609249..2c60b7c 100644 --- a/src/qtgui/dockfft.ui +++ b/src/qtgui/dockfft.ui @@ -812,7 +812,7 @@ Reset zoom level to 1x - @@ -840,7 +840,7 @@R +Reset Center FFT around original center frequency - @@ -868,7 +868,7 @@C +Center Center FFT around demodulator frequency - From 3460aa7ff8d8e79ad37fa594467f038c60266ea3 Mon Sep 17 00:00:00 2001 From: Alexandru CseteD +Demod Date: Fri, 30 Sep 2016 00:59:40 +0200 Subject: [PATCH 131/334] LEt Lock button occupy a single cell only. This make the button have a more native feel and leaves an empty cell for a future auto-scale button. --- src/qtgui/dockfft.ui | 70 ++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/qtgui/dockfft.ui b/src/qtgui/dockfft.ui index 2c60b7c..6742884 100644 --- a/src/qtgui/dockfft.ui +++ b/src/qtgui/dockfft.ui @@ -6,8 +6,8 @@ 0 0 -312 -368 +320 +386 @@ -83,8 +83,8 @@ 0 0 -302 -339 +310 +357 @@ -957,37 +957,6 @@ - From 5dd3978fd87910e3b5f4965b447cd28336a0ef31 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov- -
- -- -true -- -- -0 -0 -- -- -50 -32 -- -Lock panadapter and waterfall sliders together -- -Lock panadapter and waterfall sliders together -- -Lock -- -true -- +
@@ -1032,6 +1001,37 @@ - +
+ ++ +true ++ ++ +0 +0 ++ ++ +50 +32 ++ +Lock panadapter and waterfall sliders together ++ +Lock panadapter and waterfall sliders together ++ +Lock ++ +true +Date: Fri, 30 Sep 2016 11:19:08 +0400 Subject: [PATCH 132/334] Bookmarks: sort tags only in load before bookmarks. The code uses tag index for coupling between bookmark and tag. Reorder tags breaks it. --- src/qtgui/bookmarks.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qtgui/bookmarks.cpp b/src/qtgui/bookmarks.cpp index b4e90d1..7ec7bda 100644 --- a/src/qtgui/bookmarks.cpp +++ b/src/qtgui/bookmarks.cpp @@ -105,6 +105,7 @@ bool Bookmarks::load() printf("\nBookmarks: Ignoring Line:\n %s\n", line.toLatin1().data()); } } + std::sort(m_TagList.begin(),m_TagList.end()); // Read Bookmarks, after first empty line. while (!file.atEnd()) @@ -137,7 +138,6 @@ bool Bookmarks::load() } } file.close(); - std::sort(m_TagList.begin(),m_TagList.end()); std::stable_sort(m_BookmarkList.begin(),m_BookmarkList.end()); emit BookmarksChanged(); @@ -247,7 +247,6 @@ TagInfo &Bookmarks::findOrAddTag(QString tagName) TagInfo info; info.name=tagName; m_TagList.append(info); - std::sort(m_TagList.begin(),m_TagList.end()); emit TagListChanged(); return m_TagList.last(); } From 4e438cdf2996d8f53edc54664be7c22cdb203614 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 1 Oct 2016 19:58:44 +0200 Subject: [PATCH 133/334] Allow audio recording in Raw I/Q mode. --- src/applications/gqrx/mainwindow.cpp | 3 +-- src/applications/gqrx/remote_control.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 0c2acdf..c6e6bd3 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -1057,8 +1057,7 @@ void MainWindow::selectDemod(int mode_idx) rx->set_cw_offset(cwofs); rx->set_sql_level(uiDockRxOpt->currentSquelchLevel()); - d_have_audio = ((mode_idx != DockRxOpt::MODE_OFF) && - (mode_idx != DockRxOpt::MODE_RAW)); + d_have_audio = (mode_idx != DockRxOpt::MODE_OFF); uiDockRxOpt->setCurrentDemod(mode_idx); } diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index 079a6b0..1477563 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -444,7 +444,7 @@ void RemoteControl::setSquelchLevel(double level) /*! \brief Start audio recorder (from mainwindow). */ void RemoteControl::startAudioRecorder(QString unused) { - if (rc_mode >= 2) + if (rc_mode > 0) audio_recorder_status = true; } From 96cecb8e1801cb426e4d328676c453757effb8a2 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 1 Oct 2016 20:09:46 +0200 Subject: [PATCH 134/334] Fix raw I/Q audio recording in remote controller. --- src/applications/gqrx/remote_control.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index 1477563..7738448 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -254,7 +254,7 @@ void RemoteControl::startRead() rc_socket->write("RPRT 0\n"); rc_mode = mode; - if (rc_mode < 2) + if (rc_mode == 0) audio_recorder_status = false; emit newMode(rc_mode); @@ -280,7 +280,7 @@ void RemoteControl::startRead() } else if (func.compare("RECORD", Qt::CaseInsensitive) == 0) { - if (rc_mode < 2 || !receiver_running) + if (rc_mode == 0 || !receiver_running) { rc_socket->write("RPRT 1\n"); } @@ -317,7 +317,7 @@ void RemoteControl::startRead() // LOS - satellite LOS event else if (cmdlist[0] == "AOS") { - if (rc_mode >= 2 && receiver_running) + if (rc_mode > 0 && receiver_running) { emit startAudioRecorderEvent(); audio_recorder_status = true; @@ -407,7 +407,7 @@ void RemoteControl::setMode(int mode) { rc_mode = mode; - if (rc_mode < 2) + if (rc_mode == 0) audio_recorder_status = false; } From 902ba8cf6a63c33939193116d624f82034e7a3f5 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 1 Oct 2016 23:53:28 +0200 Subject: [PATCH 135/334] Minor improvements to the sample rate selector. --- src/qtgui/ioconfig.cpp | 78 ++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/src/qtgui/ioconfig.cpp b/src/qtgui/ioconfig.cpp index 4d825bc..557cdf6 100644 --- a/src/qtgui/ioconfig.cpp +++ b/src/qtgui/ioconfig.cpp @@ -252,18 +252,10 @@ void CIoConfig::getDeviceList(std::map &devList) qDebug() << " " << i << ":" << devlabel; ++i; - - // Following code could be used for multiple matches - /* QStringList list; - int pos = 0; - while ((pos = rx.indexIn(devstr, pos)) != -1) { - list << rx.cap(1); - pos += rx.matchedLength(); - } */ } } -/** @brief Save configuration. */ +/** Save configuration. */ void CIoConfig::saveConfig() { int idx; @@ -331,18 +323,7 @@ void CIoConfig::updateInputSampleRates(int rate) ui->inSrCombo->clear(); if (ui->inDevEdit->text().isEmpty()) - { return; - } - - /** FIXME: this code crashes on RTL device so we use fixed rates **/ - //osmosdr_source_c_sptr src = osmosdr_make_source_c(ui->inDevEdit->text().toStdString()); - //osmosdr::meta_range_t rates = src->get_sample_rates(); - //BOOST_FOREACH(osmosdr::range_t &rate, rates) - //{ - // ui->inSrCombo->addItem(QString("%1 kHz").arg(rate.start()/1000, 0, 'f', 0)); - //} - //src.reset(); if (ui->inDevEdit->text().contains("fcd")) { @@ -420,9 +401,6 @@ void CIoConfig::updateInputSampleRates(int rate) } else if (ui->inDevEdit->text().contains("sdr-iq")) { - if (rate > 0) - ui->inSrCombo->addItem(QString("%1").arg(rate)); - ui->inSrCombo->addItem("8138"); ui->inSrCombo->addItem("16276"); ui->inSrCombo->addItem("37793"); @@ -430,12 +408,16 @@ void CIoConfig::updateInputSampleRates(int rate) ui->inSrCombo->addItem("111111"); ui->inSrCombo->addItem("158730"); ui->inSrCombo->addItem("196078"); + if (rate > 0) + { + ui->inSrCombo->insertItem(0, QString("%1").arg(rate)); + ui->inSrCombo->setCurrentIndex(0); + } + else + ui->inSrCombo->setCurrentIndex(4); // select 111.111 kHz } else if (ui->inDevEdit->text().contains("sdr-ip")) { - if (rate > 0) - ui->inSrCombo->addItem(QString("%1").arg(rate)); - ui->inSrCombo->addItem("31250"); ui->inSrCombo->addItem("32000"); ui->inSrCombo->addItem("40000"); @@ -455,12 +437,16 @@ void CIoConfig::updateInputSampleRates(int rate) ui->inSrCombo->addItem("1000000"); ui->inSrCombo->addItem("1600000"); ui->inSrCombo->addItem("2000000"); + if (rate > 0) + { + ui->inSrCombo->insertItem(0, QString("%1").arg(rate)); + ui->inSrCombo->setCurrentIndex(0); + } + else + ui->inSrCombo->setCurrentIndex(11); // select 250 kHz } else if (ui->inDevEdit->text().contains("netsdr")) { - if (rate > 0) - ui->inSrCombo->addItem(QString("%1").arg(rate)); - ui->inSrCombo->addItem("32000"); ui->inSrCombo->addItem("40000"); ui->inSrCombo->addItem("50000"); @@ -481,6 +467,13 @@ void CIoConfig::updateInputSampleRates(int rate) ui->inSrCombo->addItem("1000000"); ui->inSrCombo->addItem("1250000"); ui->inSrCombo->addItem("2000000"); + if (rate > 0) + { + ui->inSrCombo->insertItem(0, QString("%1").arg(rate)); + ui->inSrCombo->setCurrentIndex(0); + } + else + ui->inSrCombo->setCurrentIndex(11); // select 250 kHz } else if (ui->inDevEdit->text().contains("cloudiq")) { @@ -498,9 +491,12 @@ void CIoConfig::updateInputSampleRates(int rate) ui->inSrCombo->addItem("1228800"); ui->inSrCombo->addItem("1807058"); if (rate > 0) + { ui->inSrCombo->insertItem(0, QString("%1").arg(rate)); + ui->inSrCombo->setCurrentIndex(0); + } else - ui->inSrCombo->setCurrentIndex(4); // select 370 kHz + ui->inSrCombo->setCurrentIndex(4); // select 240 kHz } else if (ui->inDevEdit->text().contains("airspy")) { @@ -521,14 +517,15 @@ void CIoConfig::updateInputSampleRates(int rate) ui->inSrCombo->addItem("500000"); ui->inSrCombo->addItem("1250000"); if (rate > 0) - ui->inSrCombo->addItem(QString("%1").arg(rate)); + { + ui->inSrCombo->insertItem(0, QString("%1").arg(rate)); + ui->inSrCombo->setCurrentIndex(0); + } else ui->inSrCombo->setCurrentIndex(3); // select 250 kHz } else if (ui->inDevEdit->text().contains("sdrplay")) { - if (rate > 0) - ui->inSrCombo->addItem(QString("%1").arg(rate)); ui->inSrCombo->addItem("222222"); ui->inSrCombo->addItem("333333"); ui->inSrCombo->addItem("428571"); @@ -547,7 +544,12 @@ void CIoConfig::updateInputSampleRates(int rate) ui->inSrCombo->addItem("10000000"); ui->inSrCombo->addItem("11000000"); ui->inSrCombo->addItem("12000000"); - if (rate == 0) + if (rate > 0) + { + ui->inSrCombo->insertItem(0, QString("%1").arg(rate)); + ui->inSrCombo->setCurrentIndex(0); + } + else ui->inSrCombo->setCurrentIndex(9); // select 2048 kHz } else @@ -669,9 +671,7 @@ void CIoConfig::decimationChanged(int index) arg(quad_rate * 1.e-3, 0, 'f', 3)); } -/** - * @brief Convert a combo box index to decimation. - */ +/** Convert a combo box index to decimation. */ int CIoConfig::idx2decim(int idx) const { if (idx < 1) @@ -680,9 +680,7 @@ int CIoConfig::idx2decim(int idx) const return (1 << idx); } -/** - * @brief Convert a decimation to a combobox index - */ +/** Convert a decimation to a combobox index */ int CIoConfig::decim2idx(int decim) const { int idx; From 0582f1f751406d7d15cc178edcb930275c10e880 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 2 Oct 2016 19:33:05 +0200 Subject: [PATCH 136/334] Require Qt 5. Maintaing Qt 4 compatibility becomes increasingly painful. Even small changes in designer forms can have side effects that break copatibility with Qt 4. So lets just stop spending time on this. --- README.md | 4 +--- gqrx.pro | 7 ++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b0746cb..ee9ef6e 100644 --- a/README.md +++ b/README.md @@ -104,9 +104,7 @@ To compile gqrx from source you need the following dependencies: - Network - Widgets - Svg (runtime only) -- cmake version >= 3.2.0 if you wish to build using cmake. Note that cmake builds require Qt 5. - -Qt 4.8 may also work but no longer guaranteed. +- cmake version >= 3.2.0 if you wish to build using cmake. To build using qmake, you can either open the gqrx.pro file in Qt Creator and build, or on the command line: diff --git a/gqrx.pro b/gqrx.pro index 9f6e999..e932f63 100644 --- a/gqrx.pro +++ b/gqrx.pro @@ -10,9 +10,10 @@ # BOOST_SUFFIX=-mt To link against libboost-xyz-mt (needed for pybombs) #-------------------------------------------------------------------------------- -QT += core gui network -contains(QT_MAJOR_VERSION,5) { - QT += widgets +QT += core gui network widgets + +lessThan(QT_MAJOR_VERSION,5) { + error("Gqrx requires Qt 5.") } TEMPLATE = app From b067c09866b8ee2138870654a587b1fee8c871f4 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 2 Oct 2016 19:35:39 +0200 Subject: [PATCH 137/334] Always quote strings. --- gqrx.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gqrx.pro b/gqrx.pro index e932f63..6f42def 100644 --- a/gqrx.pro +++ b/gqrx.pro @@ -32,7 +32,7 @@ CONFIG += link_pkgconfig unix:!macx { equals(AUDIO_BACKEND, "portaudio") { !packagesExist(portaudio-2.0) { - error(Portaudio backend requires portaudio19-dev package.) + error("Portaudio backend requires portaudio19-dev package.") } } isEmpty(AUDIO_BACKEND) { @@ -52,7 +52,7 @@ QMAKE_CLEAN += gqrx # make install target isEmpty(PREFIX) { - message(No prefix given. Using /usr/local) + message("No prefix given. Using /usr/local") PREFIX=/usr/local } From 65f0602b14aa055ccfd4f34523082379488b3c40 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 2 Oct 2016 21:02:41 +0200 Subject: [PATCH 138/334] Limit the scope of local variables. --- src/qtgui/dockinputctl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qtgui/dockinputctl.cpp b/src/qtgui/dockinputctl.cpp index 149033d..033d8d7 100644 --- a/src/qtgui/dockinputctl.cpp +++ b/src/qtgui/dockinputctl.cpp @@ -85,11 +85,12 @@ void DockInputCtl::readSettings(QSettings * settings) // gains are stored as a QMap // note that we store the integer values, i.e. dB*10 - QMap allgains; - QString gain_name; - double gain_value; if (settings->contains("input/gains")) { + QMap allgains; + QString gain_name; + double gain_value; + allgains = settings->value("input/gains").toMap(); QMapIterator gain_iter(allgains); @@ -103,7 +104,6 @@ void DockInputCtl::readSettings(QSettings * settings) emit gainChanged(gain_name, gain_value); } } - } void DockInputCtl::saveSettings(QSettings * settings) From 2034b335afc41044762c4c2e37cc9cdf1d6ceb33 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 2 Oct 2016 22:35:15 +0200 Subject: [PATCH 139/334] Update news and readme. --- README.md | 14 +++++++------- resources/news.txt | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ee9ef6e..35e13b8 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ Gqrx ==== -Gqrx is an experimental software defined radio receiver implemented using GNU -Radio and the Qt GUI toolkit. Currently it works on Linux and Mac with hardware -supported by gr-osmosdr, including Funcube Dongle, RTL-SDR, Airspy, HackRF, -BladeRF, RFSpace, USRP and even SoapySDR. +Gqrx is an open source software defined radio (SDR) receiver implemented using +GNU Radio and the Qt GUI toolkit. Currently it works on Linux and Mac with +hardware supported by gr-osmosdr, including Funcube Dongle, RTL-SDR, Airspy, +HackRF, BladeRF, RFSpace, USRP and SoapySDR. -Gqrx can operate as a traditional AM/FM/SSB receiver with audio output or as an -FFT-only instrument. There are also various hooks for interacting with external +Gqrx can operate as an AM/FM/SSB receiver with audio output or as an FFT-only +instrument. There are also various hooks for interacting with external application using nertwork sockets. @@ -17,7 +17,7 @@ Download Gqrx is distributed as source code package and binaries for Linux and Mac. Alternate Mac support is available through macports and homebrew. -Please see http://gqrx.dk/download for a list of official download resources. +Please see http://gqrx.dk/download for a list of download resources. Usage diff --git a/resources/news.txt b/resources/news.txt index 4cf0688..ae53d58 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -1,4 +1,4 @@ - 2.6: Released TBD + 2.6: Released October 3, 2016 NEW: 1-2-5 scaling on FFT axis. NEW: Audio waterfall. @@ -17,6 +17,7 @@ FIXED: Update squelch level when switching between demodulators. FIXED: Set correct filter range when loading bookmark. FIXED: White area on waterfall. + FIXED: RFSpace Cloud-IQ support on Mac OS X and in PPA IMPROVED: Input decimator performance. IMPROVED: SDRPlay integration. IMPROVED: Only probe for devices when the program is started. From 79560565d9f36b17bc01130c49b2f69350ede2ee Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 2 Oct 2016 22:55:02 +0200 Subject: [PATCH 140/334] Update version strings to 2.6 --- CMakeLists.txt | 22 +++++++++++----------- gqrx.pro | 8 ++++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a12f56..fcc33bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,20 +3,20 @@ cmake_minimum_required(VERSION 2.8.0) # Project name project(gqrx) set(${PROJECT_NAME}_MAJOR "2") -set(${PROJECT_NAME}_MINOR "5") -set(${PROJECT_NAME}_PATCH "3") +set(${PROJECT_NAME}_MINOR "6") +set(${PROJECT_NAME}_PATCH "0") ##set(VERSION "${${PROJECT_NAME}_MAJOR}.${${PROJECT_NAME}_MINOR}.${${PROJECT_NAME}_PATCH}") -##set(VERSION "${${PROJECT_NAME}_MAJOR}.${${PROJECT_NAME}_MINOR}") -##add_definitions(-DVERSION="${VERSION}") +set(VERSION "${${PROJECT_NAME}_MAJOR}.${${PROJECT_NAME}_MINOR}") +add_definitions(-DVERSION="${VERSION}") # development version -execute_process( - COMMAND git describe --long --dirty - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE GITVERSION - OUTPUT_STRIP_TRAILING_WHITESPACE -) -add_definitions(-DVERSION="${GITVERSION}") +#execute_process( +# COMMAND git describe --long --dirty +# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +# OUTPUT_VARIABLE GITVERSION +# OUTPUT_STRIP_TRAILING_WHITESPACE +#) +#add_definitions(-DVERSION="${GITVERSION}") set(PACKAGE ${PROJECT_NAME}) diff --git a/gqrx.pro b/gqrx.pro index 6f42def..7431435 100644 --- a/gqrx.pro +++ b/gqrx.pro @@ -67,14 +67,14 @@ CONFIG(debug, debug|release) { #QMAKE_CFLAGS_DEBUG += '-g -O0' # Define version string (see below for releases) - VER = $$system(git describe --abbrev=8) - ##VER = 2.5.3 + ##VER = $$system(git describe --abbrev=8) + VER = 2.6 } else { DEFINES += QT_NO_DEBUG DEFINES += QT_NO_DEBUG_OUTPUT - VER = $$system(git describe --abbrev=1) - ##VER = 2.5.3 + ##VER = $$system(git describe --abbrev=1) + VER = 2.6 # Release binaries with gr bundled # QMAKE_RPATH & co won't work with origin From d3324e342ab31809f7965384bc5250a845c55dbf Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Fri, 30 Sep 2016 09:53:47 +0400 Subject: [PATCH 141/334] Remote control: Refactoring the load()/save() code. Initialization the rc_freq/rc_filter_offset is unnecessary when the remote control server running we get the current value from main code. --- src/applications/gqrx/remote_control.cpp | 31 +++++++++++++++--------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index 7738448..ea2ee9a 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -74,35 +74,44 @@ void RemoteControl::stop_server() /*! \brief Read settings. */ void RemoteControl::readSettings(QSettings *settings) { - bool conv_ok; + if (!settings) + return; - rc_freq = settings->value("input/frequency", 144500000).toLongLong(&conv_ok); - rc_filter_offset = settings->value("receiver/offset", 0).toInt(&conv_ok); + settings->beginGroup("remote_control"); // Get port number; restart server if running - rc_port = settings->value("remote_control/port", 7356).toInt(&conv_ok); + rc_port = settings->value("port", 7356).toInt(); if (rc_server.isListening()) { rc_server.close(); rc_server.listen(QHostAddress::Any, rc_port); } - // get list of allowed hosts - if (settings->contains("remote_control/allowed_hosts")) - rc_allowed_hosts = settings->value("remote_control/allowed_hosts").toStringList(); + // Get list of allowed hosts + if (settings->contains("allowed_hosts")) + rc_allowed_hosts = settings->value("allowed_hosts").toStringList(); + + settings->endGroup(); } void RemoteControl::saveSettings(QSettings *settings) const { + if (!settings) + return; + + settings->beginGroup("remote_control"); + if (rc_port != 7356) - settings->setValue("remote_control/port", rc_port); + settings->setValue("port", rc_port); else - settings->remove("remote_control/port"); + settings->remove("port"); if ((rc_allowed_hosts.count() != 1) || (rc_allowed_hosts.at(0) != "::ffff:127.0.0.1")) - settings->setValue("remote_control/allowed_hosts", rc_allowed_hosts); + settings->setValue("allowed_hosts", rc_allowed_hosts); else - settings->remove("remote_control/allowed_hosts"); + settings->remove("allowed_hosts"); + + settings->endGroup(); } /*! \brief Set new network port. From ebb9a756c513811608ff76b1089ea40841f870df Mon Sep 17 00:00:00 2001 From: Alexander Fasching Date: Mon, 3 Oct 2016 20:41:24 +0200 Subject: [PATCH 142/334] Keep zoom-slider and waterfall zoom synchronized --- src/applications/gqrx/mainwindow.cpp | 2 ++ src/qtgui/dockfft.cpp | 8 ++++++++ src/qtgui/dockfft.h | 1 + src/qtgui/plotter.cpp | 1 + src/qtgui/plotter.h | 1 + 5 files changed, 13 insertions(+) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index c6e6bd3..0efb8cf 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -235,6 +235,8 @@ MainWindow::MainWindow(const QString cfgfile, bool edit_conf, QWidget *parent) : ui->plotter, SLOT(setWaterfallRange(float,float))); connect(ui->plotter, SIGNAL(pandapterRangeChanged(float,float)), uiDockFft, SLOT(setPandapterRange(float,float))); + connect(ui->plotter, SIGNAL(newZoomLevel(float)), + uiDockFft, SLOT(setZoomLevel(float))); connect(uiDockFft, SIGNAL(fftColorChanged(QColor)), this, SLOT(setFftColor(QColor))); connect(uiDockFft, SIGNAL(fftFillToggled(bool)), this, SLOT(setFftFill(bool))); diff --git a/src/qtgui/dockfft.cpp b/src/qtgui/dockfft.cpp index b5ecc7c..5056eca 100644 --- a/src/qtgui/dockfft.cpp +++ b/src/qtgui/dockfft.cpp @@ -334,6 +334,14 @@ void DockFft::setWaterfallRange(float min, float max) ui->wfRangeSlider->blockSignals(false); } +void DockFft::setZoomLevel(float level) +{ + ui->fftZoomSlider->blockSignals(true); + ui->fftZoomSlider->setValue((int) level); + ui->zoomLevelLabel->setText(QString("%1x").arg((int) level)); + ui->fftZoomSlider->blockSignals(false); +} + /** FFT size changed. */ void DockFft::on_fftSizeComboBox_currentIndexChanged(const QString &text) { diff --git a/src/qtgui/dockfft.h b/src/qtgui/dockfft.h index 67832cc..37b49bc 100644 --- a/src/qtgui/dockfft.h +++ b/src/qtgui/dockfft.h @@ -71,6 +71,7 @@ public slots: void setPandapterRange(float min, float max); void setWaterfallRange(float min, float max); void setWfResolution(quint64 msec_per_line); + void setZoomLevel(float level); private slots: void on_fftSizeComboBox_currentIndexChanged(const QString & text); diff --git a/src/qtgui/plotter.cpp b/src/qtgui/plotter.cpp index 1a2750c..e491632 100644 --- a/src/qtgui/plotter.cpp +++ b/src/qtgui/plotter.cpp @@ -771,6 +771,7 @@ void CPlotter::zoomStepX(float step, int x) setSpanFreq((quint32)new_range); float factor = (float)m_SampleFreq / (float)m_Span; + emit newZoomLevel(factor); qDebug() << QString("Spectrum zoom: %1x").arg(factor, 0, 'f', 1); m_PeakHoldValid = false; diff --git a/src/qtgui/plotter.h b/src/qtgui/plotter.h index d8b58bd..33708dd 100644 --- a/src/qtgui/plotter.h +++ b/src/qtgui/plotter.h @@ -121,6 +121,7 @@ class CPlotter : public QFrame void newHighCutFreq(int f); void newFilterFreq(int low, int high); /* substitute for NewLow / NewHigh */ void pandapterRangeChanged(float min, float max); + void newZoomLevel(float level); public slots: // zoom functions From c05258b65fd194ab33e4f22ccd11db2095f8923b Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Mon, 3 Oct 2016 10:23:13 +0400 Subject: [PATCH 143/334] Remote control: state is saved now. Fixes #219. --- src/applications/gqrx/mainwindow.cpp | 13 ++++++++++++- src/applications/gqrx/remote_control.cpp | 8 +++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index c6e6bd3..f4d72a1 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -575,9 +575,20 @@ bool MainWindow::loadConfig(const QString cfgfile, bool check_crash, setNewFrequency(ui->freqCtrl->getFrequency()); // ensure all GUI and RF is updated } - remote->readSettings(m_settings); iq_tool->readSettings(m_settings); + /* + * Initialization the remote control at the end. + * We must be sure that all variables initialized before starting RC server. + */ + remote->readSettings(m_settings); + bool_val = m_settings->value("remote_control/enabled", false).toBool(); + if (bool_val) + { + remote->start_server(); + ui->actionRemoteControl->setChecked(true); + } + return conf_ok; } diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index ea2ee9a..466c0cc 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -57,7 +57,8 @@ RemoteControl::~RemoteControl() /*! \brief Start the server. */ void RemoteControl::start_server() { - rc_server.listen(QHostAddress::Any, rc_port); + if (!rc_server.isListening()) + rc_server.listen(QHostAddress::Any, rc_port); } /*! \brief Stop the server. */ @@ -101,6 +102,11 @@ void RemoteControl::saveSettings(QSettings *settings) const settings->beginGroup("remote_control"); + if (rc_server.isListening()) + settings->setValue("enabled", true); + else + settings->remove("enabled"); + if (rc_port != 7356) settings->setValue("port", rc_port); else From 22fc13a0ff344fb16757266a08aa6dbd9d42a1c9 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 6 Oct 2016 22:35:01 +0200 Subject: [PATCH 144/334] Continue with devel versioning. --- CMakeLists.txt | 18 +++++++++--------- gqrx.pro | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fcc33bd..b73dc31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,17 +6,17 @@ set(${PROJECT_NAME}_MAJOR "2") set(${PROJECT_NAME}_MINOR "6") set(${PROJECT_NAME}_PATCH "0") ##set(VERSION "${${PROJECT_NAME}_MAJOR}.${${PROJECT_NAME}_MINOR}.${${PROJECT_NAME}_PATCH}") -set(VERSION "${${PROJECT_NAME}_MAJOR}.${${PROJECT_NAME}_MINOR}") -add_definitions(-DVERSION="${VERSION}") +##set(VERSION "${${PROJECT_NAME}_MAJOR}.${${PROJECT_NAME}_MINOR}") +##add_definitions(-DVERSION="${VERSION}") # development version -#execute_process( -# COMMAND git describe --long --dirty -# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} -# OUTPUT_VARIABLE GITVERSION -# OUTPUT_STRIP_TRAILING_WHITESPACE -#) -#add_definitions(-DVERSION="${GITVERSION}") +execute_process( + COMMAND git describe --long --dirty + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GITVERSION + OUTPUT_STRIP_TRAILING_WHITESPACE +) +add_definitions(-DVERSION="${GITVERSION}") set(PACKAGE ${PROJECT_NAME}) diff --git a/gqrx.pro b/gqrx.pro index 7431435..897e91d 100644 --- a/gqrx.pro +++ b/gqrx.pro @@ -67,14 +67,14 @@ CONFIG(debug, debug|release) { #QMAKE_CFLAGS_DEBUG += '-g -O0' # Define version string (see below for releases) - ##VER = $$system(git describe --abbrev=8) - VER = 2.6 + VER = $$system(git describe --abbrev=8) + ##VER = 2.6 } else { DEFINES += QT_NO_DEBUG DEFINES += QT_NO_DEBUG_OUTPUT - ##VER = $$system(git describe --abbrev=1) - VER = 2.6 + VER = $$system(git describe --abbrev=1) + ##VER = 2.6 # Release binaries with gr bundled # QMAKE_RPATH & co won't work with origin From 82dafcccd3c7330b97064052c3b825a138666a08 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Fri, 7 Oct 2016 00:45:10 +0200 Subject: [PATCH 145/334] Update news file. --- resources/news.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/news.txt b/resources/news.txt index ae53d58..a1e9eea 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -1,3 +1,9 @@ + 2.7: TBD... + + NEW: Save remote control state between sessions. + FIXED: Keep waterfall zoom level and zoom slider synchronised. + + 2.6: Released October 3, 2016 NEW: 1-2-5 scaling on FFT axis. From 61521554cb235dda8ea5daf2f8e6cb3e775abce9 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Thu, 6 Oct 2016 08:53:36 +0400 Subject: [PATCH 146/334] Remove duplicate code and magic numbers in remote control --- src/applications/gqrx/remote_control.cpp | 26 ++++++++----------- src/applications/gqrx/remote_control.h | 1 - .../gqrx/remote_control_settings.ui | 8 ------ 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index 466c0cc..c942f14 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -27,6 +27,9 @@ #include #include "remote_control.h" +#define DEFAULT_RC_PORT 7356 +#define DEFAULT_RC_ALLOWED_HOSTS "::ffff:127.0.0.1" + RemoteControl::RemoteControl(QObject *parent) : QObject(parent) { @@ -40,8 +43,8 @@ RemoteControl::RemoteControl(QObject *parent) : audio_recorder_status = false; receiver_running = false; - rc_port = 7356; - rc_allowed_hosts.append("::ffff:127.0.0.1"); + rc_port = DEFAULT_RC_PORT; + rc_allowed_hosts.append(DEFAULT_RC_ALLOWED_HOSTS); rc_socket = 0; @@ -81,16 +84,12 @@ void RemoteControl::readSettings(QSettings *settings) settings->beginGroup("remote_control"); // Get port number; restart server if running - rc_port = settings->value("port", 7356).toInt(); - if (rc_server.isListening()) - { - rc_server.close(); - rc_server.listen(QHostAddress::Any, rc_port); - } + if (settings->contains("port")) + setPort(settings->value("port").toInt()); // Get list of allowed hosts if (settings->contains("allowed_hosts")) - rc_allowed_hosts = settings->value("allowed_hosts").toStringList(); + setHosts(settings->value("allowed_hosts").toStringList()); settings->endGroup(); } @@ -107,12 +106,12 @@ void RemoteControl::saveSettings(QSettings *settings) const else settings->remove("enabled"); - if (rc_port != 7356) + if (rc_port != DEFAULT_RC_PORT) settings->setValue("port", rc_port); else settings->remove("port"); - if ((rc_allowed_hosts.count() != 1) || (rc_allowed_hosts.at(0) != "::ffff:127.0.0.1")) + if ((rc_allowed_hosts.count() != 1) || (rc_allowed_hosts.at(0) != DEFAULT_RC_ALLOWED_HOSTS)) settings->setValue("allowed_hosts", rc_allowed_hosts); else settings->remove("allowed_hosts"); @@ -141,10 +140,7 @@ void RemoteControl::setPort(int port) void RemoteControl::setHosts(QStringList hosts) { - rc_allowed_hosts.clear(); - - for (int i = 0; i < hosts.count(); i++) - rc_allowed_hosts << hosts.at(i); + rc_allowed_hosts = hosts; } diff --git a/src/applications/gqrx/remote_control.h b/src/applications/gqrx/remote_control.h index 8f6e715..0e8233a 100644 --- a/src/applications/gqrx/remote_control.h +++ b/src/applications/gqrx/remote_control.h @@ -31,7 +31,6 @@ #include #include - /*! \brief Simple TCP server for remote control. * * The TCP interface is compatible with the hamlib rigtctld so that applications diff --git a/src/applications/gqrx/remote_control_settings.ui b/src/applications/gqrx/remote_control_settings.ui index de77235..7e545dc 100644 --- a/src/applications/gqrx/remote_control_settings.ui +++ b/src/applications/gqrx/remote_control_settings.ui @@ -86,14 +86,6 @@ - QListView::Fixed - -
- -::ffff:127.0.0.1 -- -ItemIsSelectable|ItemIsEditable|ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled -- From 6520a22cf26ad25eeededa9a6a25e6a8248138f5 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov
+Date: Thu, 6 Oct 2016 09:29:44 +0400 Subject: [PATCH 147/334] Implement 'M ?' in the remote control interface. --- resources/remote-control.txt | 3 ++- src/applications/gqrx/remote_control.cpp | 28 ++++++++++++++---------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/resources/remote-control.txt b/resources/remote-control.txt index 8b2ebdc..a07532d 100644 --- a/resources/remote-control.txt +++ b/resources/remote-control.txt @@ -4,7 +4,8 @@ Supported commands: f - Get frequency [Hz] F - Set frequency [Hz] m - Get demodulator mode - M - Set demodulator mode (OFF, RAW, AM, FM, WFM, WFM_ST, WFM_ST_OIRT, LSB, USB, CW, CWL, CWU) + M - Set demodulator mode. Passing a '?' as the first argument instead of 'mode' + will return a space separated list of radio backend supported modes. l STRENGTH - Get signal strength [dBFS] l SQL - Get squelch threshold [dBFS] L SQL - Set squelch threshold to [dBFS] diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index c942f14..e3759ed 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -254,21 +254,27 @@ void RemoteControl::startRead() // Mode and filter else if (cmdlist[0] == "M") { - int mode = modeStrToInt(cmdlist.value(1, "")); - if (mode == -1) - { - // invalid string - rc_socket->write("RPRT 1\n"); - } + QString cmd_arg = cmdlist.value(1, ""); + if (cmd_arg == "?") + rc_socket->write("OFF RAW AM FM WFM WFM_ST WFM_ST_OIRT LSB USB CW CWL CWU\n"); else { - rc_socket->write("RPRT 0\n"); - rc_mode = mode; + int mode = modeStrToInt(cmd_arg); + if (mode == -1) + { + // invalid string + rc_socket->write("RPRT 1\n"); + } + else + { + rc_socket->write("RPRT 0\n"); + rc_mode = mode; - if (rc_mode == 0) - audio_recorder_status = false; + if (rc_mode == 0) + audio_recorder_status = false; - emit newMode(rc_mode); + emit newMode(rc_mode); + } } } else if (cmdlist[0] == "m") From b441cb3b9029712b5a5db272fb8f5ce5b3b9b190 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Mon, 10 Oct 2016 06:57:05 +0400 Subject: [PATCH 148/334] Reformat remote control help text --- resources/remote-control.txt | 48 ++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/resources/remote-control.txt b/resources/remote-control.txt index a07532d..2012a20 100644 --- a/resources/remote-control.txt +++ b/resources/remote-control.txt @@ -1,22 +1,38 @@ Remote control protocol. Supported commands: - f - Get frequency [Hz] - F - Set frequency [Hz] - m - Get demodulator mode - M - Set demodulator mode. Passing a '?' as the first argument instead of 'mode' - will return a space separated list of radio backend supported modes. - l STRENGTH - Get signal strength [dBFS] - l SQL - Get squelch threshold [dBFS] - L SQL - Set squelch threshold to [dBFS] - u RECORD - Get status of audio recorder - U RECORD - Set status of audio recorder to - c - Close connection - AOS - Acquisition of signal (AOS) event, start audio recording - LOS - Loss of signal (LOS) event, stop audio recording - \dump_state - Dump state (only usable for compatibility) + f + Get frequency [Hz] + F + Set frequency [Hz] + m + Get demodulator mode + M + Set demodulator mode + Passing a '?' as the first argument instead of 'mode' will return + a space separated list of radio backend supported modes. + l STRENGTH + Get signal strength [dBFS] + l SQL + Get squelch threshold [dBFS] + L SQL + Set squelch threshold to [dBFS] + u RECORD + Get status of audio recorder + U RECORD + Set status of audio recorder to + c + Close connection + AOS + Acquisition of signal (AOS) event, start audio recording + LOS + Loss of signal (LOS) event, stop audio recording + \dump_state + Dump state (only usable for compatibility) Reply: - RPRT 0 - Command successful - RPRT 1 - Command failed + RPRT 0 + Command successful + RPRT 1 + Command failed From 9a574d05a47fef83f4d87db288434cf2aff7c550 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Mon, 10 Oct 2016 09:01:37 +0400 Subject: [PATCH 149/334] Remove duplicate code ui->plotter->setHiLowCutFrequencies is also called from on_plotter_newFilterFreq(). --- src/applications/gqrx/mainwindow.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 3107bb1..3413011 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -2054,7 +2054,6 @@ void MainWindow::onBookmarkActivated(qint64 freq, QString demod, int bandwidth) } on_plotter_newFilterFreq(lo, hi); - ui->plotter->setHiLowCutFrequencies(lo, hi); } /** Launch Gqrx google group website. */ From 398036d4c611931d0fd7909a9fc898cafd23f472 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Tue, 11 Oct 2016 08:18:14 +0400 Subject: [PATCH 150/334] Remote control: use a hamlib command 'q|Q' to close connection. The 'c' command is get 'CTCSS Tone' as say manual. --- resources/remote-control.txt | 2 +- src/applications/gqrx/remote_control.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/remote-control.txt b/resources/remote-control.txt index 2012a20..c956a0a 100644 --- a/resources/remote-control.txt +++ b/resources/remote-control.txt @@ -21,7 +21,7 @@ Supported commands: Get status of audio recorder U RECORD Set status of audio recorder to - c + q|Q Close connection AOS Acquisition of signal (AOS) event, start audio recording diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index e3759ed..b5c3a3b 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -206,7 +206,7 @@ void RemoteControl::startRead() { rc_socket->write(QString("%1\n").arg(rc_freq).toLatin1()); } - else if (cmdlist[0] == "c") + else if (cmdlist[0] == "q" || cmdlist[0] == "Q") { // FIXME: for now we assume 'close' command rc_socket->close(); From 1b43d33754b63aaf409090d26751719903c4d63a Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Wed, 12 Oct 2016 06:55:59 +0400 Subject: [PATCH 151/334] Added a compatibility mode with hamlib specification in remote control. --- src/applications/gqrx/remote_control.cpp | 15 ++++++++++++--- src/applications/gqrx/remote_control.h | 2 ++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index b5c3a3b..e2a4645 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -42,6 +42,7 @@ RemoteControl::RemoteControl(QObject *parent) : squelch_level = -150.0; audio_recorder_status = false; receiver_running = false; + hamlib_compatible = false; rc_port = DEFAULT_RC_PORT; rc_allowed_hosts.append(DEFAULT_RC_ALLOWED_HOSTS); @@ -256,7 +257,7 @@ void RemoteControl::startRead() { QString cmd_arg = cmdlist.value(1, ""); if (cmd_arg == "?") - rc_socket->write("OFF RAW AM FM WFM WFM_ST WFM_ST_OIRT LSB USB CW CWL CWU\n"); + rc_socket->write("OFF RAW AM FM WFM WFM_ST WFM_ST_OIRT LSB USB CW CWL CWR CWU\n"); else { int mode = modeStrToInt(cmd_arg); @@ -524,14 +525,22 @@ int RemoteControl::modeStrToInt(QString mode_str) else if (mode_str.compare("CW", Qt::CaseInsensitive) == 0) { mode_int = 8; + hamlib_compatible = true; } else if (mode_str.compare("CWL", Qt::CaseInsensitive) == 0) { mode_int = 8; + hamlib_compatible = false; + } + else if (mode_str.compare("CWR", Qt::CaseInsensitive) == 0) + { + mode_int = 9; + hamlib_compatible = true; } else if (mode_str.compare("CWU", Qt::CaseInsensitive) == 0) { mode_int = 9; + hamlib_compatible = false; } else if (mode_str.compare("WFM_ST_OIRT", Qt::CaseInsensitive) == 0) { @@ -584,11 +593,11 @@ QString RemoteControl::intToModeStr(int mode) break; case 8: - mode_str = "CWL"; + mode_str = (hamlib_compatible) ? "CW" : "CWL"; break; case 9: - mode_str = "CWU"; + mode_str = (hamlib_compatible) ? "CWR" : "CWU"; break; case 10: diff --git a/src/applications/gqrx/remote_control.h b/src/applications/gqrx/remote_control.h index 0e8233a..910c680 100644 --- a/src/applications/gqrx/remote_control.h +++ b/src/applications/gqrx/remote_control.h @@ -121,6 +121,8 @@ private slots: void setNewRemoteFreq(qint64 freq); int modeStrToInt(QString mode_str); QString intToModeStr(int mode); + + bool hamlib_compatible; }; #endif // REMOTE_CONTROL_H From 38f06530b58a6cdf7976cb13cdaba4d6f7c6309a Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Mon, 10 Oct 2016 08:34:42 +0400 Subject: [PATCH 152/334] Add passband parameter to 'M/m' remote command Fixes #218. --- resources/remote-control.txt | 6 ++--- src/applications/gqrx/mainwindow.cpp | 32 ++++++++++++++++++++++++ src/applications/gqrx/mainwindow.h | 1 + src/applications/gqrx/remote_control.cpp | 20 ++++++++++++--- src/applications/gqrx/remote_control.h | 4 +++ 5 files changed, 57 insertions(+), 6 deletions(-) diff --git a/resources/remote-control.txt b/resources/remote-control.txt index c956a0a..e8dae22 100644 --- a/resources/remote-control.txt +++ b/resources/remote-control.txt @@ -6,9 +6,9 @@ Supported commands: F Set frequency [Hz] m - Get demodulator mode - M - Set demodulator mode + Get demodulator mode and passband + M [passband] + Set demodulator mode and passband [Hz] Passing a '?' as the first argument instead of 'mode' will return a space separated list of radio backend supported modes. l STRENGTH diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 3413011..2fda764 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -267,6 +267,8 @@ MainWindow::MainWindow(const QString cfgfile, bool edit_conf, QWidget *parent) : connect(uiDockRxOpt, SIGNAL(sqlLevelChanged(double)), remote, SLOT(setSquelchLevel(double))); connect(remote, SIGNAL(startAudioRecorderEvent()), uiDockAudio, SLOT(startAudioRecorder())); connect(remote, SIGNAL(stopAudioRecorderEvent()), uiDockAudio, SLOT(stopAudioRecorder())); + connect(ui->plotter, SIGNAL(newFilterFreq(int, int)), remote, SLOT(setPassband(int, int))); + connect(remote, SIGNAL(newPassband(int)), this, SLOT(setPassband(int))); rds_timer = new QTimer(this); connect(rds_timer, SIGNAL(timeout()), this, SLOT(rdsTimeout())); @@ -1070,6 +1072,8 @@ void MainWindow::selectDemod(int mode_idx) rx->set_cw_offset(cwofs); rx->set_sql_level(uiDockRxOpt->currentSquelchLevel()); + remote->setPassband(flo, fhi); + d_have_audio = (mode_idx != DockRxOpt::MODE_OFF); uiDockRxOpt->setCurrentDemod(mode_idx); @@ -2056,6 +2060,34 @@ void MainWindow::onBookmarkActivated(qint64 freq, QString demod, int bandwidth) on_plotter_newFilterFreq(lo, hi); } +void MainWindow::setPassband(int bandwidth) +{ + /* Check if filter is symmetric or not by checking the presets */ + int mode = uiDockRxOpt->currentDemod(); + int preset = uiDockRxOpt->currentFilterShape(); + + int lo, hi; + uiDockRxOpt->getFilterPreset(mode, preset, &lo, &hi); + + if(lo + hi == 0) + { + lo = -bandwidth / 2; + hi = bandwidth / 2; + } + else if(lo >= 0 && hi >= 0) + { + hi = lo + bandwidth; + } + else if(lo <= 0 && hi <= 0) + { + lo = hi - bandwidth; + } + + remote->setPassband(lo, hi); + + on_plotter_newFilterFreq(lo, hi); +} + /** Launch Gqrx google group website. */ void MainWindow::on_actionUserGroup_triggered() { diff --git a/src/applications/gqrx/mainwindow.h b/src/applications/gqrx/mainwindow.h index 1b1e4e2..01b23b0 100644 --- a/src/applications/gqrx/mainwindow.h +++ b/src/applications/gqrx/mainwindow.h @@ -155,6 +155,7 @@ private slots: void setSqlLevel(double level_db); double setSqlLevelAuto(); void setAudioGain(float gain); + void setPassband(int bandwidth); /* audio recording and playback */ void startAudioRec(const QString filename); diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index e2a4645..a5731f2 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -268,19 +268,26 @@ void RemoteControl::startRead() } else { - rc_socket->write("RPRT 0\n"); rc_mode = mode; + emit newMode(rc_mode); + + int passband = cmdlist.value(2, "0").toInt(); + if ( passband != 0 ) + emit newPassband(passband); if (rc_mode == 0) audio_recorder_status = false; - emit newMode(rc_mode); + rc_socket->write("RPRT 0\n"); } } } else if (cmdlist[0] == "m") { - rc_socket->write(QString("%1\n").arg(intToModeStr(rc_mode)).toLatin1()); + QString msg = QString("%1 %2\n") + .arg(intToModeStr(rc_mode)) + .arg(rc_passband_hi - rc_passband_lo); + rc_socket->write(msg.toLatin1()); } else if (cmdlist[0] == "U") { @@ -429,6 +436,13 @@ void RemoteControl::setMode(int mode) audio_recorder_status = false; } +/*! \brief Set passband (from mainwindow). */ +void RemoteControl::setPassband(int passband_lo, int passband_hi) +{ + rc_passband_lo = passband_lo; + rc_passband_hi = passband_hi; +} + /*! \brief New remote frequency received. */ void RemoteControl::setNewRemoteFreq(qint64 freq) { diff --git a/src/applications/gqrx/remote_control.h b/src/applications/gqrx/remote_control.h index 910c680..d82eefd 100644 --- a/src/applications/gqrx/remote_control.h +++ b/src/applications/gqrx/remote_control.h @@ -85,6 +85,7 @@ public slots: void setBandwidth(qint64 bw); void setSignalLevel(float level); void setMode(int mode); + void setPassband(int passband_lo, int passband_hi); void setSquelchLevel(double level); void startAudioRecorder(QString unused); void stopAudioRecorder(); @@ -93,6 +94,7 @@ public slots: void newFrequency(qint64 freq); void newFilterOffset(qint64 offset); void newMode(int mode); + void newPassband(int passband); void newSquelchLevel(double level); void startAudioRecorderEvent(); void stopAudioRecorderEvent(); @@ -113,6 +115,8 @@ private slots: qint64 bw_half; int rc_mode; /*!< Current mode. */ + int rc_passband_lo; /*!< Current low cutoff. */ + int rc_passband_hi; /*!< Current high cutoff. */ float signal_level; /*!< Signal level in dBFS */ double squelch_level; /*!< Squelch level in dBFS */ bool audio_recorder_status; /*!< Recording enabled */ From 66dfaf605fccc9ccfbcf5da8bdbad7372f12be44 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Mon, 10 Oct 2016 08:54:36 +0400 Subject: [PATCH 153/334] Avoid setting filter offset to 0 when HW freq is changed Setting filter offset to 0 should be avoided because: 1. Central frequency may be contain DC spike. 2. In some cases we have to set HW frequency when it can be avoided. --- src/applications/gqrx/remote_control.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index a5731f2..9aaf41d 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -448,18 +448,22 @@ void RemoteControl::setNewRemoteFreq(qint64 freq) { qint64 delta = freq - rc_freq; - if (std::abs(rc_filter_offset + delta) < bw_half) + rc_filter_offset += delta; + if (((rc_filter_offset > 0) && ((rc_filter_offset + rc_passband_hi) < bw_half)) + || ((rc_filter_offset < 0) && ((rc_filter_offset + rc_passband_lo) > -bw_half))) { // move filter offset - rc_filter_offset += delta; emit newFilterOffset(rc_filter_offset); } else { // move rx freqeucy and let MainWindow deal with it // (will usually change hardware PLL) - // reset the filter_offset, otherwise the MainWindo will preserve it - rc_filter_offset = 0; + // reset the filter_offset, otherwise the MainWindow will preserve it + if (rc_filter_offset < 0) + rc_filter_offset = bw_half - rc_passband_hi; + else + rc_filter_offset = -bw_half - rc_passband_lo; emit newFilterOffset(rc_filter_offset); emit newFrequency(freq); } From 734550d30a6f9a4e2ea87d0779747aa2882c6ef0 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Mon, 10 Oct 2016 08:43:02 +0400 Subject: [PATCH 154/334] Set remote mode in selectDemod() Fixes #433. --- src/applications/gqrx/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 2fda764..6d265e7 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -1072,6 +1072,7 @@ void MainWindow::selectDemod(int mode_idx) rx->set_cw_offset(cwofs); rx->set_sql_level(uiDockRxOpt->currentSquelchLevel()); + remote->setMode(mode_idx); remote->setPassband(flo, fhi); d_have_audio = (mode_idx != DockRxOpt::MODE_OFF); From d2ca23fbfc0380bfc375e74b85c44af5dd70ce13 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Wed, 19 Oct 2016 23:30:53 +0200 Subject: [PATCH 155/334] Update news.txt --- resources/news.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/news.txt b/resources/news.txt index a1e9eea..8fdba76 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -1,7 +1,9 @@ 2.7: TBD... NEW: Save remote control state between sessions. + NEW: Support for passband when setting mode through remote. FIXED: Keep waterfall zoom level and zoom slider synchronised. + IMPROVED: Tuning through the remote control interface. 2.6: Released October 3, 2016 From 4415307f0d66063ee7e0489420c82cdc30ff5adf Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Thu, 20 Oct 2016 07:07:54 +0400 Subject: [PATCH 156/334] Kept the RDS status if mode WFM. Fixes #310. --- src/applications/gqrx/mainwindow.cpp | 7 +++++-- src/qtgui/dockrds.cpp | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 6d265e7..e48954e 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -937,6 +937,7 @@ void MainWindow::selectDemod(int mode_idx) float maxdev; int filter_preset = uiDockRxOpt->currentFilter(); int flo=0, fhi=0, click_res=100; + bool rds_enabled; // validate mode_idx if (mode_idx < DockRxOpt::MODE_OFF || mode_idx >= DockRxOpt::MODE_LAST) @@ -949,9 +950,9 @@ void MainWindow::selectDemod(int mode_idx) uiDockRxOpt->getFilterPreset(mode_idx, filter_preset, &flo, &fhi); d_filter_shape = (receiver::filter_shape)uiDockRxOpt->currentFilterShape(); - if (rx->is_rds_decoder_active()) + rds_enabled = rx->is_rds_decoder_active(); + if (rds_enabled) setRdsDecoder(false); - uiDockRDS->setDisabled(); switch (mode_idx) { @@ -1020,6 +1021,8 @@ void MainWindow::selectDemod(int mode_idx) rx->set_demod(receiver::RX_DEMOD_WFM_S); uiDockRDS->setEnabled(); + if (rds_enabled) + setRdsDecoder(true); break; case DockRxOpt::MODE_LSB: diff --git a/src/qtgui/dockrds.cpp b/src/qtgui/dockrds.cpp index aacbe0c..797c02a 100644 --- a/src/qtgui/dockrds.cpp +++ b/src/qtgui/dockrds.cpp @@ -95,6 +95,20 @@ void DockRDS::updateRDS(QString text, int type) void DockRDS::showEnabled() { + ui->program_information->setText(""); + ui->station_name->setText(""); + ui->program_type->setText(""); + ui->flags->setText(""); + ui->radiotext->setText(""); + ui->clocktime->setText(""); + ui->alt_freq->setText(""); + + if (!ui->rdsCheckbox->isChecked()) + { + ui->rdsCheckbox->blockSignals(true); + ui->rdsCheckbox->setChecked(true); + ui->rdsCheckbox->blockSignals(false); + } } void DockRDS::showDisabled() From e0de0da4a0b57b8074c20e4c899dee8d51c1e8e0 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Thu, 20 Oct 2016 09:29:29 +0400 Subject: [PATCH 157/334] Remove duplicate code. --- src/qtgui/dockrds.cpp | 14 ++++++-------- src/qtgui/dockrds.h | 1 + 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/qtgui/dockrds.cpp b/src/qtgui/dockrds.cpp index 797c02a..1751bb8 100644 --- a/src/qtgui/dockrds.cpp +++ b/src/qtgui/dockrds.cpp @@ -93,7 +93,7 @@ void DockRDS::updateRDS(QString text, int type) } } -void DockRDS::showEnabled() +void DockRDS::ClearTextFields() { ui->program_information->setText(""); ui->station_name->setText(""); @@ -102,7 +102,11 @@ void DockRDS::showEnabled() ui->radiotext->setText(""); ui->clocktime->setText(""); ui->alt_freq->setText(""); +} +void DockRDS::showEnabled() +{ + ClearTextFields(); if (!ui->rdsCheckbox->isChecked()) { ui->rdsCheckbox->blockSignals(true); @@ -113,13 +117,7 @@ void DockRDS::showEnabled() void DockRDS::showDisabled() { - ui->program_information->setText(""); - ui->station_name->setText(""); - ui->program_type->setText(""); - ui->flags->setText(""); - ui->radiotext->setText(""); - ui->clocktime->setText(""); - ui->alt_freq->setText(""); + ClearTextFields(); } void DockRDS::setDisabled() diff --git a/src/qtgui/dockrds.h b/src/qtgui/dockrds.h index fc67c70..b06f7ee 100644 --- a/src/qtgui/dockrds.h +++ b/src/qtgui/dockrds.h @@ -24,6 +24,7 @@ public slots: void setDisabled(); private: + void ClearTextFields(); signals: void rdsDecoderToggled(bool); From 9bdbaf0e216371a14b5cc3aaa22dac6d435079a5 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 23 Oct 2016 13:17:28 +0200 Subject: [PATCH 158/334] Update news.txt --- resources/news.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/news.txt b/resources/news.txt index 8fdba76..4ef2686 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -3,6 +3,7 @@ NEW: Save remote control state between sessions. NEW: Support for passband when setting mode through remote. FIXED: Keep waterfall zoom level and zoom slider synchronised. + FIXED: RDS status is not kept while jumping through bookmark, IMPROVED: Tuning through the remote control interface. From debc33a8ea5b87ee910a7101deeb434ea10e7793 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 23 Oct 2016 13:17:55 +0200 Subject: [PATCH 159/334] Fix typo in news.txt --- resources/news.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/news.txt b/resources/news.txt index 4ef2686..a21597e 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -3,7 +3,7 @@ NEW: Save remote control state between sessions. NEW: Support for passband when setting mode through remote. FIXED: Keep waterfall zoom level and zoom slider synchronised. - FIXED: RDS status is not kept while jumping through bookmark, + FIXED: RDS status is not kept while jumping through bookmark. IMPROVED: Tuning through the remote control interface. From e6baaee4968345a53e977f593362267a91041cff Mon Sep 17 00:00:00 2001 From: Valentin Ochs Date: Fri, 21 Oct 2016 20:12:50 +0200 Subject: [PATCH 160/334] Cosmetic & readability changes --- src/qtgui/plotter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qtgui/plotter.cpp b/src/qtgui/plotter.cpp index e491632..b877546 100644 --- a/src/qtgui/plotter.cpp +++ b/src/qtgui/plotter.cpp @@ -1336,8 +1336,11 @@ void CPlotter::drawOverlay() #endif int level = 0; - for (; level < nLevels && tagEnd[level] > x; level++); - level %= nLevels; + while(level < nLevels && tagEnd[level] > x) + level++; + + if(level == nLevels) + level = 0; tagEnd[level] = x + nameWidth + slant - 1; m_BookmarkTags.append(qMakePair (QRect(x, level * levelHeight, nameWidth + slant, fontHeight), bookmarks[i].frequency)); From d803ac646b78d9cce8dcbf6325e5f02c3216cd23 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Mon, 24 Oct 2016 09:08:48 +0400 Subject: [PATCH 161/334] The 'm' command must returns a passband on new line. Fixes: 38f0653 (Add passband parameter to 'M/m' remote command) --- src/applications/gqrx/remote_control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index 9aaf41d..863f120 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -284,7 +284,7 @@ void RemoteControl::startRead() } else if (cmdlist[0] == "m") { - QString msg = QString("%1 %2\n") + QString msg = QString("%1\n%2\n") .arg(intToModeStr(rc_mode)) .arg(rc_passband_hi - rc_passband_lo); rc_socket->write(msg.toLatin1()); From 64e35a30d711eeac69774548d61b55346323e88f Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Tue, 25 Oct 2016 10:14:01 +0400 Subject: [PATCH 162/334] Improved '\dump_state' command. The hamlib uses '\dump_state' to determine the capabilities of the clients. These changes are necessary for the correct work of hamlib stuff such as rigctl, fldigi and etc. Fixes: 5e28ad0 (Add (fake) support for dump_state remote control command.) --- src/applications/gqrx/remote_control.cpp | 108 +++++++++++++++++------ src/applications/gqrx/remote_control.h | 4 +- 2 files changed, 83 insertions(+), 29 deletions(-) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index 863f120..efae7ca 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -357,36 +357,10 @@ void RemoteControl::startRead() rc_socket->write("RPRT 0\n"); } - - /* dump_state used by some clients, e.g. xdx - * For now just some quick hack that works taken from - * https://github.com/hexameron/rtl-sdrangelove/blob/master/plugins/channel/tcpsrc/rigctl.cpp - * - * More info in tests/rigctl_parse.c - */ else if (cmdlist[0] == "\\dump_state") { - rc_socket->write("0\n" - "2\n" - "1\n" - "150000.000000 30000000.000000 0x900af -1 -1 0x10000003 0x3\n" - "0 0 0 0 0 0 0\n" - "150000.000000 30000000.000000 0x900af -1 -1 0x10000003 0x3\n" - "0 0 0 0 0 0 0\n" - "0 0\n" - "0 0\n" - "0\n" - "0\n" - "0\n" - "0\n" - "\n" - "\n" - "0x0\n" - "0x0\n" - "0x0\n" - "0x0\n" - "0x0\n" - "0\n"); + QString answer = cmd_dump_state(); + rc_socket->write(answer.toLatin1()); } else @@ -629,3 +603,81 @@ QString RemoteControl::intToModeStr(int mode) return mode_str; } + +/* + * '\dump_state' used by hamlib clients, e.g. xdx, fldigi, rigctl and etc + * More info: + * https://github.com/N0NB/hamlib/blob/master/include/hamlib/rig.h (bit fields) + * https://github.com/N0NB/hamlib/blob/master/dummy/netrigctl.c + */ +QString RemoteControl::cmd_dump_state() +{ + return QString( + /* rigctl protocol version */ + "0\n" + /* rigctl model */ + "2\n" + /* ITU region */ + "1\n" + /* RX/TX frequency ranges + * start, end, modes, low_power, high_power, vfo, ant + * start/end - Start/End frequency [Hz] + * modes - Bit field of RIG_MODE's (AM|CW|CWR|USB|LSB|FM|WFM) + * low_power/high_power - Lower/Higher RF power in mW, + * -1 for no power (ie. rx list) + * vfo - VFO list equipped with this range (RIG_VFO_A) + * ant - Antenna list equipped with this range, 0 means all + * FIXME: limits can be gets from receiver::get_rf_range() + */ + "0.000000 10000000000.000000 0xef -1 -1 0x1 0x0\n" + /* End of RX frequency ranges. */ + "0 0 0 0 0 0 0\n" + /* End of TX frequency ranges. The Gqrx is reciver only. */ + "0 0 0 0 0 0 0\n" + /* Tuning steps: modes, tuning_step */ + "0xef 1\n" + "0xef 0\n" + /* End of tuning steps */ + "0 0\n" + /* Filter sizes: modes, width + * FIXME: filter can be gets from filter_preset_table + */ + "0x82 500\n" /* CW | CWR normal */ + "0x82 200\n" /* CW | CWR narrow */ + "0x82 2000\n" /* CW | CWR wide */ + "0x21 10000\n" /* AM | FM normal */ + "0x21 5000\n" /* AM | FM narrow */ + "0x21 20000\n" /* AM | FM wide */ + "0x0c 2700\n" /* SSB normal */ + "0x0c 1400\n" /* SSB narrow */ + "0x0c 3900\n" /* SSB wide */ + "0x40 160000\n" /* WFM normal */ + "0x40 120000\n" /* WFM narrow */ + "0x40 200000\n" /* WFM wide */ + /* End of filter sizes */ + "0 0\n" + /* max_rit */ + "0\n" + /* max_xit */ + "0\n" + /* max_ifshift */ + "0\n" + /* Announces (bit field list) */ + "0\n" /* RIG_ANN_NONE */ + /* Preamp list in dB, 0 terminated */ + "0\n" + /* Attenuator list in dB, 0 terminated */ + "0\n" + /* Bit field list of get functions */ + "0\n" /* RIG_FUNC_NONE */ + /* Bit field list of set functions */ + "0\n" /* RIG_FUNC_NONE */ + /* Bit field list of get level */ + "0x40000020\n" /* RIG_LEVEL_SQL | RIG_LEVEL_STRENGTH */ + /* Bit field list of set level */ + "0x20\n" /* RIG_LEVEL_SQL */ + /* Bit field list of get parm */ + "0\n" /* RIG_PARM_NONE */ + /* Bit field list of set parm */ + "0\n" /* RIG_PARM_NONE */); +} diff --git a/src/applications/gqrx/remote_control.h b/src/applications/gqrx/remote_control.h index d82eefd..d482a2b 100644 --- a/src/applications/gqrx/remote_control.h +++ b/src/applications/gqrx/remote_control.h @@ -121,12 +121,14 @@ private slots: double squelch_level; /*!< Squelch level in dBFS */ bool audio_recorder_status; /*!< Recording enabled */ bool receiver_running; /*!< Wether the receiver is running or not */ + bool hamlib_compatible; void setNewRemoteFreq(qint64 freq); int modeStrToInt(QString mode_str); QString intToModeStr(int mode); - bool hamlib_compatible; + /* RC commands */ + QString cmd_dump_state(); }; #endif // REMOTE_CONTROL_H From 13970fcc1a613c3a328896a1e72dc8753b1d15f0 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Fri, 28 Oct 2016 07:51:05 +0400 Subject: [PATCH 163/334] Refactoring RemoteControl::startRead(). This function is very large and unclean. Now one command - one function. --- src/applications/gqrx/remote_control.cpp | 389 +++++++++++++---------- src/applications/gqrx/remote_control.h | 10 + 2 files changed, 223 insertions(+), 176 deletions(-) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index efae7ca..68986f7 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -176,8 +176,7 @@ void RemoteControl::startRead() { char buffer[1024] = {0}; int bytes_read; - - bool ok = true; + QString answer = ""; bytes_read = rc_socket->readLine(buffer, 1024); if (bytes_read < 2) // command + '\n' @@ -188,188 +187,43 @@ void RemoteControl::startRead() if (cmdlist.size() == 0) return; - // Set new frequency - if (cmdlist[0] == "F") - { - double freq = cmdlist.value(1, "ERR").toDouble(&ok); - if (ok) - { - setNewRemoteFreq((qint64)freq); - rc_socket->write("RPRT 0\n"); - } - else - { - rc_socket->write("RPRT 1\n"); - } - } - // Get frequency - else if (cmdlist[0] == "f") - { - rc_socket->write(QString("%1\n").arg(rc_freq).toLatin1()); - } - else if (cmdlist[0] == "q" || cmdlist[0] == "Q") + QString cmd = cmdlist[0]; + if (cmd == "f") + answer = cmd_get_freq(); + else if (cmd == "F") + answer = cmd_set_freq(cmdlist); + else if (cmd == "m") + answer = cmd_get_mode(); + else if (cmd == "M") + answer = cmd_set_mode(cmdlist); + else if (cmd == "l") + answer = cmd_get_level(cmdlist); + else if (cmd == "L") + answer = cmd_set_level(cmdlist); + else if (cmd == "u") + answer = cmd_get_func(cmdlist); + else if (cmd == "U") + answer = cmd_set_func(cmdlist); + else if (cmd == "AOS") + answer = cmd_AOS(); + else if (cmd == "LOS") + answer = cmd_LOS(); + else if (cmd == "\\dump_state") + answer = cmd_dump_state(); + else if (cmd == "q" || cmd == "Q") { // FIXME: for now we assume 'close' command rc_socket->close(); + return; } - // Set level - else if (cmdlist[0] == "L") - { - QString lvl = cmdlist.value(1, ""); - if (lvl == "?") - { - rc_socket->write("SQL\n"); - } - else if (lvl.compare("SQL", Qt::CaseInsensitive) == 0) - { - double squelch = cmdlist.value(2, "ERR").toDouble(&ok); - if (ok) - { - rc_socket->write("RPRT 0\n"); - squelch_level = std::max (-150, std::min (0, squelch)); - emit newSquelchLevel(squelch_level); - } - else - { - rc_socket->write("RPRT 1\n"); - } - } - else - { - rc_socket->write("RPRT 1\n"); - } - } - // Get level - else if (cmdlist[0] == "l") - { - QString lvl = cmdlist.value(1, ""); - if (lvl == "?") - rc_socket->write("SQL STRENGTH\n"); - else if (lvl.compare("STRENGTH", Qt::CaseInsensitive) == 0 || lvl.isEmpty()) - rc_socket->write(QString("%1\n").arg(signal_level, 0, 'f', 1).toLatin1()); - else if (lvl.compare("SQL", Qt::CaseInsensitive) == 0) - rc_socket->write(QString("%1\n").arg(squelch_level, 0, 'f', 1).toLatin1()); - else - rc_socket->write("RPRT 1\n"); - } - // Mode and filter - else if (cmdlist[0] == "M") - { - QString cmd_arg = cmdlist.value(1, ""); - if (cmd_arg == "?") - rc_socket->write("OFF RAW AM FM WFM WFM_ST WFM_ST_OIRT LSB USB CW CWL CWR CWU\n"); - else - { - int mode = modeStrToInt(cmd_arg); - if (mode == -1) - { - // invalid string - rc_socket->write("RPRT 1\n"); - } - else - { - rc_mode = mode; - emit newMode(rc_mode); - - int passband = cmdlist.value(2, "0").toInt(); - if ( passband != 0 ) - emit newPassband(passband); - - if (rc_mode == 0) - audio_recorder_status = false; - - rc_socket->write("RPRT 0\n"); - } - } - } - else if (cmdlist[0] == "m") - { - QString msg = QString("%1\n%2\n") - .arg(intToModeStr(rc_mode)) - .arg(rc_passband_hi - rc_passband_lo); - rc_socket->write(msg.toLatin1()); - } - else if (cmdlist[0] == "U") - { - QString func = cmdlist.value(1, ""); - bool ok; - int status = cmdlist.value(2, "").toInt(&ok); - - if (func == "?") - { - rc_socket->write("RECORD\n"); - } - else if (func == "" || !ok) - { - rc_socket->write("RPRT 1\n"); - } - else if (func.compare("RECORD", Qt::CaseInsensitive) == 0) - { - if (rc_mode == 0 || !receiver_running) - { - rc_socket->write("RPRT 1\n"); - } - else - { - rc_socket->write("RPRT 0\n"); - audio_recorder_status = status; - if (status) - emit startAudioRecorderEvent(); - else - emit stopAudioRecorderEvent(); - } - } - else - { - rc_socket->write("RPRT 1\n"); - } - } - else if (cmdlist[0] == "u") - { - QString func = cmdlist.value(1, ""); - - if (func == "?") - rc_socket->write("RECORD\n"); - else if (func.compare("RECORD", Qt::CaseInsensitive) == 0) - rc_socket->write(QString("%1\n").arg(audio_recorder_status).toLatin1()); - else - rc_socket->write("RPRT 1\n"); - } - - - // Gpredict / Gqrx specific commands: - // AOS - satellite AOS event - // LOS - satellite LOS event - else if (cmdlist[0] == "AOS") - { - if (rc_mode > 0 && receiver_running) - { - emit startAudioRecorderEvent(); - audio_recorder_status = true; - } - rc_socket->write("RPRT 0\n"); - - } - else if (cmdlist[0] == "LOS") - { - emit stopAudioRecorderEvent(); - audio_recorder_status = false; - rc_socket->write("RPRT 0\n"); - - } - else if (cmdlist[0] == "\\dump_state") - { - QString answer = cmd_dump_state(); - rc_socket->write(answer.toLatin1()); - } - else { // print unknown command and respond with an error - qWarning() << "Unknown remote command:" - << cmdlist; - rc_socket->write("RPRT 1\n"); + qWarning() << "Unknown remote command:" << cmdlist; + answer = QString("RPRT 1\n"); } + + rc_socket->write(answer.toLatin1()); } /*! \brief Slot called when the receiver is tuned to a new frequency. @@ -604,6 +458,189 @@ QString RemoteControl::intToModeStr(int mode) return mode_str; } +/* Get frequency */ +QString RemoteControl::cmd_get_freq() +{ + return QString("%1\n").arg(rc_freq); +} + +/* Set new frequency */ +QString RemoteControl::cmd_set_freq(QStringList cmdlist) +{ + bool ok; + double freq = cmdlist.value(1, "ERR").toDouble(&ok); + + if (ok) + { + setNewRemoteFreq((qint64)freq); + return QString("RPRT 0\n"); + } + + return QString("RPRT 1\n"); +} + +/* Get mode and passband */ +QString RemoteControl::cmd_get_mode() +{ + return QString("%1\n%2\n") + .arg(intToModeStr(rc_mode)) + .arg(rc_passband_hi - rc_passband_lo); +} + +/* Set mode and passband */ +QString RemoteControl::cmd_set_mode(QStringList cmdlist) +{ + QString answer; + QString cmd_arg = cmdlist.value(1, ""); + + if (cmd_arg == "?") + answer = QString("OFF RAW AM FM WFM WFM_ST WFM_ST_OIRT LSB USB CW CWL CWR CWU\n"); + else + { + int mode = modeStrToInt(cmd_arg); + if (mode == -1) + { + // invalid mode string + answer = QString("RPRT 1\n"); + } + else + { + rc_mode = mode; + emit newMode(rc_mode); + + int passband = cmdlist.value(2, "0").toInt(); + if ( passband != 0 ) + emit newPassband(passband); + + if (rc_mode == 0) + audio_recorder_status = false; + + answer = QString("RPRT 0\n"); + } + } + return answer; +} + +/* Get level */ +QString RemoteControl::cmd_get_level(QStringList cmdlist) +{ + QString answer; + QString lvl = cmdlist.value(1, ""); + + if (lvl == "?") + answer = QString("SQL STRENGTH\n"); + else if (lvl.compare("STRENGTH", Qt::CaseInsensitive) == 0 || lvl.isEmpty()) + answer = QString("%1\n").arg(signal_level, 0, 'f', 1); + else if (lvl.compare("SQL", Qt::CaseInsensitive) == 0) + answer = QString("%1\n").arg(squelch_level, 0, 'f', 1); + else + answer = QString("RPRT 1\n"); + + return answer; +} + +/* Set level */ +QString RemoteControl::cmd_set_level(QStringList cmdlist) +{ + QString answer; + QString lvl = cmdlist.value(1, ""); + + if (lvl == "?") + answer = QString("SQL\n"); + else if (lvl.compare("SQL", Qt::CaseInsensitive) == 0) + { + bool ok; + double squelch = cmdlist.value(2, "ERR").toDouble(&ok); + if (ok) + { + answer = QString("RPRT 0\n"); + squelch_level = std::max (-150, std::min (0, squelch)); + emit newSquelchLevel(squelch_level); + } + else + { + answer = QString("RPRT 1\n"); + } + } + else + { + answer = QString("RPRT 1\n"); + } + + return answer; +} + +/* Get function */ +QString RemoteControl::cmd_get_func(QStringList cmdlist) +{ + QString answer; + QString func = cmdlist.value(1, ""); + + if (func == "?") + answer = QString("RECORD\n"); + else if (func.compare("RECORD", Qt::CaseInsensitive) == 0) + answer = QString("%1\n").arg(audio_recorder_status); + else + answer = QString("RPRT 1\n"); + + return answer; +} + +/* Set function */ +QString RemoteControl::cmd_set_func(QStringList cmdlist) +{ + bool ok; + QString answer; + QString func = cmdlist.value(1, ""); + int status = cmdlist.value(2, "ERR").toInt(&ok); + + if (func == "?") + { + answer = QString("RECORD\n"); + } + else if ((func.compare("RECORD", Qt::CaseInsensitive) == 0) && ok) + { + if (rc_mode == 0 || !receiver_running) + { + answer = QString("RPRT 1\n"); + } + else + { + answer = QString("RPRT 0\n"); + audio_recorder_status = status; + if (status) + emit startAudioRecorderEvent(); + else + emit stopAudioRecorderEvent(); + } + } + else + { + answer = QString("RPRT 1\n"); + } + + return answer; +} + +/* Gpredict / Gqrx specific command: AOS - satellite AOS event */ +QString RemoteControl::cmd_AOS() +{ + if (rc_mode > 0 && receiver_running) + { + emit startAudioRecorderEvent(); + audio_recorder_status = true; + } + return QString("RPRT 0\n"); +} + +/* Gpredict / Gqrx specific command: LOS - satellite LOS event */ +QString RemoteControl::cmd_LOS() +{ + emit stopAudioRecorderEvent(); + audio_recorder_status = false; + return QString("RPRT 0\n"); +} + /* * '\dump_state' used by hamlib clients, e.g. xdx, fldigi, rigctl and etc * More info: diff --git a/src/applications/gqrx/remote_control.h b/src/applications/gqrx/remote_control.h index d482a2b..5b875d6 100644 --- a/src/applications/gqrx/remote_control.h +++ b/src/applications/gqrx/remote_control.h @@ -128,6 +128,16 @@ private slots: QString intToModeStr(int mode); /* RC commands */ + QString cmd_get_freq(); + QString cmd_set_freq(QStringList cmdlist); + QString cmd_get_mode(); + QString cmd_set_mode(QStringList cmdlist); + QString cmd_get_level(QStringList cmdlist); + QString cmd_set_level(QStringList cmdlist); + QString cmd_get_func(QStringList cmdlist); + QString cmd_set_func(QStringList cmdlist); + QString cmd_AOS(); + QString cmd_LOS(); QString cmd_dump_state(); }; From 97db8e41cd0cc8b793af7775a03872cca4be7aed Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Fri, 18 Nov 2016 10:14:11 +0400 Subject: [PATCH 164/334] Add .travis.yml for Travis CI (http://travis-ci.org/). Fixes #451. --- .travis.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..13c3718 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +sudo: required + +dist: trusty + +language: cpp + +compiler: + - gcc + - clang + +env: + - AUDIO_BACKEND="Pulseaudio" + - AUDIO_BACKEND="Portaudio" + - AUDIO_BACKEND="Gr-audio" + +before_install: + - sudo add-apt-repository -y ppa:bladerf/bladerf + - sudo add-apt-repository -y ppa:ettusresearch/uhd + - sudo add-apt-repository -y ppa:myriadrf/drivers + - sudo add-apt-repository -y ppa:myriadrf/gnuradio + - sudo apt-get update -qq + - sudo apt-get install -y cmake qt5-default libqt5svg5-dev libboost-dev libpulse-dev portaudio19-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr gr-fcdproplus + +script: + - mkdir build + - cd build + - cmake -DLINUX_AUDIO_BACKEND:STRING=$AUDIO_BACKEND .. + - make From 8d28a1645526afc2f326ab1185f1a39279179b66 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Tue, 22 Nov 2016 16:10:01 +0100 Subject: [PATCH 165/334] Add links to GNU Radio qnd Qt websites --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 35e13b8..48b3003 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,10 @@ Gqrx ==== Gqrx is an open source software defined radio (SDR) receiver implemented using -GNU Radio and the Qt GUI toolkit. Currently it works on Linux and Mac with -hardware supported by gr-osmosdr, including Funcube Dongle, RTL-SDR, Airspy, -HackRF, BladeRF, RFSpace, USRP and SoapySDR. +[GNU Radio](http://gnuradio.org) and the [Qt GUI toolkit](https://www.qt.io/). +Currently it works on Linux and Mac with hardware supported by gr-osmosdr, +including Funcube Dongle, RTL-SDR, Airspy, HackRF, BladeRF, RFSpace, USRP and +SoapySDR. Gqrx can operate as an AM/FM/SSB receiver with audio output or as an FFT-only instrument. There are also various hooks for interacting with external From 53e5269cb7999ac38d5a488c598f8a5a9597f981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pinkava?= Date: Wed, 28 Dec 2016 02:31:33 +0100 Subject: [PATCH 166/334] Replace deprecated mpsk_receiver by constellation_receiver --- src/dsp/rx_rds.cpp | 21 ++++++++------------- src/dsp/rx_rds.h | 9 ++------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/dsp/rx_rds.cpp b/src/dsp/rx_rds.cpp index c18e4fd..895ab93 100644 --- a/src/dsp/rx_rds.cpp +++ b/src/dsp/rx_rds.cpp @@ -25,8 +25,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -57,19 +56,17 @@ rx_rds::rx_rds(double sample_rate) gr::io_signature::make (MIN_OUT, MAX_OUT, sizeof (char))), d_sample_rate(sample_rate) { + const int decimation = d_sample_rate / 2375; + d_taps2 = gr::filter::firdes::low_pass(2500.0, d_sample_rate, 2400, 2000); - f_fxff = gr::filter::freq_xlating_fir_filter_fcf::make(5.0, d_taps2, 57000, d_sample_rate); + f_fxff = gr::filter::freq_xlating_fir_filter_fcf::make(decimation, d_taps2, 57000, d_sample_rate); - f_rrcf = gr::filter::firdes::root_raised_cosine(1, sample_rate/5, 2375, 1, 100); + f_rrcf = gr::filter::firdes::root_raised_cosine(1, sample_rate/decimation, 2375, 1, 100); d_bpf2 = gr::filter::fir_filter_ccf::make(1, f_rrcf); - d_mpsk = gr::digital::mpsk_receiver_cc::make(2, 0, 1*M_PI/100.0, -0.06, 0.06, 0.5, 0.05, sample_rate/5/2375.0, 0.001, 0.005); - - - b_ctr = gr::blocks::complex_to_real::make(1); - - d_bs = gr::digital::binary_slicer_fb::make(); + gr::digital::constellation_sptr p_c = gr::digital::constellation_bpsk::make()->base(); + d_mpsk = gr::digital::constellation_receiver_cb::make(p_c, 1*M_PI/100.0, -0.06, 0.06); b_koin = gr::blocks::keep_one_in_n::make(sizeof(unsigned char), 2); @@ -82,9 +79,7 @@ rx_rds::rx_rds(double sample_rate) connect(self(), 0, f_fxff, 0); connect(f_fxff, 0, d_bpf2, 0); connect(d_bpf2, 0, d_mpsk, 0); - connect(d_mpsk, 0, b_ctr, 0); - connect(b_ctr, 0, d_bs, 0); - connect(d_bs, 0, b_koin, 0); + connect(d_mpsk, 0, b_koin, 0); connect(b_koin, 0, d_ddbb, 0); connect(d_ddbb, 0, self(), 0); } diff --git a/src/dsp/rx_rds.h b/src/dsp/rx_rds.h index 219453e..17e406a 100644 --- a/src/dsp/rx_rds.h +++ b/src/dsp/rx_rds.h @@ -28,12 +28,9 @@ #include #include #include -#include #include -#include -#include +#include #include -#include #include #include #include @@ -86,9 +83,7 @@ class rx_rds : public gr::hier_block2 gr::filter::freq_xlating_fir_filter_fcf::sptr f_fxff; gr::filter::freq_xlating_fir_filter_ccf::sptr f_fxff_ccf; std::vector f_rrcf; - gr::digital::mpsk_receiver_cc::sptr d_mpsk; - gr::blocks::complex_to_real::sptr b_ctr; - gr::digital::binary_slicer_fb::sptr d_bs; + gr::digital::constellation_receiver_cb::sptr d_mpsk; gr::blocks::keep_one_in_n::sptr b_koin; gr::digital::diff_decoder_bb::sptr d_ddbb; gr::rds::decoder::sptr rds_decoder; From 5a9e04d432f0c9c34424fc0cb553749a4dbfcb7d Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 5 Jan 2017 22:23:59 +0100 Subject: [PATCH 167/334] Restore FM max deviation between sessions --- src/qtgui/demod_options.cpp | 77 ++++++++++++++++++++++++------------- src/qtgui/demod_options.h | 3 ++ src/qtgui/dockrxopt.cpp | 17 +++++--- 3 files changed, 65 insertions(+), 32 deletions(-) diff --git a/src/qtgui/demod_options.cpp b/src/qtgui/demod_options.cpp index d693928..c454d04 100644 --- a/src/qtgui/demod_options.cpp +++ b/src/qtgui/demod_options.cpp @@ -24,6 +24,46 @@ #include "demod_options.h" #include "ui_demod_options.h" + +float maxdev_from_index(int index) +{ + switch(index) + { + case 0: + /* Voice 2.5k */ + return 2500.0; + case 1: + /* Voice 5k */ + return 5000.0; + case 2: + /* APT 25k (17k but need some margin for Doppler and freq error) */ + return 25000.0; + case 3: + /* Broadcast FM 75k */ + return 75000.0; + default: + /* Voice 5k */ + qDebug() << "Invalid max_dev index: " << index; + return 5000.0; + } +} + +int maxdev_to_index(float max_dev) +{ + if (max_dev < 3000.0) + /* Voice 2.5k */ + return 0; + else if (max_dev < 10000.0) + /* Voice 5k */ + return 1; + else if (max_dev < 40000.0) + /* APT 25k (17k nominally) */ + return 2; + else + /* Broadcast FM 75k */ + return 3; +} + CDemodOptions::CDemodOptions(QWidget *parent) : QDialog(parent), ui(new Ui::CDemodOptions) @@ -70,36 +110,19 @@ int CDemodOptions::getCwOffset(void) const return ui->cwOffsetSpin->value(); } -void CDemodOptions::on_maxdevSelector_activated(int index) +void CDemodOptions::setMaxDev(float max_dev) { - float max_dev; + ui->maxdevSelector->setCurrentIndex(maxdev_to_index(max_dev)); +} - switch(index) - { - case 0: - /* Voice 2.5k */ - max_dev = 2500.0; - break; - case 1: - /* Voice 5k */ - max_dev = 5000.0; - break; - case 2: - /* APT 25k (17k but need some margin for Doppler and freq error) */ - max_dev = 25000.0; - break; - case 3: - /* Broadcast FM 75k */ - max_dev = 75000.0; - break; - default: - /* Voice 5k */ - qDebug() << "Invalid max_dev index: " << index; - max_dev = 5000.0; - break; - } +float CDemodOptions::getMaxDev(void) const +{ + return maxdev_from_index(ui->maxdevSelector->currentIndex()); +} - emit fmMaxdevSelected(max_dev); +void CDemodOptions::on_maxdevSelector_activated(int index) +{ + emit fmMaxdevSelected(maxdev_from_index(index)); } void CDemodOptions::on_emphSelector_activated(int index) diff --git a/src/qtgui/demod_options.h b/src/qtgui/demod_options.h index 8376d1c..f1cf74e 100644 --- a/src/qtgui/demod_options.h +++ b/src/qtgui/demod_options.h @@ -60,6 +60,9 @@ class CDemodOptions : public QDialog void setCwOffset(int offset); int getCwOffset(void) const; + void setMaxDev(float max_dev); + float getMaxDev(void) const; + signals: /*! \brief Signal emitted when new FM deviation is selected. */ void fmMaxdevSelected(float max_dev); diff --git a/src/qtgui/dockrxopt.cpp b/src/qtgui/dockrxopt.cpp index 75be118..5f646d8 100644 --- a/src/qtgui/dockrxopt.cpp +++ b/src/qtgui/dockrxopt.cpp @@ -238,7 +238,6 @@ int DockRxOpt::currentFilterShape() return ui->filterShapeCombo->currentIndex(); } - /** * @brief Select new demodulator. * @param demod Demodulator index corresponding to receiver::demod. @@ -252,7 +251,6 @@ void DockRxOpt::setCurrentDemod(int demod) } } - /** * @brief Get current demodulator selection. * @return The current demodulator corresponding to receiver::demod. @@ -269,11 +267,9 @@ QString DockRxOpt::currentDemodAsString() float DockRxOpt::currentMaxdev() { - qDebug() << __FILE__ << __FUNCTION__ << "FIXME"; - return 5000.0; + return demodOpt->getMaxDev(); } - /** * @brief Set squelch level. * @param level Squelch level in dBFS @@ -333,6 +329,10 @@ void DockRxOpt::readSettings(QSettings *settings) if (conv_ok) demodOpt->setCwOffset(int_val); + int_val = settings->value("receiver/fm_maxdev", 2500).toInt(&conv_ok); + if (conv_ok) + demodOpt->setMaxDev(int_val); + qint64 offs = settings->value("receiver/offset", 0).toInt(&conv_ok); if (offs) { @@ -390,6 +390,13 @@ void DockRxOpt::saveSettings(QSettings *settings) else settings->setValue("receiver/cwoffset", cwofs); + // currently we do not need the decimal + int_val = (int)demodOpt->getMaxDev(); + if (int_val == 2500) + settings->remove("receiver/fm_maxdev"); + else + settings->setValue("receiver/fm_maxdev", int_val); + qint64 offs = ui->filterFreq->getFrequency(); if (offs) settings->setValue("receiver/offset", offs); From e7b7fe00ce62f1b6edb7507edd3acd0439531400 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 5 Jan 2017 22:26:11 +0100 Subject: [PATCH 168/334] Defer reading receiver/demod till the end This ensures that any demod options that may be read when the demodulator is changed are already initialized to their stored value. --- src/qtgui/dockrxopt.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/qtgui/dockrxopt.cpp b/src/qtgui/dockrxopt.cpp index 5f646d8..2c09971 100644 --- a/src/qtgui/dockrxopt.cpp +++ b/src/qtgui/dockrxopt.cpp @@ -318,13 +318,6 @@ void DockRxOpt::readSettings(QSettings *settings) int int_val; double dbl_val; - int_val = settings->value("receiver/demod", 0).toInt(&conv_ok); - if (int_val >= 0) - { - setCurrentDemod(int_val); - emit demodSelected(int_val); - } - int_val = settings->value("receiver/cwoffset", 700).toInt(&conv_ok); if (conv_ok) demodOpt->setCwOffset(int_val); @@ -375,6 +368,13 @@ void DockRxOpt::readSettings(QSettings *settings) if (settings->value("receiver/agc_off", false).toBool()) ui->agcPresetCombo->setCurrentIndex(4); + + int_val = settings->value("receiver/demod", 0).toInt(&conv_ok); + if (int_val >= 0) + { + setCurrentDemod(int_val); + emit demodSelected(int_val); + } } /** Save receiver configuration to settings. */ From afb146986037a5f82bf2fc211f342bbb72f1af28 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Fri, 6 Jan 2017 00:13:54 +0100 Subject: [PATCH 169/334] Ensure maxdev is applied when NFM is selected --- src/applications/gqrx/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index e48954e..ecf9549 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -998,6 +998,7 @@ void MainWindow::selectDemod(int mode_idx) ui->plotter->setDemodRanges(-45000, -1000, 1000, 45000, true); uiDockAudio->setFftRange(0,24000); } + rx->set_fm_maxdev(maxdev); break; case DockRxOpt::MODE_WFM_MONO: From d9b25f889592717739443a5a2e960cdf05f0975c Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Fri, 6 Jan 2017 00:22:38 +0100 Subject: [PATCH 170/334] Use const getters where possible --- src/qtgui/dockrxopt.cpp | 10 +++++----- src/qtgui/dockrxopt.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/qtgui/dockrxopt.cpp b/src/qtgui/dockrxopt.cpp index 2c09971..3f69ce9 100644 --- a/src/qtgui/dockrxopt.cpp +++ b/src/qtgui/dockrxopt.cpp @@ -222,7 +222,7 @@ void DockRxOpt::setCurrentFilter(int index) * @brief Get current filter preset. * @param The current filter preset (0=wide, 1=normal, 2=narrow). */ -int DockRxOpt::currentFilter() +int DockRxOpt::currentFilter() const { return ui->filterCombo->currentIndex(); } @@ -233,7 +233,7 @@ void DockRxOpt::setCurrentFilterShape(int index) ui->filterShapeCombo->setCurrentIndex(index); } -int DockRxOpt::currentFilterShape() +int DockRxOpt::currentFilterShape() const { return ui->filterShapeCombo->currentIndex(); } @@ -255,7 +255,7 @@ void DockRxOpt::setCurrentDemod(int demod) * @brief Get current demodulator selection. * @return The current demodulator corresponding to receiver::demod. */ -int DockRxOpt::currentDemod() +int DockRxOpt::currentDemod() const { return ui->modeSelector->currentIndex(); } @@ -265,7 +265,7 @@ QString DockRxOpt::currentDemodAsString() return GetStringForModulationIndex(currentDemod()); } -float DockRxOpt::currentMaxdev() +float DockRxOpt::currentMaxdev() const { return demodOpt->getMaxDev(); } @@ -283,7 +283,7 @@ void DockRxOpt::setSquelchLevel(double level) * @brief Get the current squelch level * @returns The current squelch setting in dBFS */ -double DockRxOpt::currentSquelchLevel() +double DockRxOpt::currentSquelchLevel() const { return ui->sqlSpinBox->value(); } diff --git a/src/qtgui/dockrxopt.h b/src/qtgui/dockrxopt.h index 787dd3b..7a26013 100644 --- a/src/qtgui/dockrxopt.h +++ b/src/qtgui/dockrxopt.h @@ -88,19 +88,19 @@ class DockRxOpt : public QDockWidget void setFilterParam(int lo, int hi); void setCurrentFilter(int index); - int currentFilter(); + int currentFilter() const; void setCurrentFilterShape(int index); - int currentFilterShape(); + int currentFilterShape() const; void setHwFreq(qint64 freq_hz); - int currentDemod(); + int currentDemod() const; QString currentDemodAsString(); - float currentMaxdev(); + float currentMaxdev() const; - double currentSquelchLevel(); + double currentSquelchLevel() const; void getFilterPreset(int mode, int preset, int * lo, int * hi) const; int getCwOffset() const; From 86147c5d3bdff50ca964783e71dd9371873fff4b Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Fri, 6 Jan 2017 00:25:49 +0100 Subject: [PATCH 171/334] Ensure de-emphasis is applied when NFM is selected --- src/applications/gqrx/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index ecf9549..7a021eb 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -999,6 +999,7 @@ void MainWindow::selectDemod(int mode_idx) uiDockAudio->setFftRange(0,24000); } rx->set_fm_maxdev(maxdev); + rx->set_fm_deemph(uiDockRxOpt->currentEmph()); break; case DockRxOpt::MODE_WFM_MONO: From 52dd3daac558598d60e1d1e1640449bd17823504 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Fri, 6 Jan 2017 00:54:07 +0100 Subject: [PATCH 172/334] Restore FM de-emphasis between sessions --- src/qtgui/demod_options.cpp | 47 +++++++++++++++++++++++++++++-------- src/qtgui/demod_options.h | 3 +++ src/qtgui/dockrxopt.cpp | 16 +++++++++++++ src/qtgui/dockrxopt.h | 2 +- 4 files changed, 57 insertions(+), 11 deletions(-) diff --git a/src/qtgui/demod_options.cpp b/src/qtgui/demod_options.cpp index c454d04..2992c32 100644 --- a/src/qtgui/demod_options.cpp +++ b/src/qtgui/demod_options.cpp @@ -25,6 +25,32 @@ #include "ui_demod_options.h" +/* convert between deemphasis time constant and combo-index */ +const double tau_tbl[] = { + 0.0, 25.0e-6, 50.0e-6, 75.0e-6, 100.0e-6, 250.0e-6, 530.0e-6, 1.0e-3 +}; +const int tau_tbl_maxidx = 7; + +double tau_from_index(int index) +{ + if (index < 0 or index > tau_tbl_maxidx) + return 0.0; + + return tau_tbl[index]; +} + +int tau_to_index(double tau) +{ + int i; + for (i = 0; i < tau_tbl_maxidx; i++) + { + if (tau < (tau_tbl[i] + 0.5 * (tau_tbl[i+1] - tau_tbl[i]))) + return i; + } + return 0; +} + +/* convert betweenFM max dev and combo index */ float maxdev_from_index(int index) { switch(index) @@ -120,6 +146,16 @@ float CDemodOptions::getMaxDev(void) const return maxdev_from_index(ui->maxdevSelector->currentIndex()); } +void CDemodOptions::setEmph(double tau) +{ + ui->emphSelector->setCurrentIndex((tau_to_index(tau))); +} + +double CDemodOptions::getEmph(void) const +{ + return tau_from_index(ui->emphSelector->currentIndex()); +} + void CDemodOptions::on_maxdevSelector_activated(int index) { emit fmMaxdevSelected(maxdev_from_index(index)); @@ -127,16 +163,7 @@ void CDemodOptions::on_maxdevSelector_activated(int index) void CDemodOptions::on_emphSelector_activated(int index) { - double tau_tbl[] = {0.0, 25.0, 50.0, 75.0, 100.0, 250.0, 530.0, 1000.0}; - double tau; - - if ((index < 0) || (index > 7)) { - qDebug() << "Invalid tau selection index: " << index; - return; - } - - tau = tau_tbl[index] * 1.0e-6; - emit fmEmphSelected(tau); + emit fmEmphSelected(tau_from_index(index)); } void CDemodOptions::on_dcrCheckBox_toggled(bool checked) diff --git a/src/qtgui/demod_options.h b/src/qtgui/demod_options.h index f1cf74e..d9324db 100644 --- a/src/qtgui/demod_options.h +++ b/src/qtgui/demod_options.h @@ -63,6 +63,9 @@ class CDemodOptions : public QDialog void setMaxDev(float max_dev); float getMaxDev(void) const; + void setEmph(double tau); + double getEmph(void) const; + signals: /*! \brief Signal emitted when new FM deviation is selected. */ void fmMaxdevSelected(float max_dev); diff --git a/src/qtgui/dockrxopt.cpp b/src/qtgui/dockrxopt.cpp index 3f69ce9..75fe3f8 100644 --- a/src/qtgui/dockrxopt.cpp +++ b/src/qtgui/dockrxopt.cpp @@ -270,6 +270,11 @@ float DockRxOpt::currentMaxdev() const return demodOpt->getMaxDev(); } +double DockRxOpt::currentEmph() const +{ + return demodOpt->getEmph(); +} + /** * @brief Set squelch level. * @param level Squelch level in dBFS @@ -326,6 +331,10 @@ void DockRxOpt::readSettings(QSettings *settings) if (conv_ok) demodOpt->setMaxDev(int_val); + dbl_val = settings->value("receiver/fm_deemph", 75).toDouble(&conv_ok); + if (conv_ok && dbl_val >= 0) + demodOpt->setEmph(1.0e-6 * dbl_val); // was stored as usec + qint64 offs = settings->value("receiver/offset", 0).toInt(&conv_ok); if (offs) { @@ -397,6 +406,13 @@ void DockRxOpt::saveSettings(QSettings *settings) else settings->setValue("receiver/fm_maxdev", int_val); + // save as usec + int_val = (int)(1.0e6 * demodOpt->getEmph()); + if (int_val == 75) + settings->remove("receiver/fm_deemph"); + else + settings->setValue("receiver/fm_deemph", int_val); + qint64 offs = ui->filterFreq->getFrequency(); if (offs) settings->setValue("receiver/offset", offs); diff --git a/src/qtgui/dockrxopt.h b/src/qtgui/dockrxopt.h index 7a26013..3564992 100644 --- a/src/qtgui/dockrxopt.h +++ b/src/qtgui/dockrxopt.h @@ -99,7 +99,7 @@ class DockRxOpt : public QDockWidget QString currentDemodAsString(); float currentMaxdev() const; - + double currentEmph() const; double currentSquelchLevel() const; void getFilterPreset(int mode, int preset, int * lo, int * hi) const; From 63f6e526198c7161ba1e4f4fe3f7a5b22a448e37 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Fri, 6 Jan 2017 07:48:32 +0100 Subject: [PATCH 173/334] Add both 17 and 25 kHz deviations for APT use Issue #459. --- src/qtgui/demod_options.cpp | 14 ++++++++++---- src/qtgui/demod_options.ui | 7 ++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/qtgui/demod_options.cpp b/src/qtgui/demod_options.cpp index 2992c32..f831f4a 100644 --- a/src/qtgui/demod_options.cpp +++ b/src/qtgui/demod_options.cpp @@ -62,9 +62,12 @@ float maxdev_from_index(int index) /* Voice 5k */ return 5000.0; case 2: + /* APT 17k */ + return 17000.0; + case 3: /* APT 25k (17k but need some margin for Doppler and freq error) */ return 25000.0; - case 3: + case 4: /* Broadcast FM 75k */ return 75000.0; default: @@ -82,12 +85,15 @@ int maxdev_to_index(float max_dev) else if (max_dev < 10000.0) /* Voice 5k */ return 1; - else if (max_dev < 40000.0) - /* APT 25k (17k nominally) */ + else if (max_dev < 20000.0) + /* APT 17k */ return 2; + else if (max_dev < 40000.0) + /* APT 25k */ + return 3; else /* Broadcast FM 75k */ - return 3; + return 4; } CDemodOptions::CDemodOptions(QWidget *parent) : diff --git a/src/qtgui/demod_options.ui b/src/qtgui/demod_options.ui index 5147b6f..8551310 100644 --- a/src/qtgui/demod_options.ui +++ b/src/qtgui/demod_options.ui @@ -6,7 +6,7 @@ @@ -112,6 +112,11 @@ this demodulator 0 0 -223 +228 110 Voice (5 kHz) - +
+ +APT (17 kHz) +- -
APT (25 kHz) From d842ad821559d54245d7e619bdeaabe867e2a369 Mon Sep 17 00:00:00 2001 From: Alexandru CseteDate: Fri, 6 Jan 2017 18:22:12 +0100 Subject: [PATCH 174/334] Remove unused class member --- src/dsp/rx_demod_fm.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/dsp/rx_demod_fm.h b/src/dsp/rx_demod_fm.h index 0d0211e..0cc9c4f 100644 --- a/src/dsp/rx_demod_fm.h +++ b/src/dsp/rx_demod_fm.h @@ -26,7 +26,6 @@ #include #include #include -#include #include class rx_demod_fm; @@ -65,7 +64,6 @@ class rx_demod_fm : public gr::hier_block2 /* GR blocks */ gr::analog::quadrature_demod_cf::sptr d_quad; /*! The quadrature demodulator block. */ gr::filter::iir_filter_ffd::sptr d_deemph; /*! De-emphasis IIR filter. */ - gr::filter::pfb_arb_resampler_ccf::sptr d_resampler; /*! PFB resampler. */ std::vector d_taps; /*! Taps for the PFB resampler. */ /* other parameters */ From 09101bdb177e03bf473d400ae4c96e6aedabad29 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Fri, 6 Jan 2017 21:52:28 +0100 Subject: [PATCH 175/334] Minor style cleanup --- src/dsp/rx_demod_fm.cpp | 33 ++++++++++++++++++++------------- src/dsp/rx_demod_fm.h | 15 ++++++--------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/dsp/rx_demod_fm.cpp b/src/dsp/rx_demod_fm.cpp index 507e356..ae7ce3b 100644 --- a/src/dsp/rx_demod_fm.cpp +++ b/src/dsp/rx_demod_fm.cpp @@ -20,11 +20,12 @@ * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ -#include #include -#include -#include +#include #include +#include + +#include "dsp/rx_demod_fm.h" /* Create a new instance of rx_demod_fm and return a boost shared_ptr. */ @@ -67,11 +68,13 @@ rx_demod_fm::rx_demod_fm(float quad_rate, float audio_rate, float max_dev, doubl /* connect block */ connect(self(), 0, d_quad, 0); - if (d_tau > 1.0e-9) { + if (d_tau > 1.0e-9) + { connect(d_quad, 0, d_deemph, 0); connect(d_deemph, 0, self(), 0); } - else { + else + { connect(d_quad, 0, self(), 0); } @@ -93,7 +96,8 @@ void rx_demod_fm::set_max_dev(float max_dev) { float gain; - if ((max_dev < 500.0) || (max_dev > d_quad_rate/2.0)) { + if ((max_dev < 500.0) || (max_dev > d_quad_rate/2.0)) + { return; } @@ -111,17 +115,20 @@ void rx_demod_fm::set_max_dev(float max_dev) */ void rx_demod_fm::set_tau(double tau) { - if (fabs(tau - d_tau) < 1.0e-9) { + if (fabs(tau - d_tau) < 1.0e-9) + { /* no change */ return; } - if (tau > 1.0e-9) { + if (tau > 1.0e-9) + { calculate_iir_taps(tau); d_deemph->set_taps(d_fftaps, d_fbtaps); /* check to see if we need to rewire flow graph */ - if (d_tau <= 1.0e-9) { + if (d_tau <= 1.0e-9) + { /* need to put deemph into the flowgraph */ lock(); disconnect(d_quad, 0, self(), 0); @@ -132,12 +139,14 @@ void rx_demod_fm::set_tau(double tau) d_tau = tau; } - else { + else + { #ifndef QT_NO_DEBUG_OUTPUT std::cerr << "FM de-emphasis tau is 0: " << tau << std::endl; #endif /* diable de-emph if conencted */ - if (d_tau > 1.0e-9) { + if (d_tau > 1.0e-9) + { #ifndef QT_NO_DEBUG_OUTPUT std::cout << " Disable de-emphasis" << std::endl; #endif @@ -150,10 +159,8 @@ void rx_demod_fm::set_tau(double tau) d_tau = 0.0; } - } - /*! \brief Calculate taps for FM de-emph IIR filter. */ void rx_demod_fm::calculate_iir_taps(double tau) { diff --git a/src/dsp/rx_demod_fm.h b/src/dsp/rx_demod_fm.h index 0cc9c4f..ac22602 100644 --- a/src/dsp/rx_demod_fm.h +++ b/src/dsp/rx_demod_fm.h @@ -20,12 +20,11 @@ * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ -#ifndef RX_DEMOD_FM_H -#define RX_DEMOD_FM_H +#pragma once -#include #include #include +#include #include class rx_demod_fm; @@ -67,10 +66,10 @@ class rx_demod_fm : public gr::hier_block2 std::vector d_taps; /*! Taps for the PFB resampler. */ /* other parameters */ - float d_quad_rate; /*! Quadrature rate. */ - float d_audio_rate; /*! Audio rate. */ - float d_max_dev; /*! Max deviation. */ - double d_tau; /*! De-emphasis time constant. */ + float d_quad_rate; /*! Quadrature rate. */ + float d_audio_rate; /*! Audio rate. */ + float d_max_dev; /*! Max deviation. */ + double d_tau; /*! De-emphasis time constant. */ /* De-emph IIR filter taps */ std::vector d_fftaps; /*! Feed forward taps. */ @@ -79,5 +78,3 @@ class rx_demod_fm : public gr::hier_block2 void calculate_iir_taps(double tau); }; - -#endif // RX_DEMOD_FM_H From d9c96454009f51b30555107ac6f21c4a1efe8dcb Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 7 Jan 2017 11:01:31 +0100 Subject: [PATCH 176/334] Use standard filter presets for APT submode Using wide filter preset for NFM modes with high deviation causes more trouble than it's worth, at least once we can properly restore the channel filter settings between sessions. --- src/applications/gqrx/mainwindow.cpp | 53 ++++++---------------------- 1 file changed, 11 insertions(+), 42 deletions(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 7a021eb..972e293 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -932,12 +932,11 @@ void MainWindow::selectDemod(QString strModulation) */ void MainWindow::selectDemod(int mode_idx) { - double quad_rate; - double cwofs = 0.0; - float maxdev; - int filter_preset = uiDockRxOpt->currentFilter(); - int flo=0, fhi=0, click_res=100; - bool rds_enabled; + double cwofs = 0.0; + double fw_half = 0.45 * rx->get_quad_rate(); // max filter width half (90% BW) + int filter_preset = uiDockRxOpt->currentFilter(); + int flo=0, fhi=0, click_res=100; + bool rds_enabled; // validate mode_idx if (mode_idx < DockRxOpt::MODE_OFF || mode_idx >= DockRxOpt::MODE_LAST) @@ -964,7 +963,6 @@ void MainWindow::selectDemod(int mode_idx) stopAudioRec(); uiDockAudio->setAudioRecButtonState(false); } - rx->set_demod(receiver::RX_DEMOD_OFF); click_res = 1000; break; @@ -972,7 +970,7 @@ void MainWindow::selectDemod(int mode_idx) case DockRxOpt::MODE_RAW: /* Raw I/Q */ rx->set_demod(receiver::RX_DEMOD_NONE); - ui->plotter->setDemodRanges(-45000, -200, 200, 45000, true); + ui->plotter->setDemodRanges(-fw_half, -200, 200, fw_half, true); uiDockAudio->setFftRange(0,24000); click_res = 100; break; @@ -985,34 +983,19 @@ void MainWindow::selectDemod(int mode_idx) break; case DockRxOpt::MODE_NFM: + ui->plotter->setDemodRanges(-fw_half, -1000, 1000, fw_half, true); + uiDockAudio->setFftRange(0, 5000); rx->set_demod(receiver::RX_DEMOD_NFM); - click_res = 100; - maxdev = uiDockRxOpt->currentMaxdev(); - if (maxdev < 20000.0) - { /** FIXME **/ - ui->plotter->setDemodRanges(-45000, -250, 250, 45000, true); - uiDockAudio->setFftRange(0,6000); - } - else - { - ui->plotter->setDemodRanges(-45000, -1000, 1000, 45000, true); - uiDockAudio->setFftRange(0,24000); - } - rx->set_fm_maxdev(maxdev); + rx->set_fm_maxdev(uiDockRxOpt->currentMaxdev()); rx->set_fm_deemph(uiDockRxOpt->currentEmph()); + click_res = 100; break; case DockRxOpt::MODE_WFM_MONO: case DockRxOpt::MODE_WFM_STEREO: case DockRxOpt::MODE_WFM_STEREO_OIRT: /* Broadcast FM */ - quad_rate = rx->get_input_rate(); - if (quad_rate < 500.0e3) - ui->plotter->setDemodRanges(-quad_rate/2.0, -10000, - 10000, quad_rate/2.0, - true); - else - ui->plotter->setDemodRanges(-250000, -10000, 10000, 250000, true); + ui->plotter->setDemodRanges(-fw_half, -10000, 10000, fw_half, true); uiDockAudio->setFftRange(0,24000); /** FIXME: get audio rate from rx **/ click_res = 1000; if (mode_idx == DockRxOpt::MODE_WFM_MONO) @@ -1096,20 +1079,6 @@ void MainWindow::setFmMaxdev(float max_dev) /* receiver will check range */ rx->set_fm_maxdev(max_dev); - - /* update filter */ - if (max_dev < 20000.0) - { - ui->plotter->setDemodRanges(-25000, -1000, 1000, 25000, true); - ui->plotter->setHiLowCutFrequencies(-5000, 5000); - rx->set_filter(-5000.0, 5000.0, d_filter_shape); - } - else - { - ui->plotter->setDemodRanges(-45000, -10000, 10000, 45000, true); - ui->plotter->setHiLowCutFrequencies(-35000, 35000); - rx->set_filter(-35000.0, 35000.0, d_filter_shape); - } } From b27221a2f5e47382cf85479d5865c21c6a6e2f85 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 7 Jan 2017 11:41:14 +0100 Subject: [PATCH 177/334] Add interface for reading quad_rate from receiver Also move implementation of get_input_rate to header. --- src/applications/gqrx/receiver.cpp | 7 ------- src/applications/gqrx/receiver.h | 6 +++++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/applications/gqrx/receiver.cpp b/src/applications/gqrx/receiver.cpp index 0cddce8..59017a6 100644 --- a/src/applications/gqrx/receiver.cpp +++ b/src/applications/gqrx/receiver.cpp @@ -348,13 +348,6 @@ double receiver::set_input_rate(double rate) return d_input_rate; } - -/** Get current input sample rate. */ -double receiver::get_input_rate(void) const -{ - return d_input_rate; -} - /** Set input decimation */ unsigned int receiver::set_input_decim(unsigned int decim) { diff --git a/src/applications/gqrx/receiver.h b/src/applications/gqrx/receiver.h index 0df430d..a95af5c 100644 --- a/src/applications/gqrx/receiver.h +++ b/src/applications/gqrx/receiver.h @@ -119,11 +119,15 @@ class receiver void set_antenna(const std::string &antenna); double set_input_rate(double rate); - double get_input_rate(void) const; + double get_input_rate(void) const { return d_input_rate; } unsigned int set_input_decim(unsigned int decim); unsigned int get_input_decim(void) const { return d_decim; } + double get_quad_rate(void) const { + return d_input_rate / (double)d_decim; + } + double set_analog_bandwidth(double bw); double get_analog_bandwidth(void) const; From b56bc28ec2388d7256033536c5f85b86157b9f88 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 7 Jan 2017 12:25:19 +0100 Subject: [PATCH 178/334] Remove unused audio rate from FM and AM demods --- src/dsp/rx_demod_am.cpp | 7 +++---- src/dsp/rx_demod_am.h | 8 +++----- src/dsp/rx_demod_fm.cpp | 7 +++---- src/dsp/rx_demod_fm.h | 6 ++---- src/receivers/nbrx.cpp | 4 ++-- src/receivers/wfmrx.cpp | 2 +- 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/dsp/rx_demod_am.cpp b/src/dsp/rx_demod_am.cpp index d294062..e97bf53 100644 --- a/src/dsp/rx_demod_am.cpp +++ b/src/dsp/rx_demod_am.cpp @@ -26,9 +26,9 @@ /* Create a new instance of rx_demod_am and return a boost shared_ptr. */ -rx_demod_am_sptr make_rx_demod_am(float quad_rate, float audio_rate, bool dcr) +rx_demod_am_sptr make_rx_demod_am(float quad_rate, bool dcr) { - return gnuradio::get_initial_sptr(new rx_demod_am(quad_rate, audio_rate, dcr)); + return gnuradio::get_initial_sptr(new rx_demod_am(quad_rate, dcr)); } static const int MIN_IN = 1; /* Mininum number of input streams. */ @@ -36,14 +36,13 @@ static const int MAX_IN = 1; /* Maximum number of input streams. */ static const int MIN_OUT = 1; /* Minimum number of output streams. */ static const int MAX_OUT = 1; /* Maximum number of output streams. */ -rx_demod_am::rx_demod_am(float quad_rate, float audio_rate, bool dcr) +rx_demod_am::rx_demod_am(float quad_rate, bool dcr) : gr::hier_block2 ("rx_demod_am", gr::io_signature::make (MIN_IN, MAX_IN, sizeof (gr_complex)), gr::io_signature::make (MIN_OUT, MAX_OUT, sizeof (float))), d_dcr_enabled(dcr) { (void) quad_rate; - (void) audio_rate; /* demodulator */ d_demod = gr::blocks::complex_to_mag::make(1); diff --git a/src/dsp/rx_demod_am.h b/src/dsp/rx_demod_am.h index da8ab7d..7809d6c 100644 --- a/src/dsp/rx_demod_am.h +++ b/src/dsp/rx_demod_am.h @@ -36,13 +36,11 @@ typedef boost::shared_ptr rx_demod_am_sptr; /*! \brief Return a shared_ptr to a new instance of rx_demod_am. * \param quad_rate The input sample rate. - * \param audio_rate The audio rate. * \param dcr Enable DCR * * This is effectively the public constructor. */ -rx_demod_am_sptr make_rx_demod_am(float quad_rate, float audio_rate, bool dcr=true); - +rx_demod_am_sptr make_rx_demod_am(float quad_rate, bool dcr=true); /*! \brief AM demodulator. * \ingroup DSP @@ -56,7 +54,7 @@ class rx_demod_am : public gr::hier_block2 { public: - rx_demod_am(float quad_rate=48000.0, float audio_rate=48000.0, bool dcr=true); // FIXME: could be private + rx_demod_am(float quad_rate, bool dcr=true); // FIXME: could be private ~rx_demod_am(); void set_dcr(bool dcr); @@ -64,7 +62,7 @@ class rx_demod_am : public gr::hier_block2 private: /* GR blocks */ - gr::blocks::complex_to_mag::sptr d_demod; /*! AM demodulation (complex to magnitude). */ + gr::blocks::complex_to_mag::sptr d_demod; /*! AM demodulation (complex to magnitude). */ gr::filter::iir_filter_ffd::sptr d_dcr; /*! DC removal (IIR high pass). */ /* other parameters */ diff --git a/src/dsp/rx_demod_fm.cpp b/src/dsp/rx_demod_fm.cpp index ae7ce3b..382060f 100644 --- a/src/dsp/rx_demod_fm.cpp +++ b/src/dsp/rx_demod_fm.cpp @@ -29,9 +29,9 @@ /* Create a new instance of rx_demod_fm and return a boost shared_ptr. */ -rx_demod_fm_sptr make_rx_demod_fm(float quad_rate, float audio_rate, float max_dev, double tau) +rx_demod_fm_sptr make_rx_demod_fm(float quad_rate, float max_dev, double tau) { - return gnuradio::get_initial_sptr(new rx_demod_fm(quad_rate, audio_rate, max_dev, tau)); + return gnuradio::get_initial_sptr(new rx_demod_fm(quad_rate, max_dev, tau)); } static const int MIN_IN = 1; /* Mininum number of input streams. */ @@ -39,12 +39,11 @@ static const int MAX_IN = 1; /* Maximum number of input streams. */ static const int MIN_OUT = 1; /* Minimum number of output streams. */ static const int MAX_OUT = 1; /* Maximum number of output streams. */ -rx_demod_fm::rx_demod_fm(float quad_rate, float audio_rate, float max_dev, double tau) +rx_demod_fm::rx_demod_fm(float quad_rate, float max_dev, double tau) : gr::hier_block2 ("rx_demod_fm", gr::io_signature::make (MIN_IN, MAX_IN, sizeof (gr_complex)), gr::io_signature::make (MIN_OUT, MAX_OUT, sizeof (float))), d_quad_rate(quad_rate), - d_audio_rate(audio_rate), d_max_dev(max_dev), d_tau(tau) { diff --git a/src/dsp/rx_demod_fm.h b/src/dsp/rx_demod_fm.h index ac22602..1aac163 100644 --- a/src/dsp/rx_demod_fm.h +++ b/src/dsp/rx_demod_fm.h @@ -32,7 +32,6 @@ typedef boost::shared_ptr rx_demod_fm_sptr; /*! \brief Return a shared_ptr to a new instance of rx_demod_fm. * \param quad_rate The input sample rate. - * \param audio_rate The audio rate. * \param max_dev Maximum deviation in Hz * \param tau De-emphasis time constant in seconds (75us in US, 50us in EUR, 0.0 disables). * @@ -40,7 +39,7 @@ typedef boost::shared_ptr rx_demod_fm_sptr; * of raw pointers, rx_demod_fm's constructor is private. * make_rx_dmod_fm is the public interface for creating new instances. */ -rx_demod_fm_sptr make_rx_demod_fm(float quad_rate, float audio_rate, float max_dev=5000.0, double tau=50.0e-6); +rx_demod_fm_sptr make_rx_demod_fm(float quad_rate, float max_dev=5000.0, double tau=50.0e-6); /*! \brief FM demodulator. * \ingroup DSP @@ -53,7 +52,7 @@ class rx_demod_fm : public gr::hier_block2 { public: - rx_demod_fm(float quad_rate=48000.0, float audio_rate=48000.0, float max_dev=5000.0, double tau=50.0e-6); // FIXME: should be private + rx_demod_fm(float quad_rate, float max_dev, double tau); // FIXME: should be private ~rx_demod_fm(); void set_max_dev(float max_dev); @@ -67,7 +66,6 @@ class rx_demod_fm : public gr::hier_block2 /* other parameters */ float d_quad_rate; /*! Quadrature rate. */ - float d_audio_rate; /*! Audio rate. */ float d_max_dev; /*! Max deviation. */ double d_tau; /*! De-emphasis time constant. */ diff --git a/src/receivers/nbrx.cpp b/src/receivers/nbrx.cpp index ae73ae1..b6b9f01 100644 --- a/src/receivers/nbrx.cpp +++ b/src/receivers/nbrx.cpp @@ -48,8 +48,8 @@ nbrx::nbrx(float quad_rate, float audio_rate) meter = make_rx_meter_c(DETECTOR_TYPE_RMS); demod_raw = gr::blocks::complex_to_float::make(1); demod_ssb = gr::blocks::complex_to_real::make(1); - demod_fm = make_rx_demod_fm(PREF_QUAD_RATE, PREF_AUDIO_RATE, 5000.0, 75.0e-6); - demod_am = make_rx_demod_am(PREF_QUAD_RATE, PREF_AUDIO_RATE, true); + demod_fm = make_rx_demod_fm(PREF_QUAD_RATE, 5000.0, 75.0e-6); + demod_am = make_rx_demod_am(PREF_QUAD_RATE, true); audio_rr.reset(); if (d_audio_rate != PREF_AUDIO_RATE) diff --git a/src/receivers/wfmrx.cpp b/src/receivers/wfmrx.cpp index a6321fa..1c9f804 100644 --- a/src/receivers/wfmrx.cpp +++ b/src/receivers/wfmrx.cpp @@ -45,7 +45,7 @@ wfmrx::wfmrx(float quad_rate, float audio_rate) filter = make_rx_filter(PREF_QUAD_RATE, -80000.0, 80000.0, 20000.0); sql = gr::analog::simple_squelch_cc::make(-150.0, 0.001); meter = make_rx_meter_c(DETECTOR_TYPE_RMS); - demod_fm = make_rx_demod_fm(PREF_QUAD_RATE, PREF_MIDLE_RATE, 75000.0, 50.0e-6); + demod_fm = make_rx_demod_fm(PREF_QUAD_RATE, 75000.0, 50.0e-6); midle_rr = make_resampler_ff(PREF_MIDLE_RATE/PREF_QUAD_RATE); stereo = make_stereo_demod(PREF_MIDLE_RATE, d_audio_rate, true); stereo_oirt = make_stereo_demod(PREF_MIDLE_RATE, d_audio_rate, true, true); From 392dd4206a7e745c8ea047f5312664e8dfeaacbf Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 7 Jan 2017 12:37:29 +0100 Subject: [PATCH 179/334] Increase quadrature rate for narrow band receiver Reducing the quadrature rate to 48 kHz was probably done while optimizing for embedded devices; however, 48 kHz is just too narrow if we want to do things like NOAA APT using the narrow band receiver. See also issue #459. --- src/receivers/nbrx.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/receivers/nbrx.cpp b/src/receivers/nbrx.cpp index b6b9f01..c323d34 100644 --- a/src/receivers/nbrx.cpp +++ b/src/receivers/nbrx.cpp @@ -24,8 +24,8 @@ #include #include "receivers/nbrx.h" -#define PREF_QUAD_RATE 48000.f -#define PREF_AUDIO_RATE 48000.f +// NB: Remeber to adjust filter ranges in MainWindow +#define PREF_QUAD_RATE 96000.f nbrx_sptr make_nbrx(float quad_rate, float audio_rate) { @@ -52,11 +52,11 @@ nbrx::nbrx(float quad_rate, float audio_rate) demod_am = make_rx_demod_am(PREF_QUAD_RATE, true); audio_rr.reset(); - if (d_audio_rate != PREF_AUDIO_RATE) + if (d_audio_rate != PREF_QUAD_RATE) { - std::cout << "Resampling audio " << PREF_AUDIO_RATE << " -> " + std::cout << "Resampling audio " << PREF_QUAD_RATE << " -> " << d_audio_rate << std::endl; - audio_rr = make_resampler_ff(d_audio_rate/PREF_AUDIO_RATE); + audio_rr = make_resampler_ff(d_audio_rate/PREF_QUAD_RATE); } demod = demod_fm; @@ -113,6 +113,7 @@ void nbrx::set_quad_rate(float quad_rate) void nbrx::set_audio_rate(float audio_rate) { (void) audio_rate; + std::cout << "**** FIXME: nbrx::set_audio_rate() not implemented" << std::endl; } void nbrx::set_filter(double low, double high, double tw) From 3b2859a0bc2aab89772a4880a4454a28a1b8109d Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 7 Jan 2017 12:44:51 +0100 Subject: [PATCH 180/334] Adjust filter ranges according to quadrature rate --- src/applications/gqrx/mainwindow.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 972e293..35fd7c6 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -933,7 +933,6 @@ void MainWindow::selectDemod(QString strModulation) void MainWindow::selectDemod(int mode_idx) { double cwofs = 0.0; - double fw_half = 0.45 * rx->get_quad_rate(); // max filter width half (90% BW) int filter_preset = uiDockRxOpt->currentFilter(); int flo=0, fhi=0, click_res=100; bool rds_enabled; @@ -968,22 +967,22 @@ void MainWindow::selectDemod(int mode_idx) break; case DockRxOpt::MODE_RAW: - /* Raw I/Q */ + /* Raw I/Q; max 96 ksps*/ rx->set_demod(receiver::RX_DEMOD_NONE); - ui->plotter->setDemodRanges(-fw_half, -200, 200, fw_half, true); + ui->plotter->setDemodRanges(-40000, -200, 200, 40000, true); uiDockAudio->setFftRange(0,24000); click_res = 100; break; case DockRxOpt::MODE_AM: rx->set_demod(receiver::RX_DEMOD_AM); - ui->plotter->setDemodRanges(-45000, -200, 200, 45000, true); + ui->plotter->setDemodRanges(-40000, -200, 200, 40000, true); uiDockAudio->setFftRange(0,6000); click_res = 100; break; case DockRxOpt::MODE_NFM: - ui->plotter->setDemodRanges(-fw_half, -1000, 1000, fw_half, true); + ui->plotter->setDemodRanges(-40000, -1000, 1000, 40000, true); uiDockAudio->setFftRange(0, 5000); rx->set_demod(receiver::RX_DEMOD_NFM); rx->set_fm_maxdev(uiDockRxOpt->currentMaxdev()); @@ -995,7 +994,7 @@ void MainWindow::selectDemod(int mode_idx) case DockRxOpt::MODE_WFM_STEREO: case DockRxOpt::MODE_WFM_STEREO_OIRT: /* Broadcast FM */ - ui->plotter->setDemodRanges(-fw_half, -10000, 10000, fw_half, true); + ui->plotter->setDemodRanges(-120e3, -10000, 10000, 120e3, true); uiDockAudio->setFftRange(0,24000); /** FIXME: get audio rate from rx **/ click_res = 1000; if (mode_idx == DockRxOpt::MODE_WFM_MONO) From 54960c3db5e67f0cb2ae0cd227784d09dcc181b5 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 7 Jan 2017 13:00:43 +0100 Subject: [PATCH 181/334] Remove 75k deviation from narrow band RX --- src/qtgui/demod_options.cpp | 8 +------- src/qtgui/demod_options.ui | 5 ----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/qtgui/demod_options.cpp b/src/qtgui/demod_options.cpp index f831f4a..2359279 100644 --- a/src/qtgui/demod_options.cpp +++ b/src/qtgui/demod_options.cpp @@ -67,9 +67,6 @@ float maxdev_from_index(int index) case 3: /* APT 25k (17k but need some margin for Doppler and freq error) */ return 25000.0; - case 4: - /* Broadcast FM 75k */ - return 75000.0; default: /* Voice 5k */ qDebug() << "Invalid max_dev index: " << index; @@ -88,12 +85,9 @@ int maxdev_to_index(float max_dev) else if (max_dev < 20000.0) /* APT 17k */ return 2; - else if (max_dev < 40000.0) + else /* APT 25k */ return 3; - else - /* Broadcast FM 75k */ - return 4; } CDemodOptions::CDemodOptions(QWidget *parent) : diff --git a/src/qtgui/demod_options.ui b/src/qtgui/demod_options.ui index 8551310..a2c1539 100644 --- a/src/qtgui/demod_options.ui +++ b/src/qtgui/demod_options.ui @@ -122,11 +122,6 @@ this demodulator APT (25 kHz) - -
- -BC (75 kHz) -- From 05e45a05e4a77b865153610961a518792919f0fe Mon Sep 17 00:00:00 2001 From: Alexandru Csete
+Date: Sat, 7 Jan 2017 18:43:02 +0100 Subject: [PATCH 182/334] Add interface to retrieve filter low/high cut --- src/qtgui/plotter.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qtgui/plotter.h b/src/qtgui/plotter.h index 33708dd..f1421a6 100644 --- a/src/qtgui/plotter.h +++ b/src/qtgui/plotter.h @@ -70,6 +70,12 @@ class CPlotter : public QFrame drawOverlay(); } + void getHiLowCutFrequencies(int *LowCut, int *HiCut) + { + *LowCut = m_DemodLowCutFreq; + *HiCut = m_DemodHiCutFreq; + } + void setDemodRanges(int FLowCmin, int FLowCmax, int FHiCmin, int FHiCmax, bool symetric); /* Shown bandwidth around SetCenterFreq() */ From a55eabd60737e665a51a2504133515d5715a1272 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 7 Jan 2017 18:43:45 +0100 Subject: [PATCH 183/334] Restore filter width between sessions Issue #473. --- src/applications/gqrx/mainwindow.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 35fd7c6..4601ba2 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -579,6 +579,16 @@ bool MainWindow::loadConfig(const QString cfgfile, bool check_crash, setNewFrequency(ui->freqCtrl->getFrequency()); // ensure all GUI and RF is updated } + { + int flo = m_settings->value("receiver/filter_low_cut", 0).toInt(&conv_ok); + int fhi = m_settings->value("receiver/filter_high_cut", 0).toInt(&conv_ok); + + if (conv_ok && flo != fhi) + { + on_plotter_newFilterFreq(flo, fhi); + } + } + iq_tool->readSettings(m_settings); /* @@ -667,6 +677,16 @@ void MainWindow::storeSession() remote->saveSettings(m_settings); iq_tool->saveSettings(m_settings); + + { + int flo, fhi; + ui->plotter->getHiLowCutFrequencies(&flo, &fhi); + if (flo != fhi) + { + m_settings->setValue("receiver/filter_low_cut", flo); + m_settings->setValue("receiver/filter_high_cut", fhi); + } + } } } @@ -1850,7 +1870,7 @@ void MainWindow::on_plotter_newDemodFreq(qint64 freq, qint64 delta) rx->reset_rds_parser(); } -/* CPlotter::NewfilterFreq() is emitted */ +/* CPlotter::NewfilterFreq() is emitted or bookmark activated */ void MainWindow::on_plotter_newFilterFreq(int low, int high) { receiver::status retcode; From 175f3352f7c77b777f95e5432341659047449e3f Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 7 Jan 2017 18:51:21 +0100 Subject: [PATCH 184/334] Update news file --- resources/news.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/news.txt b/resources/news.txt index a21597e..04c67aa 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -1,10 +1,13 @@ 2.7: TBD... - NEW: Save remote control state between sessions. + NEW: Restore filter low cut and high cut between sessions. + NEW: Restore FM parameters between sessions. + NEW: Restore remote control state between sessions. NEW: Support for passband when setting mode through remote. FIXED: Keep waterfall zoom level and zoom slider synchronised. FIXED: RDS status is not kept while jumping through bookmark. IMPROVED: Tuning through the remote control interface. + IMPROVED: Increase narrow band receiver rate to 96 ksps (for APT). 2.6: Released October 3, 2016 From 970591e1b44c3817c96eba6ec6ce2fcc59d8102e Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 7 Jan 2017 23:16:24 +0100 Subject: [PATCH 185/334] Update FM de-emphasis filter to match fm_emph.py --- src/dsp/rx_demod_fm.cpp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/dsp/rx_demod_fm.cpp b/src/dsp/rx_demod_fm.cpp index 382060f..2835609 100644 --- a/src/dsp/rx_demod_fm.cpp +++ b/src/dsp/rx_demod_fm.cpp @@ -163,15 +163,25 @@ void rx_demod_fm::set_tau(double tau) /*! \brief Calculate taps for FM de-emph IIR filter. */ void rx_demod_fm::calculate_iir_taps(double tau) { - /* copied from fm_emph.py in gnuradio-core */ - double w_p, w_pp; - - w_p = 1.0/tau; - w_pp = tan(w_p / (d_quad_rate * 2.0)); /* prewarped analog freq */ - - d_fftaps[0] = w_pp/(1 + w_pp); - d_fftaps[1] = d_fftaps[0]; - + // copied from fm_emph.py in gr-analog + double w_c; // Digital corner frequency + double w_ca; // Prewarped analog corner frequency + double k, z1, p1, b0; + double fs = d_quad_rate; + + w_c = 1.0 / tau; + w_ca = 2.0 * fs * tan(w_c / (2.0 * fs)); + + // Resulting digital pole, zero, and gain term from the bilinear + // transformation of H(s) = w_ca / (s + w_ca) to + // H(z) = b0 (1 - z1 z^-1)/(1 - p1 z^-1) + k = -w_ca / (2.0 * fs); + z1 = -1.0; + p1 = (1.0 + k) / (1.0 - k); + b0 = -k / (1.0 - k); + + d_fftaps[0] = b0; + d_fftaps[1] = -z1 * b0; d_fbtaps[0] = 1.0; - d_fbtaps[1] = (w_pp - 1)/(w_pp + 1); + d_fbtaps[1] = -p1; } From 6a13e4eb5bd372da879d54f545aaf0147a94d2d1 Mon Sep 17 00:00:00 2001 From: Michael Tatarinov Date: Thu, 27 Oct 2016 13:53:10 +0400 Subject: [PATCH 186/334] Added a few fake command for better hamlib compatible. --- resources/remote-control.txt | 12 +++++- src/applications/gqrx/remote_control.cpp | 50 ++++++++++++++++++++++++ src/applications/gqrx/remote_control.h | 5 +++ 3 files changed, 66 insertions(+), 1 deletion(-) diff --git a/resources/remote-control.txt b/resources/remote-control.txt index e8dae22..0927644 100644 --- a/resources/remote-control.txt +++ b/resources/remote-control.txt @@ -28,7 +28,17 @@ Supported commands: LOS Loss of signal (LOS) event, stop audio recording \dump_state - Dump state (only usable for compatibility) + Dump state (only usable for hamlib compatibility) + v + Get 'VFO' (only usable for hamlib compatibility) + V + Set 'VFO' (only usable for hamlib compatibility) + s + Get 'Split' mode (only usable for hamlib compatibility) + S + Set 'Split' mode (only usable for hamlib compatibility) + _ + Get version Reply: diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index 68986f7..c77a70c 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -204,6 +204,16 @@ void RemoteControl::startRead() answer = cmd_get_func(cmdlist); else if (cmd == "U") answer = cmd_set_func(cmdlist); + else if (cmd == "v") + answer = cmd_get_vfo(); + else if (cmd == "V") + answer = cmd_set_vfo(cmdlist); + else if (cmd == "s") + answer = cmd_get_split_vfo(); + else if (cmd == "S") + answer = cmd_set_split_vfo(); + else if (cmd == "_") + answer = cmd_get_info(); else if (cmd == "AOS") answer = cmd_AOS(); else if (cmd == "LOS") @@ -622,6 +632,46 @@ QString RemoteControl::cmd_set_func(QStringList cmdlist) return answer; } +/* Get current 'VFO' (fake, only for hamlib) */ +QString RemoteControl::cmd_get_vfo() +{ + return QString("VFOA\n"); +}; + +/* Set 'VFO' (fake, only for hamlib) */ +QString RemoteControl::cmd_set_vfo(QStringList cmdlist) +{ + QString cmd_arg = cmdlist.value(1, ""); + QString answer; + + if (cmd_arg == "?") + answer = QString("VFOA\n"); + else if (cmd_arg == "VFOA") + answer = QString("RPRT 0\n"); + else + answer = QString("RPRT 1\n"); + + return answer; +}; + +/* Get 'Split' mode (fake, only for hamlib) */ +QString RemoteControl::cmd_get_split_vfo() +{ + return QString("0\nVFOA\n"); +}; + +/* Set 'Split' mode (fake, only for hamlib) */ +QString RemoteControl::cmd_set_split_vfo() +{ + return QString("RPRT 1\n"); +} + +/* Get info */ +QString RemoteControl::cmd_get_info() +{ + return QString("Gqrx %1\n").arg(VERSION); +}; + /* Gpredict / Gqrx specific command: AOS - satellite AOS event */ QString RemoteControl::cmd_AOS() { diff --git a/src/applications/gqrx/remote_control.h b/src/applications/gqrx/remote_control.h index 5b875d6..88effc2 100644 --- a/src/applications/gqrx/remote_control.h +++ b/src/applications/gqrx/remote_control.h @@ -136,6 +136,11 @@ private slots: QString cmd_set_level(QStringList cmdlist); QString cmd_get_func(QStringList cmdlist); QString cmd_set_func(QStringList cmdlist); + QString cmd_get_vfo(); + QString cmd_set_vfo(QStringList cmdlist); + QString cmd_get_split_vfo(); + QString cmd_set_split_vfo(); + QString cmd_get_info(); QString cmd_AOS(); QString cmd_LOS(); QString cmd_dump_state(); From e7f3c94cda57296c1c8784d261588c5e160e0903 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Mon, 9 Jan 2017 22:32:18 +0100 Subject: [PATCH 187/334] Add config record for resetting the digits in FreqCtrl Replaces pull request #477 and fixes issue #445. --- resources/news.txt | 1 + src/applications/gqrx/mainwindow.cpp | 4 ++++ src/qtgui/dockrxopt.cpp | 3 +++ src/qtgui/freqctrl.h | 4 ++++ 4 files changed, 12 insertions(+) diff --git a/resources/news.txt b/resources/news.txt index 04c67aa..d885f34 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -8,6 +8,7 @@ FIXED: RDS status is not kept while jumping through bookmark. IMPROVED: Tuning through the remote control interface. IMPROVED: Increase narrow band receiver rate to 96 ksps (for APT). + IMPROVED: Config record for reverting the behavior of the freq. controller 2.6: Released October 3, 2016 diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 4601ba2..1654867 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -453,6 +453,10 @@ bool MainWindow::loadConfig(const QString cfgfile, bool check_crash, restoreState(m_settings->value("gui/state", saveState()).toByteArray()); } + // misc GUI settings + bool_val = m_settings->value("gui/fctl_reset_digits", true).toBool(); + ui->freqCtrl->setResetLowerDigits(bool_val); + QString indev = m_settings->value("input/device", "").toString(); if (!indev.isEmpty()) { diff --git a/src/qtgui/dockrxopt.cpp b/src/qtgui/dockrxopt.cpp index 75fe3f8..92ac051 100644 --- a/src/qtgui/dockrxopt.cpp +++ b/src/qtgui/dockrxopt.cpp @@ -323,6 +323,9 @@ void DockRxOpt::readSettings(QSettings *settings) int int_val; double dbl_val; + bool bool_val = settings->value("gui/fctl_reset_digits", true).toBool(); + ui->filterFreq->setResetLowerDigits(bool_val); + int_val = settings->value("receiver/cwoffset", 700).toInt(&conv_ok); if (conv_ok) demodOpt->setCwOffset(int_val); diff --git a/src/qtgui/freqctrl.h b/src/qtgui/freqctrl.h index 5f7493c..cafcd3c 100644 --- a/src/qtgui/freqctrl.h +++ b/src/qtgui/freqctrl.h @@ -59,6 +59,10 @@ class CFreqCtrl : public QFrame void setHighlightColor(QColor cr); qint64 getFrequency() { return m_freq; } + void setResetLowerDigits(bool reset) { + m_ResetLowerDigits = reset; + } + signals: void newFrequency(qint64 freq); //emitted when frequency has changed From 487a8ffd5bd207be5ec92fdccdd81b60371ba1d3 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 12 Jan 2017 00:10:46 +0100 Subject: [PATCH 188/334] Make some members const --- src/applications/gqrx/remote_control.cpp | 10 +++++----- src/applications/gqrx/remote_control.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index c77a70c..51d06d2 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -469,7 +469,7 @@ QString RemoteControl::intToModeStr(int mode) } /* Get frequency */ -QString RemoteControl::cmd_get_freq() +QString RemoteControl::cmd_get_freq() const { return QString("%1\n").arg(rc_freq); } @@ -633,7 +633,7 @@ QString RemoteControl::cmd_set_func(QStringList cmdlist) } /* Get current 'VFO' (fake, only for hamlib) */ -QString RemoteControl::cmd_get_vfo() +QString RemoteControl::cmd_get_vfo() const { return QString("VFOA\n"); }; @@ -655,7 +655,7 @@ QString RemoteControl::cmd_set_vfo(QStringList cmdlist) }; /* Get 'Split' mode (fake, only for hamlib) */ -QString RemoteControl::cmd_get_split_vfo() +QString RemoteControl::cmd_get_split_vfo() const { return QString("0\nVFOA\n"); }; @@ -667,7 +667,7 @@ QString RemoteControl::cmd_set_split_vfo() } /* Get info */ -QString RemoteControl::cmd_get_info() +QString RemoteControl::cmd_get_info() const { return QString("Gqrx %1\n").arg(VERSION); }; @@ -697,7 +697,7 @@ QString RemoteControl::cmd_LOS() * https://github.com/N0NB/hamlib/blob/master/include/hamlib/rig.h (bit fields) * https://github.com/N0NB/hamlib/blob/master/dummy/netrigctl.c */ -QString RemoteControl::cmd_dump_state() +QString RemoteControl::cmd_dump_state() const { return QString( /* rigctl protocol version */ diff --git a/src/applications/gqrx/remote_control.h b/src/applications/gqrx/remote_control.h index 88effc2..1050f8d 100644 --- a/src/applications/gqrx/remote_control.h +++ b/src/applications/gqrx/remote_control.h @@ -128,7 +128,7 @@ private slots: QString intToModeStr(int mode); /* RC commands */ - QString cmd_get_freq(); + QString cmd_get_freq() const; QString cmd_set_freq(QStringList cmdlist); QString cmd_get_mode(); QString cmd_set_mode(QStringList cmdlist); @@ -136,14 +136,14 @@ private slots: QString cmd_set_level(QStringList cmdlist); QString cmd_get_func(QStringList cmdlist); QString cmd_set_func(QStringList cmdlist); - QString cmd_get_vfo(); + QString cmd_get_vfo() const; QString cmd_set_vfo(QStringList cmdlist); - QString cmd_get_split_vfo(); + QString cmd_get_split_vfo() const; QString cmd_set_split_vfo(); - QString cmd_get_info(); + QString cmd_get_info() const; QString cmd_AOS(); QString cmd_LOS(); - QString cmd_dump_state(); + QString cmd_dump_state() const; }; #endif // REMOTE_CONTROL_H From 0634769f3cdf0eab1406ab95f6227435f450fe94 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Wed, 18 Jan 2017 15:35:19 +0100 Subject: [PATCH 189/334] Use || for logical or --- src/qtgui/demod_options.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qtgui/demod_options.cpp b/src/qtgui/demod_options.cpp index 2359279..349bfb6 100644 --- a/src/qtgui/demod_options.cpp +++ b/src/qtgui/demod_options.cpp @@ -33,7 +33,7 @@ const int tau_tbl_maxidx = 7; double tau_from_index(int index) { - if (index < 0 or index > tau_tbl_maxidx) + if (index < 0 || index > tau_tbl_maxidx) return 0.0; return tau_tbl[index]; From 0f0830975d7d5759bb9b297078c0f94375f97408 Mon Sep 17 00:00:00 2001 From: dadosch Date: Sat, 28 Jan 2017 21:20:18 +0100 Subject: [PATCH 190/334] German translation for dekstop file --- gqrx.desktop | 1 + 1 file changed, 1 insertion(+) diff --git a/gqrx.desktop b/gqrx.desktop index 7c5807e..3814644 100644 --- a/gqrx.desktop +++ b/gqrx.desktop @@ -8,6 +8,7 @@ GenericName[ru]=Программно-определённое радио Comment[ru]=Приемник для программно-определенного радио (SDR) использующий GNU Radio и библиотеку Qt. GenericName[nl]=Software Defined Radio Comment[nl]=Software defined radio ontvanger geïmplementeerd met GNU Radio en de Qt GUI toolkit +Commenr[de]=Software defined Radio implementiert durch GNU Radio und das Qt GUI Toolkit Exec=gqrx Terminal=false Icon=gqrx From 79f781ee0c0524bc40d02076339aaf81f654d947 Mon Sep 17 00:00:00 2001 From: dadosch Date: Sat, 28 Jan 2017 21:30:42 +0100 Subject: [PATCH 191/334] improved naturality --- gqrx.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gqrx.desktop b/gqrx.desktop index 3814644..f9a9182 100644 --- a/gqrx.desktop +++ b/gqrx.desktop @@ -8,7 +8,7 @@ GenericName[ru]=Программно-определённое радио Comment[ru]=Приемник для программно-определенного радио (SDR) использующий GNU Radio и библиотеку Qt. GenericName[nl]=Software Defined Radio Comment[nl]=Software defined radio ontvanger geïmplementeerd met GNU Radio en de Qt GUI toolkit -Commenr[de]=Software defined Radio implementiert durch GNU Radio und das Qt GUI Toolkit +Commenr[de]=Software defined Radio auf Basis von GNU Radio und dem Qt GUI Toolkit Exec=gqrx Terminal=false Icon=gqrx From 96fc99d4a53ce64234b67be63173e55ee4b1759b Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sat, 28 Jan 2017 21:51:50 +0100 Subject: [PATCH 192/334] Fix typo --- gqrx.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gqrx.desktop b/gqrx.desktop index f9a9182..021a206 100644 --- a/gqrx.desktop +++ b/gqrx.desktop @@ -8,7 +8,7 @@ GenericName[ru]=Программно-определённое радио Comment[ru]=Приемник для программно-определенного радио (SDR) использующий GNU Radio и библиотеку Qt. GenericName[nl]=Software Defined Radio Comment[nl]=Software defined radio ontvanger geïmplementeerd met GNU Radio en de Qt GUI toolkit -Commenr[de]=Software defined Radio auf Basis von GNU Radio und dem Qt GUI Toolkit +Comment[de]=Software defined Radio auf Basis von GNU Radio und dem Qt GUI Toolkit Exec=gqrx Terminal=false Icon=gqrx From f0078b19f363c5c5eef2b3c5be45789df2c469fe Mon Sep 17 00:00:00 2001 From: Alexander Fasching Date: Fri, 10 Feb 2017 17:43:00 +0100 Subject: [PATCH 193/334] Check if audio sink is connected before disconnecting --- src/applications/gqrx/receiver.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/applications/gqrx/receiver.cpp b/src/applications/gqrx/receiver.cpp index 59017a6..4c5fcbb 100644 --- a/src/applications/gqrx/receiver.cpp +++ b/src/applications/gqrx/receiver.cpp @@ -272,8 +272,11 @@ void receiver::set_output_device(const std::string device) tb->lock(); - tb->disconnect(audio_gain0, 0, audio_snk, 0); - tb->disconnect(audio_gain1, 0, audio_snk, 1); + if (d_demod != RX_DEMOD_OFF) + { + tb->disconnect(audio_gain0, 0, audio_snk, 0); + tb->disconnect(audio_gain1, 0, audio_snk, 1); + } audio_snk.reset(); #ifdef WITH_PULSEAUDIO @@ -284,8 +287,11 @@ void receiver::set_output_device(const std::string device) audio_snk = gr::audio::sink::make(d_audio_rate, device, true); #endif - tb->connect(audio_gain0, 0, audio_snk, 0); - tb->connect(audio_gain1, 0, audio_snk, 1); + if (d_demod != RX_DEMOD_OFF) + { + tb->connect(audio_gain0, 0, audio_snk, 0); + tb->connect(audio_gain1, 0, audio_snk, 1); + } tb->unlock(); } From a038f897fc168ce981ab56a2ba0f41518ba6f7ce Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 12 Feb 2017 17:13:35 +0100 Subject: [PATCH 194/334] Properly restore AGC on/off setting --- src/qtgui/dockrxopt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qtgui/dockrxopt.cpp b/src/qtgui/dockrxopt.cpp index 92ac051..1f234c7 100644 --- a/src/qtgui/dockrxopt.cpp +++ b/src/qtgui/dockrxopt.cpp @@ -463,6 +463,8 @@ void DockRxOpt::saveSettings(QSettings *settings) // AGC Off if (ui->agcPresetCombo->currentIndex() == 4) settings->setValue("receiver/agc_off", true); + else + settings->remove("receiver/agc_off"); } /** From f5fec3d9adf13a6a23816d5558f333ba434863c2 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 12 Feb 2017 17:20:53 +0100 Subject: [PATCH 195/334] Use convention CW=USB and CWR=LSB --- src/applications/gqrx/remote_control.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index 51d06d2..c7707b4 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -380,7 +380,7 @@ int RemoteControl::modeStrToInt(QString mode_str) } else if (mode_str.compare("CW", Qt::CaseInsensitive) == 0) { - mode_int = 8; + mode_int = 9; hamlib_compatible = true; } else if (mode_str.compare("CWL", Qt::CaseInsensitive) == 0) @@ -390,7 +390,7 @@ int RemoteControl::modeStrToInt(QString mode_str) } else if (mode_str.compare("CWR", Qt::CaseInsensitive) == 0) { - mode_int = 9; + mode_int = 8; hamlib_compatible = true; } else if (mode_str.compare("CWU", Qt::CaseInsensitive) == 0) @@ -449,11 +449,11 @@ QString RemoteControl::intToModeStr(int mode) break; case 8: - mode_str = (hamlib_compatible) ? "CW" : "CWL"; + mode_str = (hamlib_compatible) ? "CWR" : "CWL"; break; case 9: - mode_str = (hamlib_compatible) ? "CWR" : "CWU"; + mode_str = (hamlib_compatible) ? "CW" : "CWU"; break; case 10: @@ -504,7 +504,7 @@ QString RemoteControl::cmd_set_mode(QStringList cmdlist) QString cmd_arg = cmdlist.value(1, ""); if (cmd_arg == "?") - answer = QString("OFF RAW AM FM WFM WFM_ST WFM_ST_OIRT LSB USB CW CWL CWR CWU\n"); + answer = QString("OFF RAW AM FM WFM WFM_ST WFM_ST_OIRT LSB USB CW CWU CWR CWL\n"); else { int mode = modeStrToInt(cmd_arg); From c705aff8c9876108952a543d4ff03e81bd20f2e8 Mon Sep 17 00:00:00 2001 From: Alexander Fasching Date: Thu, 16 Feb 2017 15:49:30 +0100 Subject: [PATCH 196/334] Add checkbox to select freqCtrl reset behavior * Button is added to input-control widget * Reset enabled by default --- src/applications/gqrx/mainwindow.cpp | 12 ++++++++---- src/applications/gqrx/mainwindow.h | 1 + src/qtgui/dockinputctl.cpp | 23 +++++++++++++++++++++++ src/qtgui/dockinputctl.h | 4 ++++ src/qtgui/dockinputctl.ui | 10 ++++++++++ 5 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 1654867..f9309d0 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -192,6 +192,7 @@ MainWindow::MainWindow(const QString cfgfile, bool edit_conf, QWidget *parent) : connect(uiDockInputCtl, SIGNAL(iqBalanceChanged(bool)), this, SLOT(setIqBalance(bool))); connect(uiDockInputCtl, SIGNAL(ignoreLimitsChanged(bool)), this, SLOT(setIgnoreLimits(bool))); connect(uiDockInputCtl, SIGNAL(antennaSelected(QString)), this, SLOT(setAntenna(QString))); + connect(uiDockInputCtl, SIGNAL(freqCtrlResetChanged(bool)), this, SLOT(setFreqCtrlReset(bool))); connect(uiDockRxOpt, SIGNAL(filterOffsetChanged(qint64)), this, SLOT(setFilterOffset(qint64))); connect(uiDockRxOpt, SIGNAL(filterOffsetChanged(qint64)), remote, SLOT(setFilterOffset(qint64))); connect(uiDockRxOpt, SIGNAL(demodSelected(int)), this, SLOT(selectDemod(int))); @@ -453,10 +454,6 @@ bool MainWindow::loadConfig(const QString cfgfile, bool check_crash, restoreState(m_settings->value("gui/state", saveState()).toByteArray()); } - // misc GUI settings - bool_val = m_settings->value("gui/fctl_reset_digits", true).toBool(); - ui->freqCtrl->setResetLowerDigits(bool_val); - QString indev = m_settings->value("input/device", "").toString(); if (!indev.isEmpty()) { @@ -932,6 +929,13 @@ void MainWindow::setIgnoreLimits(bool ignore_limits) setNewFrequency(freq); } + +/** Reset lower digits of main frequency control widget */ +void MainWindow::setFreqCtrlReset(bool enabled) +{ + ui->freqCtrl->setResetLowerDigits(enabled); +} + /** * @brief Select new demodulator. * @param demod New demodulator. diff --git a/src/applications/gqrx/mainwindow.h b/src/applications/gqrx/mainwindow.h index 01b23b0..3d334de 100644 --- a/src/applications/gqrx/mainwindow.h +++ b/src/applications/gqrx/mainwindow.h @@ -139,6 +139,7 @@ private slots: void setDcCancel(bool enabled); void setIqBalance(bool enabled); void setIgnoreLimits(bool ignore_limits); + void setFreqCtrlReset(bool enabled); void selectDemod(QString demod); void selectDemod(int index); void setFmMaxdev(float max_dev); diff --git a/src/qtgui/dockinputctl.cpp b/src/qtgui/dockinputctl.cpp index 033d8d7..3a299b8 100644 --- a/src/qtgui/dockinputctl.cpp +++ b/src/qtgui/dockinputctl.cpp @@ -104,6 +104,11 @@ void DockInputCtl::readSettings(QSettings * settings) emit gainChanged(gain_name, gain_value); } } + + // misc GUI settings + bool_val = settings->value("gui/fctl_reset_digits", true).toBool(); + emit freqCtrlResetChanged(bool_val); + ui->freqCtrlResetButton->setChecked(bool_val); } void DockInputCtl::saveSettings(QSettings * settings) @@ -159,6 +164,12 @@ void DockInputCtl::saveSettings(QSettings * settings) settings->setValue("input/antenna", ui->antSelector->currentText()); else settings->remove("input/antenna"); + + // Remember state of freqReset button. Default is checked. + if (!ui->freqCtrlResetButton->isChecked()) + settings->setValue("gui/fctl_reset_digits", false); + else + settings->remove("gui/fctl_reset_digits"); } void DockInputCtl::readLnbLoFromSettings(QSettings * settings) @@ -325,6 +336,12 @@ void DockInputCtl::setAntenna(const QString &antenna) ui->antSelector->setCurrentIndex(index); } +/** Enable/disable resetting lower digits on freqCtrl widgets */ +void DockInputCtl::setFreqCtrlReset(bool enabled) +{ + ui->freqCtrlResetButton->setChecked(enabled); +} + /** * Set gain stages. * @param gain_list A list containing the gain stages for this device. @@ -484,6 +501,12 @@ void DockInputCtl::on_antSelector_currentIndexChanged(const QString &antenna) emit antennaSelected(antenna); } +/** Reset box has changed */ +void DockInputCtl::on_freqCtrlResetButton_toggled(bool checked) +{ + emit freqCtrlResetChanged(checked); +} + /** Remove all widgets from the lists. */ void DockInputCtl::clearWidgets() { diff --git a/src/qtgui/dockinputctl.h b/src/qtgui/dockinputctl.h index 945f7d9..a6974df 100644 --- a/src/qtgui/dockinputctl.h +++ b/src/qtgui/dockinputctl.h @@ -101,6 +101,8 @@ class DockInputCtl : public QDockWidget void setGainStages(gain_list_t &gain_list); void restoreManualGains(QSettings *settings); + void setFreqCtrlReset(bool enabled); + signals: void gainChanged(QString name, double value); void autoGainChanged(bool enabled); @@ -111,6 +113,7 @@ class DockInputCtl : public QDockWidget void iqBalanceChanged(bool enabled); void ignoreLimitsChanged(bool ignore); void antennaSelected(QString antenna); + void freqCtrlResetChanged(bool enabled); private slots: void on_lnbSpinBox_valueChanged(double value); @@ -121,6 +124,7 @@ private slots: void on_iqBalanceButton_toggled(bool checked); void on_ignoreButton_toggled(bool checked); void on_antSelector_currentIndexChanged(const QString &antenna); + void on_freqCtrlResetButton_toggled(bool checked); void sliderValueChanged(int value); diff --git a/src/qtgui/dockinputctl.ui b/src/qtgui/dockinputctl.ui index fac3443..4d21b4b 100644 --- a/src/qtgui/dockinputctl.ui +++ b/src/qtgui/dockinputctl.ui @@ -214,6 +214,16 @@ - +
+ ++ +Reset lower digits of main frequency control widget ++ +Reset frequency control +- +
From 89097d95379a339f828ed21af8490331a7872eb4 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 16 Feb 2017 20:11:00 +0100 Subject: [PATCH 197/334] Minor UI tweaks on inputctl --- src/qtgui/dockinputctl.ui | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/qtgui/dockinputctl.ui b/src/qtgui/dockinputctl.ui index 4d21b4b..6c08f55 100644 --- a/src/qtgui/dockinputctl.ui +++ b/src/qtgui/dockinputctl.ui @@ -214,13 +214,20 @@ - +
+ ++ +Qt::Horizontal +- From ade22f9fb723ddf0f2619d198eaf8596794878cb Mon Sep 17 00:00:00 2001 From: Alexandru Csete
- Reset lower digits of main frequency control widget +<html><head/><body><p>Reset subordinate digits in main frequency control widget</p></body></html> - Reset frequency control +Reset frequency controller digits Date: Thu, 16 Feb 2017 20:25:56 +0100 Subject: [PATCH 198/334] Update news.txt --- resources/news.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/news.txt b/resources/news.txt index d885f34..244bb08 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -8,7 +8,11 @@ FIXED: RDS status is not kept while jumping through bookmark. IMPROVED: Tuning through the remote control interface. IMPROVED: Increase narrow band receiver rate to 96 ksps (for APT). - IMPROVED: Config record for reverting the behavior of the freq. controller + + + 2.6.1: Released February 16, 2017 + + IMPROVED: Option for reverting the behavior of the frequency controller. 2.6: Released October 3, 2016 From 80f008f066aa5495509dc2ae865a75c57b1971f7 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 19 Feb 2017 12:23:43 +0100 Subject: [PATCH 199/334] Add example sample rates for LimeSDR --- resources/news.txt | 1 + src/qtgui/ioconfig.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/resources/news.txt b/resources/news.txt index 244bb08..4fbdc89 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -8,6 +8,7 @@ FIXED: RDS status is not kept while jumping through bookmark. IMPROVED: Tuning through the remote control interface. IMPROVED: Increase narrow band receiver rate to 96 ksps (for APT). + IMPROVED: LimeSDR integration. 2.6.1: Released February 16, 2017 diff --git a/src/qtgui/ioconfig.cpp b/src/qtgui/ioconfig.cpp index 557cdf6..43bb8d4 100644 --- a/src/qtgui/ioconfig.cpp +++ b/src/qtgui/ioconfig.cpp @@ -552,6 +552,24 @@ void CIoConfig::updateInputSampleRates(int rate) else ui->inSrCombo->setCurrentIndex(9); // select 2048 kHz } + else if (ui->inDevEdit->text().contains("lime")) + { + ui->inSrCombo->addItem("100000"); + ui->inSrCombo->addItem("500000"); + ui->inSrCombo->addItem("1000000"); + ui->inSrCombo->addItem("2500000"); + ui->inSrCombo->addItem("5000000"); + ui->inSrCombo->addItem("10000000"); + ui->inSrCombo->addItem("20000000"); + ui->inSrCombo->addItem("50000000"); + if (rate > 0) + { + ui->inSrCombo->insertItem(0, QString("%1").arg(rate)); + ui->inSrCombo->setCurrentIndex(0); + } + else + ui->inSrCombo->setCurrentIndex(4); // select 5 MHz + } else { if (rate > 0) From 958266aa276db80afa8b1a3d08a16b30e4c85499 Mon Sep 17 00:00:00 2001 From: Alexander Fasching Date: Thu, 2 Mar 2017 10:31:45 +0100 Subject: [PATCH 200/334] Check if new and old file are equal --- src/applications/gqrx/mainwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index f9309d0..e3fb659 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -635,6 +635,11 @@ bool MainWindow::saveConfig(const QString cfgfile) else newfile = QString("%1/%2").arg(m_cfg_dir).arg(cfgfile); + if (newfile == oldfile) { + qDebug() << "New file is equal to old file => SYNCING..."; + return true; + } + if (QFile::exists(newfile)) { qDebug() << "File" << newfile << "already exists => DELETING..."; From 66fe433ba5c9b74e7d2cefd7c35fc484b7938511 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 2 Mar 2017 23:55:37 +0100 Subject: [PATCH 201/334] Enable custom Airspy kernels by default --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b73dc31..291e609 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,7 +105,7 @@ find_package(Gnuradio REQUIRED) find_package(Gnuradio-osmosdr REQUIRED) if(NOT GNURADIO_RUNTIME_FOUND) - message(FATAL_ERROR "GnuRadio Runtime required to compile gr-air-modes") + message(FATAL_ERROR "GnuRadio Runtime required to compile gqrx") endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") @@ -147,7 +147,7 @@ endif() # Airspy optimizations that require modified gr-osmosdr -option(CUSTOM_AIRSPY_KERNELS "Enable non-standard Airspy optimizations" OFF) +option(CUSTOM_AIRSPY_KERNELS "Enable non-standard Airspy optimizations" ON) if(CUSTOM_AIRSPY_KERNELS) add_definitions(-DCUSTOM_AIRSPY_KERNELS) endif(CUSTOM_AIRSPY_KERNELS) From 74db13fefd8d99eaebebad580fab2ffd15ca79ff Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 5 Mar 2017 17:47:04 +0100 Subject: [PATCH 202/334] Update news.txt --- resources/news.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/news.txt b/resources/news.txt index 4fbdc89..d0131e5 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -6,6 +6,7 @@ NEW: Support for passband when setting mode through remote. FIXED: Keep waterfall zoom level and zoom slider synchronised. FIXED: RDS status is not kept while jumping through bookmark. + FIXED: .conf files are deleted when changes are saved. IMPROVED: Tuning through the remote control interface. IMPROVED: Increase narrow band receiver rate to 96 ksps (for APT). IMPROVED: LimeSDR integration. From 821576b91ccc187059a4fd77550f38cbb18a5ac9 Mon Sep 17 00:00:00 2001 From: Alexander Fasching Date: Tue, 14 Mar 2017 21:14:18 +0100 Subject: [PATCH 203/334] Disable detected proxy settings --- src/applications/gqrx/remote_control.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index c7707b4..f0afa59 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -49,6 +49,9 @@ RemoteControl::RemoteControl(QObject *parent) : rc_socket = 0; + // Disable proxy setting detected by Qt + rc_server.setProxy(QNetworkProxy::NoProxy); + connect(&rc_server, SIGNAL(newConnection()), this, SLOT(acceptConnection())); } From a6c92ad9c5ecece675191da296757be331fddadc Mon Sep 17 00:00:00 2001 From: Alexander Fasching Date: Tue, 14 Mar 2017 22:37:59 +0100 Subject: [PATCH 204/334] Add workaround for Qt versions < 5.9 --- src/applications/gqrx/remote_control.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/applications/gqrx/remote_control.cpp b/src/applications/gqrx/remote_control.cpp index f0afa59..705b661 100644 --- a/src/applications/gqrx/remote_control.cpp +++ b/src/applications/gqrx/remote_control.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include "remote_control.h" #define DEFAULT_RC_PORT 7356 @@ -49,8 +50,12 @@ RemoteControl::RemoteControl(QObject *parent) : rc_socket = 0; +#if QT_VERSION < 0x050900 // Disable proxy setting detected by Qt + // Workaround for https://bugreports.qt.io/browse/QTBUG-58374 + // Fix: https://codereview.qt-project.org/#/c/186124/ rc_server.setProxy(QNetworkProxy::NoProxy); +#endif connect(&rc_server, SIGNAL(newConnection()), this, SLOT(acceptConnection())); From 8bcbd96aeb7274a312b85b270a8fb311ea989b52 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Wed, 15 Mar 2017 00:39:56 +0100 Subject: [PATCH 205/334] Update news.txt --- resources/news.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/news.txt b/resources/news.txt index d0131e5..5ba868f 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -7,6 +7,7 @@ FIXED: Keep waterfall zoom level and zoom slider synchronised. FIXED: RDS status is not kept while jumping through bookmark. FIXED: .conf files are deleted when changes are saved. + FIXED: Remote control not working if $http_proxy is set. IMPROVED: Tuning through the remote control interface. IMPROVED: Increase narrow band receiver rate to 96 ksps (for APT). IMPROVED: LimeSDR integration. From 36f94578d5abe2cbb626c83b2c122895a5a865e9 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 16 Mar 2017 00:15:09 +0100 Subject: [PATCH 206/334] Add spin button for entering receiver frequency --- src/applications/gqrx/mainwindow.cpp | 3 + src/qtgui/dockrxopt.cpp | 18 ++ src/qtgui/dockrxopt.h | 6 + src/qtgui/dockrxopt.ui | 454 +++++++++++++++------------ 4 files changed, 272 insertions(+), 209 deletions(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index e3fb659..72725cc 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -183,6 +183,7 @@ MainWindow::MainWindow(const QString cfgfile, bool edit_conf, QWidget *parent) : connect(ui->freqCtrl, SIGNAL(newFrequency(qint64)), this, SLOT(setNewFrequency(qint64))); connect(ui->freqCtrl, SIGNAL(newFrequency(qint64)), remote, SLOT(setNewFrequency(qint64))); connect(ui->freqCtrl, SIGNAL(newFrequency(qint64)), uiDockAudio, SLOT(setRxFrequency(qint64))); + connect(ui->freqCtrl, SIGNAL(newFrequency(qint64)), uiDockRxOpt, SLOT(setRxFreq(qint64))); connect(uiDockInputCtl, SIGNAL(lnbLoChanged(double)), this, SLOT(setLnbLo(double))); connect(uiDockInputCtl, SIGNAL(gainChanged(QString, double)), this, SLOT(setGain(QString,double))); connect(uiDockInputCtl, SIGNAL(autoGainChanged(bool)), this, SLOT(setAutoGain(bool))); @@ -193,6 +194,7 @@ MainWindow::MainWindow(const QString cfgfile, bool edit_conf, QWidget *parent) : connect(uiDockInputCtl, SIGNAL(ignoreLimitsChanged(bool)), this, SLOT(setIgnoreLimits(bool))); connect(uiDockInputCtl, SIGNAL(antennaSelected(QString)), this, SLOT(setAntenna(QString))); connect(uiDockInputCtl, SIGNAL(freqCtrlResetChanged(bool)), this, SLOT(setFreqCtrlReset(bool))); + connect(uiDockRxOpt, SIGNAL(rxFreqChanged(qint64)), ui->freqCtrl, SLOT(setFrequency(qint64))); connect(uiDockRxOpt, SIGNAL(filterOffsetChanged(qint64)), this, SLOT(setFilterOffset(qint64))); connect(uiDockRxOpt, SIGNAL(filterOffsetChanged(qint64)), remote, SLOT(setFilterOffset(qint64))); connect(uiDockRxOpt, SIGNAL(demodSelected(int)), this, SLOT(selectDemod(int))); @@ -744,6 +746,7 @@ void MainWindow::updateFrequencyRange() qint64 stop = (qint64)(rx->get_filter_offset()) + d_hw_freq_stop + d_lnb_lo; ui->freqCtrl->setup(10, start, stop, 1, UNITS_MHZ); + uiDockRxOpt->setRxFreqRange(start, stop); } /** diff --git a/src/qtgui/dockrxopt.cpp b/src/qtgui/dockrxopt.cpp index 1f234c7..ede6b1e 100644 --- a/src/qtgui/dockrxopt.cpp +++ b/src/qtgui/dockrxopt.cpp @@ -467,6 +467,24 @@ void DockRxOpt::saveSettings(QSettings *settings) settings->remove("receiver/agc_off"); } +/** RX frequency changed through spin box */ +void DockRxOpt::on_freqSpinBox_valueChanged(double freq) +{ + emit rxFreqChanged(1.e3 * freq); +} + +void DockRxOpt::setRxFreq(qint64 freq_hz) +{ + ui->freqSpinBox->blockSignals(true); + ui->freqSpinBox->setValue(1.e-3 * (double)freq_hz); + ui->freqSpinBox->blockSignals(false); +} + +void DockRxOpt::setRxFreqRange(qint64 min_hz, qint64 max_hz) +{ + ui->freqSpinBox->setRange(1.e-3 * (double)min_hz, 1.e-3 * (double)max_hz); +} + /** * @brief Channel filter offset has changed * @param freq The new filter offset in Hz diff --git a/src/qtgui/dockrxopt.h b/src/qtgui/dockrxopt.h index 3564992..1bb47ed 100644 --- a/src/qtgui/dockrxopt.h +++ b/src/qtgui/dockrxopt.h @@ -94,6 +94,7 @@ class DockRxOpt : public QDockWidget int currentFilterShape() const; void setHwFreq(qint64 freq_hz); + void setRxFreqRange(qint64 min_hz, qint64 max_hz); int currentDemod() const; QString currentDemodAsString(); @@ -111,6 +112,7 @@ class DockRxOpt : public QDockWidget static bool IsModulationValid(QString strModulation); public slots: + void setRxFreq(qint64 freq_hz); void setCurrentDemod(int demod); void setFilterOffset(qint64 freq_hz); void setSquelchLevel(double level); @@ -121,6 +123,9 @@ public slots: unsigned int filterIdxFromLoHi(int lo, int hi) const; signals: + /** Signal emitted when receiver frequency has changed */ + void rxFreqChanged(qint64 freq_hz); + /** Signal emitted when the channel filter frequency has changed. */ void filterOffsetChanged(qint64 freq_hz); @@ -173,6 +178,7 @@ public slots: void cwOffsetChanged(int offset); private slots: + void on_freqSpinBox_valueChanged(double freq); void on_filterFreq_newFrequency(qint64 freq); void on_filterCombo_activated(int index); void on_modeSelector_activated(int index); diff --git a/src/qtgui/dockrxopt.ui b/src/qtgui/dockrxopt.ui index b66265a..7fbef4c 100644 --- a/src/qtgui/dockrxopt.ui +++ b/src/qtgui/dockrxopt.ui @@ -7,7 +7,7 @@ 0 0 266 -300 +313 @@ -19,7 +19,7 @@ 266 -300 +313 @@ -134,23 +134,150 @@ This is an offset from the hardware RF frequency.</p></body></htm - 5 - -
-+ - +
++ ++ ++ +0 +0 ++ ++ +50 +30 ++ ++ +16777215 +16777215 ++ +Set squelch to the current signal or noise level ++ +A ++ ++ +16 +16 +- +
-+ 0 0 + Squelch level in dB below full scale +- Filter width +Squelch Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - +
- +
++ ++ ++ +0 +0 ++ ++ +50 +30 ++ ++ +16777215 +16777215 ++ +AGC options ++ +... ++ ++ +16 +16 ++ +false +- +
++ ++ ++ +0 +0 ++ +Demodulator type (mode) ++ +Demodulator type (mode) ++ +-1 ++ +30 +- +
++ ++ ++ +0 +0 ++ ++ +50 +30 ++ ++ +16777215 +16777215 ++ +Noise blanker options ++ +Noise blanker options ++ +... +true @@ -189,54 +316,44 @@ This is an offset from the hardware RF frequency.</p></body></htm- -
+ - +
-- - -+ 0 0 - Filter shape ++ Squelch level in dB below full scale - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - -
-- - - +0 -0 -+ -true - Select the filter shape ++ -dBFS + - 1 - -
-- -Soft -- -
-- -Normal -- -
+- -Sharp -+ +-150.000000000000000 ++ +0.000000000000000 ++ +1.000000000000000 ++ -150.000000000000000 +- +
- -
@@ -258,29 +375,42 @@ This is an offset from the hardware RF frequency.</p></body></htm - -
-+ - +
++ - + 0 0 - -Demodulator type (mode) +Noise blanker settings - Demodulator type (mode) ++ -Noise blanker - -1 ++ -Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - 30 +- +
-+ + ++ +0 +0 ++ +Filter shape ++ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - +
- -
@@ -317,7 +447,23 @@ This is an offset from the hardware RF frequency.</p></body></htm - +
- +
++ ++ ++ +0 +0 ++ +Filter width ++ +Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter +- -
@@ -333,7 +479,7 @@ This is an offset from the hardware RF frequency.</p></body></htm - +
true @@ -377,64 +523,8 @@ This is an offset from the hardware RF frequency.</p></body></htm- -
-- -- -- -0 -0 -- -- -50 -30 -- -- -16777215 -16777215 -- -AGC options -- -... -- -- -16 -16 -- -false -- -
-- -- -- -0 -0 -- -Squelch level in dB below full scale -- -Squelch -- -Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter -- -
+ - +
-- 0 @@ -442,88 +532,29 @@ This is an offset from the hardware RF frequency.</p></body></htm- -Squelch level in dB below full scale -- -Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter -- -true -- -dBFS +Select the filter shape + - 1 - --150.000000000000000 -- -0.000000000000000 -- -1.000000000000000 -- --150.000000000000000 -- -
-- -- -- -0 -0 -- -- -50 -30 -- -- -16777215 -16777215 -- -Set squelch to the current signal or noise level -- -A -- -- -16 -16 -- -
-- - -- -0 -0 -- -Noise blanker settings -- -Noise blanker -- +Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter -- +
++ +Soft +- +
++ +Normal +- +
+ +Sharp +- +
-5 @@ -604,34 +635,39 @@ This is an offset from the hardware RF frequency.</p></body></htm- -
- - - +0 -0 -- +
++ ++ -Frequency - - +50 -30 -+ -Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - +16777215 -16777215 -- +
++ ++ -Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - Noise blanker options ++ -3 - Noise blanker options ++ +24000.000000000000000 + +2200000.000000000000000 ++ +144500.000000000000000 +- +
From c157d00352bf6688cf03903c921bd8a88b372935 Mon Sep 17 00:00:00 2001 From: Alexandru Csete- ... +kHz Date: Thu, 16 Mar 2017 00:22:48 +0100 Subject: [PATCH 207/334] Set accessibleName property for some control widgets --- src/qtgui/dockrxopt.ui | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/src/qtgui/dockrxopt.ui b/src/qtgui/dockrxopt.ui index 7fbef4c..89e47a7 100644 --- a/src/qtgui/dockrxopt.ui +++ b/src/qtgui/dockrxopt.ui @@ -157,6 +157,9 @@ This is an offset from the hardware RF frequency.</p></body></htm + Set squelch to the current signal or noise level + Auto squelch +@@ -210,6 +213,9 @@ This is an offset from the hardware RF frequency.</p></body></htm A + AGC options + AGC options +@@ -238,6 +244,9 @@ This is an offset from the hardware RF frequency.</p></body></htm ... + Demodulator type (mode) + Mode +@@ -272,6 +281,9 @@ This is an offset from the hardware RF frequency.</p></body></htm -1 + Noise blanker options + Noise blanker options +@@ -291,6 +303,9 @@ This is an offset from the hardware RF frequency.</p></body></htm ... + Apply mode dependent filter preset + Filter width +@@ -327,6 +342,9 @@ This is an offset from the hardware RF frequency.</p></body></htm 1 + Squelch level in dB below full scale + Squelch +@@ -433,6 +451,9 @@ This is an offset from the hardware RF frequency.</p></body></htm Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Demodulator options + Mode options +@@ -493,6 +514,9 @@ This is an offset from the hardware RF frequency.</p></body></htm ... + AGC presets + AGC +@@ -534,6 +558,9 @@ This is an offset from the hardware RF frequency.</p></body></htm 1 + Select the filter shape + Filter shape +@@ -588,6 +615,9 @@ This is an offset from the hardware RF frequency.</p></body></htm 1 + + Noise blanker 1 +@@ -625,6 +655,9 @@ This is an offset from the hardware RF frequency.</p></body></htm NB1 + + Noise blanker 2 +@@ -647,6 +680,12 @@ This is an offset from the hardware RF frequency.</p></body></htm NB2 + + +Receiver frequency ++ Frequency +@@ -698,8 +737,18 @@ This is an offset from the hardware RF frequency.</p></body></htm Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + freqSpinBox +filterCombo +filterShapeCombo +modeSelector +modeButton +agcPresetCombo +agcButton +sqlSpinBox +autoSquelchButton nb1Button nb2Button +nbOptButton From 4a66a03fcdd5ef1d929825d67793b0111c81e79a Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 16 Mar 2017 00:23:00 +0100 Subject: [PATCH 208/334] Update news file --- resources/news.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/news.txt b/resources/news.txt index 5ba868f..77f6ac3 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -4,6 +4,7 @@ NEW: Restore FM parameters between sessions. NEW: Restore remote control state between sessions. NEW: Support for passband when setting mode through remote. + NEW: Widget to enter receiver frequency. FIXED: Keep waterfall zoom level and zoom slider synchronised. FIXED: RDS status is not kept while jumping through bookmark. FIXED: .conf files are deleted when changes are saved. @@ -11,6 +12,7 @@ IMPROVED: Tuning through the remote control interface. IMPROVED: Increase narrow band receiver rate to 96 ksps (for APT). IMPROVED: LimeSDR integration. + IMPROVED: Voiceover interface. 2.6.1: Released February 16, 2017 From 76026656a2d6db73e5b3f2b5a92d58914b6ba6e3 Mon Sep 17 00:00:00 2001 From: Panagiotis Nikolaou Date: Sat, 25 Mar 2017 14:33:37 -0700 Subject: [PATCH 209/334] Add Accessories categorie for xfce Xfce missing Network and HamRadio caregories. --- gqrx.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gqrx.desktop b/gqrx.desktop index 021a206..5bd3085 100644 --- a/gqrx.desktop +++ b/gqrx.desktop @@ -12,5 +12,5 @@ Comment[de]=Software defined Radio auf Basis von GNU Radio und dem Qt GUI Toolki Exec=gqrx Terminal=false Icon=gqrx -Categories=Network;HamRadio; +Categories=Network;HamRadio;Accessories; Keywords=SDR;Radio;HAM; From 1ad103e293ae3956ed291afe0138a1da724a869c Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 2 Apr 2017 20:16:37 +0200 Subject: [PATCH 210/334] Add two-stage FIR decimator design by Youssef Touil --- src/dsp/filter/fir_decim.cpp | 117 +++ src/dsp/filter/fir_decim_coef.h | 1437 +++++++++++++++++++++++++++++++ 2 files changed, 1554 insertions(+) diff --git a/src/dsp/filter/fir_decim.cpp b/src/dsp/filter/fir_decim.cpp index 192c63e..d7fdf64 100644 --- a/src/dsp/filter/fir_decim.cpp +++ b/src/dsp/filter/fir_decim.cpp @@ -4,6 +4,7 @@ * http://gqrx.dk/ * * Copyright 2016 Alexandru Csete OZ9AEC. + * Copyright 2017 Youssef Touil. * * Gqrx is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,6 +31,68 @@ #include "fir_decim.h" #include "fir_decim_coef.h" +#ifdef USE_NEW_FIR_DECIM +struct decimation_stage +{ + int decimation; + int ratio; + int length; + const float *kernel; +}; + +static const int decimation_stage_count = 8; +static const decimation_stage decimation_stages[] = +{ + { + 2, + 2, + d_2_r_2_len, + d_2_r_2_kernel + }, + { + 4, + 4, + d_4_r_4_len, + d_4_r_4_kernel + }, + { + 8, + 8, + d_8_r_8_len, + d_8_r_8_kernel + }, + { + 16, + 8, + d_16_r_8_len, + d_16_r_8_kernel + }, + { + 32, + 16, + d_32_r_16_len, + d_32_r_16_kernel + }, + { + 64, + 32, + d_64_r_32_len, + d_64_r_32_kernel + }, + { + 128, + 32, + d_128_r_32_len, + d_128_r_32_kernel + }, + { + 256, + 64, + d_256_r_64_len, + d_256_r_64_kernel + } +}; +#endif fir_decim_cc_sptr make_fir_decim_cc(unsigned int decim) { @@ -43,6 +106,59 @@ fir_decim_cc::fir_decim_cc(unsigned int decim) { std::vector taps; +#ifdef USE_NEW_FIR_DECIM + int this_stage = 0; + int index = decimation_stage_count - 1; + + std::cout << "Decimation: " << decim << std::endl; + while (decim > 1 && index >= 0) + { + auto stage = &decimation_stages[index]; + + if (decim % stage->decimation == 0) + { + this_stage++; + taps.assign(stage->kernel, stage->kernel + stage->length); + if (this_stage == 1) + fir1 = gr::filter::fir_filter_ccf::make(stage->ratio, taps); + else if (this_stage == 2) + fir2 = gr::filter::fir_filter_ccf::make(stage->ratio, taps); + else if (this_stage == 3) // NB: currently max 2 stages + fir3 = gr::filter::fir_filter_ccf::make(stage->ratio, taps); + else + std::cout << " Too many decimation stages: " << this_stage + << std::endl; + + std::cout << " stage: " << this_stage << " ratio: " << stage->ratio + << std::endl; + decim /= stage->ratio; + } + else + { + index--; + } + } + + if (this_stage == 1) + { + connect(self(), 0, fir1, 0); + connect(fir1, 0, self(), 0); + } + else if (this_stage == 2) + { + connect(self(), 0, fir1, 0); + connect(fir1, 0, fir2, 0); + connect(fir2, 0, self(), 0); + } + else + { + connect(self(), 0, fir1, 0); + connect(fir1, 0, fir2, 0); + connect(fir2, 0, fir3, 0); + connect(fir3, 0, self(), 0); + } + +#else switch (decim) { default: @@ -152,6 +268,7 @@ fir_decim_cc::fir_decim_cc(unsigned int decim) connect(fir3, 0, self(), 0); break; } +#endif } fir_decim_cc::~fir_decim_cc() diff --git a/src/dsp/filter/fir_decim_coef.h b/src/dsp/filter/fir_decim_coef.h index d32cecc..315ede5 100644 --- a/src/dsp/filter/fir_decim_coef.h +++ b/src/dsp/filter/fir_decim_coef.h @@ -4,6 +4,7 @@ * http://gqrx.dk/ * * Copyright 2016 Alexandru Csete OZ9AEC. + * Copyright 2017 Youssef Touil. * * Gqrx is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +23,1439 @@ */ #pragma once +#define USE_NEW_FIR_DECIM + +#ifdef USE_NEW_FIR_DECIM +// New two-stage FIR decimator provided by Youssef + +static const int d_2_r_2_len = 69; +static const float d_2_r_2_kernel[] = +{ + 0.000399985734121014f, + 0.002073370222476234f, + 0.004853019240304940f, + 0.005977464755456102f, + 0.002625480716699286f, + -0.002713628293157090f, + -0.003379460736391527f, + 0.001637205667907783f, + 0.004080689203761314f, + -0.000982433398470081f, + -0.005119016867477646f, + 0.000177424749467386f, + 0.006424890506348696f, + 0.001008090651156955f, + -0.007915926496343137f, + -0.002717062331286239f, + 0.009511042111613645f, + 0.005077150379032227f, + -0.011151300589456603f, + -0.008251061374053964f, + 0.012781117215688672f, + 0.012490374909303374f, + -0.014344287749952384f, + -0.018209086168089920f, + 0.015778580923975386f, + 0.026178028229057050f, + -0.017029165534577999f, + -0.038051941291319488f, + 0.018060406839966188f, + 0.058210457193828925f, + -0.018831122390764166f, + -0.102778567522516130f, + 0.019291268777910851f, + 0.317182812089170980f, + 0.480536048712957740f, + 0.317182812089170980f, + 0.019291268777910851f, + -0.102778567522516130f, + -0.018831122390764166f, + 0.058210457193828925f, + 0.018060406839966188f, + -0.038051941291319488f, + -0.017029165534577999f, + 0.026178028229057050f, + 0.015778580923975386f, + -0.018209086168089920f, + -0.014344287749952384f, + 0.012490374909303374f, + 0.012781117215688672f, + -0.008251061374053964f, + -0.011151300589456603f, + 0.005077150379032227f, + 0.009511042111613645f, + -0.002717062331286239f, + -0.007915926496343137f, + 0.001008090651156955f, + 0.006424890506348696f, + 0.000177424749467386f, + -0.005119016867477646f, + -0.000982433398470081f, + 0.004080689203761314f, + 0.001637205667907783f, + -0.003379460736391527f, + -0.002713628293157090f, + 0.002625480716699286f, + 0.005977464755456102f, + 0.004853019240304940f, + 0.002073370222476234f, + 0.000399985734121014f +}; + +static const int d_4_r_4_len = 139; +static const float d_4_r_4_kernel[] = +{ + 0.000042167047949931f, + 0.000162480875041441f, + 0.000413474829003805f, + 0.000815488719349860f, + 0.001323484844111109f, + 0.001803932401530970f, + 0.002050805379425780f, + 0.001851476423100084f, + 0.001088358238163842f, + -0.000165599354540670f, + -0.001612840277093291f, + -0.002799173360323900f, + -0.003280737659419560f, + -0.002830930204582274f, + -0.001589296551711622f, + -0.000060142418430366f, + 0.001072157673911288f, + 0.001252059507347206f, + 0.000346781210023729f, + -0.001233491421169468f, + -0.002682865592015316f, + -0.003178340139233828f, + -0.002320119390193667f, + -0.000402092792444196f, + 0.001661437823975322f, + 0.002761727219457103f, + 0.002186981534424376f, + 0.000071307331744879f, + -0.002570893712874658f, + -0.004301512250227543f, + -0.004015094439084645f, + -0.001606879839533175f, + 0.001838674337622738f, + 0.004510048531846937f, + 0.004804547613530567f, + 0.002266863620581679f, + -0.002004704037111716f, + -0.005785548895574678f, + -0.006849655924079080f, + -0.004239720077392586f, + 0.001024318787772757f, + 0.006275193248599259f, + 0.008511512338709764f, + 0.006070603106211769f, + -0.000247611530141919f, + -0.007317511868656072f, + -0.011170336815604164f, + -0.009152698013614463f, + -0.001621157345452147f, + 0.007851435931989321f, + 0.014073238852672171f, + 0.012972692080589394f, + 0.004087473189926854f, + -0.008634954375856124f, + -0.018413964067748419f, + -0.019050011539439745f, + -0.008545626179408438f, + 0.009039966712164142f, + 0.024793283315122296f, + 0.029034181171149441f, + 0.016560363014866013f, + -0.009522346448795137f, + -0.037569562545468192f, + -0.051411140638474247f, + -0.037221789978391415f, + 0.009679493935209005f, + 0.081286213859684806f, + 0.158552299980228740f, + 0.217917169253869340f, + 0.240164834839879550f, + 0.217917169253869340f, + 0.158552299980228740f, + 0.081286213859684806f, + 0.009679493935209005f, + -0.037221789978391415f, + -0.051411140638474247f, + -0.037569562545468192f, + -0.009522346448795137f, + 0.016560363014866013f, + 0.029034181171149441f, + 0.024793283315122296f, + 0.009039966712164142f, + -0.008545626179408438f, + -0.019050011539439745f, + -0.018413964067748419f, + -0.008634954375856124f, + 0.004087473189926854f, + 0.012972692080589394f, + 0.014073238852672171f, + 0.007851435931989321f, + -0.001621157345452147f, + -0.009152698013614463f, + -0.011170336815604164f, + -0.007317511868656072f, + -0.000247611530141919f, + 0.006070603106211769f, + 0.008511512338709764f, + 0.006275193248599259f, + 0.001024318787772757f, + -0.004239720077392586f, + -0.006849655924079080f, + -0.005785548895574678f, + -0.002004704037111716f, + 0.002266863620581679f, + 0.004804547613530567f, + 0.004510048531846937f, + 0.001838674337622738f, + -0.001606879839533175f, + -0.004015094439084645f, + -0.004301512250227543f, + -0.002570893712874658f, + 0.000071307331744879f, + 0.002186981534424376f, + 0.002761727219457103f, + 0.001661437823975322f, + -0.000402092792444196f, + -0.002320119390193667f, + -0.003178340139233828f, + -0.002682865592015316f, + -0.001233491421169468f, + 0.000346781210023729f, + 0.001252059507347206f, + 0.001072157673911288f, + -0.000060142418430366f, + -0.001589296551711622f, + -0.002830930204582274f, + -0.003280737659419560f, + -0.002799173360323900f, + -0.001612840277093291f, + -0.000165599354540670f, + 0.001088358238163842f, + 0.001851476423100084f, + 0.002050805379425780f, + 0.001803932401530970f, + 0.001323484844111109f, + 0.000815488719349860f, + 0.000413474829003805f, + 0.000162480875041441f, + 0.000042167047949931f +}; + +static const int d_8_r_8_len = 280; +static const float d_8_r_8_kernel[] = +{ + 0.000005299484859782f, + 0.000023653198869943f, + 0.000045443155025411f, + 0.000086660616597102f, + 0.000145468147843215f, + 0.000227646032445337f, + 0.000334591194217999f, + 0.000466890457500183f, + 0.000622018386430552f, + 0.000794466626663634f, + 0.000975304575250323f, + 0.001152454785657775f, + 0.001311296864337127f, + 0.001435783630074849f, + 0.001509953148215840f, + 0.001519741581366084f, + 0.001454903824191261f, + 0.001310813201213376f, + 0.001089882810057675f, + 0.000802361759738747f, + 0.000466304093914126f, + 0.000106589241438445f, + -0.000247017317721992f, + -0.000562646941659305f, + -0.000809708828030606f, + -0.000962510996013040f, + -0.001003685261621032f, + -0.000926952775265634f, + -0.000738799897838057f, + -0.000458730744403599f, + -0.000117916487516219f, + 0.000243742648939376f, + 0.000581911777806535f, + 0.000853035291692318f, + 0.001019866746633974f, + 0.001056611000192218f, + 0.000952962453331239f, + 0.000716408838645576f, + 0.000372351073038558f, + -0.000038150274869667f, + -0.000462881782404900f, + -0.000844797294892937f, + -0.001129425716907750f, + -0.001272432677940103f, + -0.001246307890160262f, + -0.001045192378203970f, + -0.000687044203214210f, + -0.000212653183490116f, + 0.000318579724580746f, + 0.000835734644546107f, + 0.001265542439063603f, + 0.001542487733459282f, + 0.001618487960413105f, + 0.001470755262270050f, + 0.001106608046232222f, + 0.000564346197878288f, + -0.000090197750452171f, + -0.000771230463597417f, + -0.001383890554706424f, + -0.001837132239362339f, + -0.002056896211703681f, + -0.001997709076123834f, + -0.001650953765714851f, + -0.001048413504576680f, + -0.000260276733547870f, + 0.000612469118131840f, + 0.001450527381084600f, + 0.002132190093380017f, + 0.002550584440683641f, + 0.002629881881769309f, + 0.002338080196576415f, + 0.001694308341293216f, + 0.000769260408641065f, + -0.000321736170028782f, + -0.001432485915523021f, + -0.002404976322971185f, + -0.003091310085438950f, + -0.003375549372556256f, + -0.003192330168178722f, + -0.002539372888669491f, + -0.001481713556478757f, + -0.000146533823587781f, + 0.001291251516558131f, + 0.002631154368260663f, + 0.003674321213032700f, + 0.004252198884660451f, + 0.004252637433548458f, + 0.003639528435255283f, + 0.002462762274858131f, + 0.000856475239499534f, + -0.000974892854265319f, + -0.002781496880057425f, + -0.004301065594668099f, + -0.005295755541230454f, + -0.005587859925192526f, + -0.005089203765495300f, + -0.003819632950038145f, + -0.001911267954229858f, + 0.000402995000090862f, + 0.002816115056235722f, + 0.004985868963592199f, + 0.006581423530514738f, + 0.007331423828496663f, + 0.007066900231758860f, + 0.005752595831756849f, + 0.003501526672561130f, + 0.000569595914029656f, + -0.002670342281476470f, + -0.005772755486290897f, + -0.008277141861910673f, + -0.009772095428011296f, + -0.009957304065452081f, + -0.008694779007964944f, + -0.006041501906687299f, + -0.002257673645446692f, + 0.002212348869418207f, + 0.006785874581560984f, + 0.010810304734210376f, + 0.013646746123386143f, + 0.014758915386036504f, + 0.013796112346034117f, + 0.010659097540521932f, + 0.005539210274923477f, + -0.001076115841043161f, + -0.008434444147245189f, + -0.015584625308516726f, + -0.021472430244782261f, + -0.025055744331654087f, + -0.025426655616721288f, + -0.021926322954481325f, + -0.014238733805135361f, + -0.002451384366749276f, + 0.012925647002682830f, + 0.030986186274100380f, + 0.050498778538203032f, + 0.070015421670629074f, + 0.088007266252761618f, + 0.103012981470773550f, + 0.113783757663955240f, + 0.119409036455313980f, + 0.119409036455313980f, + 0.113783757663955240f, + 0.103012981470773550f, + 0.088007266252761618f, + 0.070015421670629074f, + 0.050498778538203032f, + 0.030986186274100380f, + 0.012925647002682830f, + -0.002451384366749276f, + -0.014238733805135361f, + -0.021926322954481325f, + -0.025426655616721288f, + -0.025055744331654087f, + -0.021472430244782261f, + -0.015584625308516726f, + -0.008434444147245189f, + -0.001076115841043161f, + 0.005539210274923477f, + 0.010659097540521932f, + 0.013796112346034117f, + 0.014758915386036504f, + 0.013646746123386143f, + 0.010810304734210376f, + 0.006785874581560984f, + 0.002212348869418207f, + -0.002257673645446692f, + -0.006041501906687299f, + -0.008694779007964944f, + -0.009957304065452081f, + -0.009772095428011296f, + -0.008277141861910673f, + -0.005772755486290897f, + -0.002670342281476470f, + 0.000569595914029656f, + 0.003501526672561130f, + 0.005752595831756849f, + 0.007066900231758860f, + 0.007331423828496663f, + 0.006581423530514738f, + 0.004985868963592199f, + 0.002816115056235722f, + 0.000402995000090862f, + -0.001911267954229858f, + -0.003819632950038145f, + -0.005089203765495300f, + -0.005587859925192526f, + -0.005295755541230454f, + -0.004301065594668099f, + -0.002781496880057425f, + -0.000974892854265319f, + 0.000856475239499534f, + 0.002462762274858131f, + 0.003639528435255283f, + 0.004252637433548458f, + 0.004252198884660451f, + 0.003674321213032700f, + 0.002631154368260663f, + 0.001291251516558131f, + -0.000146533823587781f, + -0.001481713556478757f, + -0.002539372888669491f, + -0.003192330168178722f, + -0.003375549372556256f, + -0.003091310085438950f, + -0.002404976322971185f, + -0.001432485915523021f, + -0.000321736170028782f, + 0.000769260408641065f, + 0.001694308341293216f, + 0.002338080196576415f, + 0.002629881881769309f, + 0.002550584440683641f, + 0.002132190093380017f, + 0.001450527381084600f, + 0.000612469118131840f, + -0.000260276733547870f, + -0.001048413504576680f, + -0.001650953765714851f, + -0.001997709076123834f, + -0.002056896211703681f, + -0.001837132239362339f, + -0.001383890554706424f, + -0.000771230463597417f, + -0.000090197750452171f, + 0.000564346197878288f, + 0.001106608046232222f, + 0.001470755262270050f, + 0.001618487960413105f, + 0.001542487733459282f, + 0.001265542439063603f, + 0.000835734644546107f, + 0.000318579724580746f, + -0.000212653183490116f, + -0.000687044203214210f, + -0.001045192378203970f, + -0.001246307890160262f, + -0.001272432677940103f, + -0.001129425716907750f, + -0.000844797294892937f, + -0.000462881782404900f, + -0.000038150274869667f, + 0.000372351073038558f, + 0.000716408838645576f, + 0.000952962453331239f, + 0.001056611000192218f, + 0.001019866746633974f, + 0.000853035291692318f, + 0.000581911777806535f, + 0.000243742648939376f, + -0.000117916487516219f, + -0.000458730744403599f, + -0.000738799897838057f, + -0.000926952775265634f, + -0.001003685261621032f, + -0.000962510996013040f, + -0.000809708828030606f, + -0.000562646941659305f, + -0.000247017317721992f, + 0.000106589241438445f, + 0.000466304093914126f, + 0.000802361759738747f, + 0.001089882810057675f, + 0.001310813201213376f, + 0.001454903824191261f, + 0.001519741581366084f, + 0.001509953148215840f, + 0.001435783630074849f, + 0.001311296864337127f, + 0.001152454785657775f, + 0.000975304575250323f, + 0.000794466626663634f, + 0.000622018386430552f, + 0.000466890457500183f, + 0.000334591194217999f, + 0.000227646032445337f, + 0.000145468147843215f, + 0.000086660616597102f, + 0.000045443155025411f, + 0.000023653198869943f, + 0.000005299484859782f +}; + +static const int d_16_r_8_len = 54; +static const float d_16_r_8_kernel[] = +{ + -0.000010553664672862f, + -0.000061498701563991f, + -0.000169601122616288f, + -0.000389180581238296f, + -0.000769984128346191f, + -0.001370862255977838f, + -0.002239657737237394f, + -0.003399895346870093f, + -0.004830710741492023f, + -0.006448450828431843f, + -0.008091858901382079f, + -0.009515843884697457f, + -0.010397443295914180f, + -0.010356613550454467f, + -0.008992200646607676f, + -0.005930785604319544f, + -0.000883275448312690f, + 0.006298249742162992f, + 0.015572313369334116f, + 0.026677316967261836f, + 0.039125602626276818f, + 0.052226529544645239f, + 0.065138652777540620f, + 0.076946528099683636f, + 0.086753462256061120f, + 0.093778457566739207f, + 0.097444274566674538f, + 0.097444274566674538f, + 0.093778457566739207f, + 0.086753462256061120f, + 0.076946528099683636f, + 0.065138652777540620f, + 0.052226529544645239f, + 0.039125602626276818f, + 0.026677316967261836f, + 0.015572313369334116f, + 0.006298249742162992f, + -0.000883275448312690f, + -0.005930785604319544f, + -0.008992200646607676f, + -0.010356613550454467f, + -0.010397443295914180f, + -0.009515843884697457f, + -0.008091858901382079f, + -0.006448450828431843f, + -0.004830710741492023f, + -0.003399895346870093f, + -0.002239657737237394f, + -0.001370862255977838f, + -0.000769984128346191f, + -0.000389180581238296f, + -0.000169601122616288f, + -0.000061498701563991f, + -0.000010553664672862f +}; + +static const int d_32_r_16_len = 107; +static const float d_32_r_16_kernel[] = +{ + -0.000004024163639795f, + -0.000017672975608646f, + -0.000028369983125930f, + -0.000051841257358260f, + -0.000084114931088978f, + -0.000130374705334955f, + -0.000193165706690690f, + -0.000276282392544972f, + -0.000383294466797586f, + -0.000517836385761646f, + -0.000683246849920059f, + -0.000882378788952720f, + -0.001117308161626894f, + -0.001389043294976996f, + -0.001697213461428019f, + -0.002039760314912465f, + -0.002412643435722481f, + -0.002809577646098091f, + -0.003221818992095683f, + -0.003638016956253216f, + -0.004044149516577933f, + -0.004423556043039536f, + -0.004757080371798020f, + -0.005023332869090757f, + -0.005199075945795754f, + -0.005259732456805450f, + -0.005180010907146506f, + -0.004934635615957972f, + -0.004499164222082719f, + -0.003850869437258024f, + -0.002969657050308204f, + -0.001838988139263688f, + -0.000446770521598867f, + 0.001213817123243464f, + 0.003143605116121320f, + 0.005336851770962665f, + 0.007780833517050342f, + 0.010455633416035585f, + 0.013334149150643793f, + 0.016382334116677784f, + 0.019559676833852839f, + 0.022819914826782396f, + 0.026111969807273771f, + 0.029381081811115123f, + 0.032570111325119062f, + 0.035620970792186964f, + 0.038476140562399175f, + 0.041080219701286683f, + 0.043381459308086866f, + 0.045333225316341701f, + 0.046895339212960678f, + 0.048035248704517766f, + 0.048728985952954711f, + 0.048961878385199747f, + 0.048728985952954711f, + 0.048035248704517766f, + 0.046895339212960678f, + 0.045333225316341701f, + 0.043381459308086866f, + 0.041080219701286683f, + 0.038476140562399175f, + 0.035620970792186964f, + 0.032570111325119062f, + 0.029381081811115123f, + 0.026111969807273771f, + 0.022819914826782396f, + 0.019559676833852839f, + 0.016382334116677784f, + 0.013334149150643793f, + 0.010455633416035585f, + 0.007780833517050342f, + 0.005336851770962665f, + 0.003143605116121320f, + 0.001213817123243464f, + -0.000446770521598867f, + -0.001838988139263688f, + -0.002969657050308204f, + -0.003850869437258024f, + -0.004499164222082719f, + -0.004934635615957972f, + -0.005180010907146506f, + -0.005259732456805450f, + -0.005199075945795754f, + -0.005023332869090757f, + -0.004757080371798020f, + -0.004423556043039536f, + -0.004044149516577933f, + -0.003638016956253216f, + -0.003221818992095683f, + -0.002809577646098091f, + -0.002412643435722481f, + -0.002039760314912465f, + -0.001697213461428019f, + -0.001389043294976996f, + -0.001117308161626894f, + -0.000882378788952720f, + -0.000683246849920059f, + -0.000517836385761646f, + -0.000383294466797586f, + -0.000276282392544972f, + -0.000193165706690690f, + -0.000130374705334955f, + -0.000084114931088978f, + -0.000051841257358260f, + -0.000028369983125930f, + -0.000017672975608646f, + -0.000004024163639795f +}; + +static const int d_64_r_32_len = 212; +static const float d_64_r_32_kernel[] = +{ + -0.000004403823942508f, + -0.000008963059919890f, + -0.000007276052892980f, + -0.000013448546764569f, + -0.000016407338246392f, + -0.000022821877811828f, + -0.000029059859493782f, + -0.000037502053326083f, + -0.000047050128769168f, + -0.000058647705667398f, + -0.000072066821233235f, + -0.000087775432302674f, + -0.000105848488644829f, + -0.000126598475702349f, + -0.000150205141042045f, + -0.000176926965601505f, + -0.000206973701715915f, + -0.000240575602493366f, + -0.000277937749971926f, + -0.000319260777052827f, + -0.000364722541989086f, + -0.000414482134953896f, + -0.000468670554403767f, + -0.000527388854339363f, + -0.000590701722925615f, + -0.000658633566464172f, + -0.000731163061150287f, + -0.000808218604975926f, + -0.000889673345622962f, + -0.000975340650633742f, + -0.001064969616730599f, + -0.001158240957389821f, + -0.001254763178484453f, + -0.001354069203096897f, + -0.001455613461052586f, + -0.001558769541846508f, + -0.001662828458596891f, + -0.001766997597152117f, + -0.001870400403116935f, + -0.001972076865069115f, + -0.002070984841172726f, + -0.002166002272448999f, + -0.002255930317598858f, + -0.002339497436442704f, + -0.002415364439683740f, + -0.002482130514177367f, + -0.002538340220525754f, + -0.002582491452580508f, + -0.002613044332960035f, + -0.002628431011812668f, + -0.002627066321370591f, + -0.002607359228695053f, + -0.002567725018271331f, + -0.002506598123060911f, + -0.002422445514576562f, + -0.002313780550524778f, + -0.002179177170034060f, + -0.002017284317828416f, + -0.001826840471286680f, + -0.001606688137875605f, + -0.001355788185007890f, + -0.001073233860638388f, + -0.000758264360902667f, + -0.000410277798843436f, + -0.000028843430628706f, + 0.000386287004249912f, + 0.000835168966487215f, + 0.001317655958647924f, + 0.001833391650175865f, + 0.002381803404668191f, + 0.002962097316406667f, + 0.003573254853063226f, + 0.004214031187543062f, + 0.004882955288187807f, + 0.005578331822331469f, + 0.006298244909815173f, + 0.007040563748502659f, + 0.007802950114525442f, + 0.008582867722817980f, + 0.009377593413961051f, + 0.010184230117287451f, + 0.010999721518727896f, + 0.011820868346749476f, + 0.012644346170734195f, + 0.013466724590201118f, + 0.014284487677241258f, + 0.015094055520281103f, + 0.015891806704001060f, + 0.016674101548252919f, + 0.017437305919088521f, + 0.018177815416425963f, + 0.018892079736813970f, + 0.019576627004361302f, + 0.020228087861972253f, + 0.020843219113185100f, + 0.021418926707647539f, + 0.021952287867040517f, + 0.022440572154110033f, + 0.022881261295670835f, + 0.023272067580484536f, + 0.023610950665041715f, + 0.023896132633698622f, + 0.024126111175283287f, + 0.024299670755100852f, + 0.024415891678976044f, + 0.024474156966027200f, + 0.024474156966027200f, + 0.024415891678976044f, + 0.024299670755100852f, + 0.024126111175283287f, + 0.023896132633698622f, + 0.023610950665041715f, + 0.023272067580484536f, + 0.022881261295670835f, + 0.022440572154110033f, + 0.021952287867040517f, + 0.021418926707647539f, + 0.020843219113185100f, + 0.020228087861972253f, + 0.019576627004361302f, + 0.018892079736813970f, + 0.018177815416425963f, + 0.017437305919088521f, + 0.016674101548252919f, + 0.015891806704001060f, + 0.015094055520281103f, + 0.014284487677241258f, + 0.013466724590201118f, + 0.012644346170734195f, + 0.011820868346749476f, + 0.010999721518727896f, + 0.010184230117287451f, + 0.009377593413961051f, + 0.008582867722817980f, + 0.007802950114525442f, + 0.007040563748502659f, + 0.006298244909815173f, + 0.005578331822331469f, + 0.004882955288187807f, + 0.004214031187543062f, + 0.003573254853063226f, + 0.002962097316406667f, + 0.002381803404668191f, + 0.001833391650175865f, + 0.001317655958647924f, + 0.000835168966487215f, + 0.000386287004249912f, + -0.000028843430628706f, + -0.000410277798843436f, + -0.000758264360902667f, + -0.001073233860638388f, + -0.001355788185007890f, + -0.001606688137875605f, + -0.001826840471286680f, + -0.002017284317828416f, + -0.002179177170034060f, + -0.002313780550524778f, + -0.002422445514576562f, + -0.002506598123060911f, + -0.002567725018271331f, + -0.002607359228695053f, + -0.002627066321370591f, + -0.002628431011812668f, + -0.002613044332960035f, + -0.002582491452580508f, + -0.002538340220525754f, + -0.002482130514177367f, + -0.002415364439683740f, + -0.002339497436442704f, + -0.002255930317598858f, + -0.002166002272448999f, + -0.002070984841172726f, + -0.001972076865069115f, + -0.001870400403116935f, + -0.001766997597152117f, + -0.001662828458596891f, + -0.001558769541846508f, + -0.001455613461052586f, + -0.001354069203096897f, + -0.001254763178484453f, + -0.001158240957389821f, + -0.001064969616730599f, + -0.000975340650633742f, + -0.000889673345622962f, + -0.000808218604975926f, + -0.000731163061150287f, + -0.000658633566464172f, + -0.000590701722925615f, + -0.000527388854339363f, + -0.000468670554403767f, + -0.000414482134953896f, + -0.000364722541989086f, + -0.000319260777052827f, + -0.000277937749971926f, + -0.000240575602493366f, + -0.000206973701715915f, + -0.000176926965601505f, + -0.000150205141042045f, + -0.000126598475702349f, + -0.000105848488644829f, + -0.000087775432302674f, + -0.000072066821233235f, + -0.000058647705667398f, + -0.000047050128769168f, + -0.000037502053326083f, + -0.000029059859493782f, + -0.000022821877811828f, + -0.000016407338246392f, + -0.000013448546764569f, + -0.000007276052892980f, + -0.000008963059919890f, + -0.000004403823942508f +}; + +static const int d_128_r_32_len = 174; +static const float d_128_r_32_kernel[] = +{ + -0.000007703161797332f, + -0.000007067232655723f, + -0.000010206071983051f, + -0.000014172048980291f, + -0.000019092331824095f, + -0.000025093561850217f, + -0.000032309725460887f, + -0.000040869410108629f, + -0.000050902771287247f, + -0.000062527941809152f, + -0.000075857080877625f, + -0.000090981984892608f, + -0.000107979276021387f, + -0.000126895337525829f, + -0.000147750778600044f, + -0.000170524898241214f, + -0.000195159646270053f, + -0.000221543901544016f, + -0.000249517228886741f, + -0.000278854334896464f, + -0.000309268991706370f, + -0.000340399096744052f, + -0.000371811190567229f, + -0.000402986592324930f, + -0.000433326971103446f, + -0.000462142048725246f, + -0.000488656689255886f, + -0.000512000649038707f, + -0.000531217622524194f, + -0.000545257474301118f, + -0.000552987616398289f, + -0.000553188077307909f, + -0.000544565488882758f, + -0.000525751232639430f, + -0.000495318184744208f, + -0.000451782034515639f, + -0.000393620779029084f, + -0.000319279140356296f, + -0.000227190622760720f, + -0.000115784771504684f, + 0.000016488581452787f, + 0.000171149664304299f, + 0.000349662890884785f, + 0.000553425442457719f, + 0.000783740497411292f, + 0.001041804838025221f, + 0.001328682064289453f, + 0.001645290145967291f, + 0.001992375608565783f, + 0.002370502036550272f, + 0.002780026279675712f, + 0.003221088947286086f, + 0.003693593686280741f, + 0.004197200680900796f, + 0.004731309996663634f, + 0.005295059011515552f, + 0.005887310701543637f, + 0.006506655780921748f, + 0.007151406625936390f, + 0.007819604696828528f, + 0.008509020566706571f, + 0.009217166946123657f, + 0.009941305011649831f, + 0.010678463067957514f, + 0.011425449071796635f, + 0.012178874660574504f, + 0.012935173457761552f, + 0.013690629889370804f, + 0.014441402554104810f, + 0.015183556958199267f, + 0.015913092956531424f, + 0.016625980278750660f, + 0.017318188813430120f, + 0.017985725593062503f, + 0.018624666516886546f, + 0.019231193320663705f, + 0.019801625228558870f, + 0.020332454367773867f, + 0.020820375812973399f, + 0.021262319920613983f, + 0.021655479285054610f, + 0.021997336565315176f, + 0.022285687008084795f, + 0.022518660515178174f, + 0.022694738600454345f, + 0.022812769691468757f, + 0.022871979661449618f, + 0.022871979661449618f, + 0.022812769691468757f, + 0.022694738600454345f, + 0.022518660515178174f, + 0.022285687008084795f, + 0.021997336565315176f, + 0.021655479285054610f, + 0.021262319920613983f, + 0.020820375812973399f, + 0.020332454367773867f, + 0.019801625228558870f, + 0.019231193320663705f, + 0.018624666516886546f, + 0.017985725593062503f, + 0.017318188813430120f, + 0.016625980278750660f, + 0.015913092956531424f, + 0.015183556958199267f, + 0.014441402554104810f, + 0.013690629889370804f, + 0.012935173457761552f, + 0.012178874660574504f, + 0.011425449071796635f, + 0.010678463067957514f, + 0.009941305011649831f, + 0.009217166946123657f, + 0.008509020566706571f, + 0.007819604696828528f, + 0.007151406625936390f, + 0.006506655780921748f, + 0.005887310701543637f, + 0.005295059011515552f, + 0.004731309996663634f, + 0.004197200680900796f, + 0.003693593686280741f, + 0.003221088947286086f, + 0.002780026279675712f, + 0.002370502036550272f, + 0.001992375608565783f, + 0.001645290145967291f, + 0.001328682064289453f, + 0.001041804838025221f, + 0.000783740497411292f, + 0.000553425442457719f, + 0.000349662890884785f, + 0.000171149664304299f, + 0.000016488581452787f, + -0.000115784771504684f, + -0.000227190622760720f, + -0.000319279140356296f, + -0.000393620779029084f, + -0.000451782034515639f, + -0.000495318184744208f, + -0.000525751232639430f, + -0.000544565488882758f, + -0.000553188077307909f, + -0.000552987616398289f, + -0.000545257474301118f, + -0.000531217622524194f, + -0.000512000649038707f, + -0.000488656689255886f, + -0.000462142048725246f, + -0.000433326971103446f, + -0.000402986592324930f, + -0.000371811190567229f, + -0.000340399096744052f, + -0.000309268991706370f, + -0.000278854334896464f, + -0.000249517228886741f, + -0.000221543901544016f, + -0.000195159646270053f, + -0.000170524898241214f, + -0.000147750778600044f, + -0.000126895337525829f, + -0.000107979276021387f, + -0.000090981984892608f, + -0.000075857080877625f, + -0.000062527941809152f, + -0.000050902771287247f, + -0.000040869410108629f, + -0.000032309725460887f, + -0.000025093561850217f, + -0.000019092331824095f, + -0.000014172048980291f, + -0.000010206071983051f, + -0.000007067232655723f, + -0.000007703161797332f +}; + +static const int d_256_r_64_len = 348; +static const float d_256_r_64_kernel[] = +{ + -0.000006032200297229f, + -0.000002790586794678f, + -0.000003423524464373f, + -0.000004141892670381f, + -0.000004959329780957f, + -0.000005880953015414f, + -0.000006916263845337f, + -0.000008064028056128f, + -0.000009336504822940f, + -0.000010742797132820f, + -0.000012302324525658f, + -0.000014003128525449f, + -0.000015868003792231f, + -0.000017906061357310f, + -0.000020111369902626f, + -0.000022508204619172f, + -0.000025093613992638f, + -0.000027881953296601f, + -0.000030875236885189f, + -0.000034086060833210f, + -0.000037517497377010f, + -0.000041176665997414f, + -0.000045067469478981f, + -0.000049199353227621f, + -0.000053568215176887f, + -0.000058185242147041f, + -0.000063047547807853f, + -0.000068158618146586f, + -0.000073517650784389f, + -0.000079124725926570f, + -0.000084976788235246f, + -0.000091070103041806f, + -0.000097399649098627f, + -0.000103959504668590f, + -0.000110738977492950f, + -0.000117729935644196f, + -0.000124919754739577f, + -0.000132293212128623f, + -0.000139836270835869f, + -0.000147529334756596f, + -0.000155353239032747f, + -0.000163284378055491f, + -0.000171298895948762f, + -0.000179368841745378f, + -0.000187464129074148f, + -0.000195552549576070f, + -0.000203599379753965f, + -0.000211565351775375f, + -0.000219411598860001f, + -0.000227093646507866f, + -0.000234565855614429f, + -0.000241779257421431f, + -0.000248682177854843f, + -0.000255220180724547f, + -0.000261335292980978f, + -0.000266967862740791f, + -0.000272054419087176f, + -0.000276528686849870f, + -0.000280322370041046f, + -0.000283363923695878f, + -0.000285578633373008f, + -0.000286890694598539f, + -0.000287220112764771f, + -0.000286486063219693f, + -0.000284603980740463f, + -0.000281488659987540f, + -0.000277051522643753f, + -0.000271202733437524f, + -0.000263850662609383f, + -0.000254902132867105f, + -0.000244261829079865f, + -0.000231834561467387f, + -0.000217522684614226f, + -0.000201228717970838f, + -0.000182854056621652f, + -0.000162300101972573f, + -0.000139467943568298f, + -0.000114258627064630f, + -0.000086574168670878f, + -0.000056316612617103f, + -0.000023389083735015f, + 0.000012303734435184f, + 0.000050856088211618f, + 0.000092360432854175f, + 0.000136906695012963f, + 0.000184583050199368f, + 0.000235474395169584f, + 0.000289663252276950f, + 0.000347228091667187f, + 0.000408244468331575f, + 0.000472783700962668f, + 0.000540912739938505f, + 0.000612694289527581f, + 0.000688186201030564f, + 0.000767440808596336f, + 0.000850505496981770f, + 0.000937421598757782f, + 0.001028224584686942f, + 0.001122943571650730f, + 0.001221601170177604f, + 0.001324213422447449f, + 0.001430788817328081f, + 0.001541329271676986f, + 0.001655828820474164f, + 0.001774273932442011f, + 0.001896643321221287f, + 0.002022907760579356f, + 0.002153029565104709f, + 0.002286963138555204f, + 0.002424654105591249f, + 0.002566039990527927f, + 0.002711049190015392f, + 0.002859602052878106f, + 0.003011609882021581f, + 0.003166975340851216f, + 0.003325592606007947f, + 0.003487347156138999f, + 0.003652115769225347f, + 0.003819766988190932f, + 0.003990160791661657f, + 0.004163149004759460f, + 0.004338575232032592f, + 0.004516275281704776f, + 0.004696077226065694f, + 0.004877801369702575f, + 0.005061261175365414f, + 0.005246262760259225f, + 0.005432605634097002f, + 0.005620082968897619f, + 0.005808481837004595f, + 0.005997583515661679f, + 0.006187164045980849f, + 0.006376994441064236f, + 0.006566841257680600f, + 0.006756466702660143f, + 0.006945629644096785f, + 0.007134085474240178f, + 0.007321586857189369f, + 0.007507884388699728f, + 0.007692726710717013f, + 0.007875861286146892f, + 0.008057034853723447f, + 0.008235993962285608f, + 0.008412485423992495f, + 0.008586256905270668f, + 0.008757057550423931f, + 0.008924638381879985f, + 0.009088752763977616f, + 0.009249157391806035f, + 0.009405612190690901f, + 0.009557881349450560f, + 0.009705733651032743f, + 0.009848943025250930f, + 0.009987289003226731f, + 0.010120557317645952f, + 0.010248540384643352f, + 0.010371037696321509f, + 0.010487856281889540f, + 0.010598811426250850f, + 0.010703726661456589f, + 0.010802434494593470f, + 0.010894776824678817f, + 0.010980605060844476f, + 0.011059780725514858f, + 0.011132175645830765f, + 0.011197672374601442f, + 0.011256164283833567f, + 0.011307555970121824f, + 0.011351763540287503f, + 0.011388714558166329f, + 0.011418348423280301f, + 0.011440616600089638f, + 0.011455482402780947f, + 0.011462921415360990f, + 0.011462921415360990f, + 0.011455482402780947f, + 0.011440616600089638f, + 0.011418348423280301f, + 0.011388714558166329f, + 0.011351763540287503f, + 0.011307555970121824f, + 0.011256164283833567f, + 0.011197672374601442f, + 0.011132175645830765f, + 0.011059780725514858f, + 0.010980605060844476f, + 0.010894776824678817f, + 0.010802434494593470f, + 0.010703726661456589f, + 0.010598811426250850f, + 0.010487856281889540f, + 0.010371037696321509f, + 0.010248540384643352f, + 0.010120557317645952f, + 0.009987289003226731f, + 0.009848943025250930f, + 0.009705733651032743f, + 0.009557881349450560f, + 0.009405612190690901f, + 0.009249157391806035f, + 0.009088752763977616f, + 0.008924638381879985f, + 0.008757057550423931f, + 0.008586256905270668f, + 0.008412485423992495f, + 0.008235993962285608f, + 0.008057034853723447f, + 0.007875861286146892f, + 0.007692726710717013f, + 0.007507884388699728f, + 0.007321586857189369f, + 0.007134085474240178f, + 0.006945629644096785f, + 0.006756466702660143f, + 0.006566841257680600f, + 0.006376994441064236f, + 0.006187164045980849f, + 0.005997583515661679f, + 0.005808481837004595f, + 0.005620082968897619f, + 0.005432605634097002f, + 0.005246262760259225f, + 0.005061261175365414f, + 0.004877801369702575f, + 0.004696077226065694f, + 0.004516275281704776f, + 0.004338575232032592f, + 0.004163149004759460f, + 0.003990160791661657f, + 0.003819766988190932f, + 0.003652115769225347f, + 0.003487347156138999f, + 0.003325592606007947f, + 0.003166975340851216f, + 0.003011609882021581f, + 0.002859602052878106f, + 0.002711049190015392f, + 0.002566039990527927f, + 0.002424654105591249f, + 0.002286963138555204f, + 0.002153029565104709f, + 0.002022907760579356f, + 0.001896643321221287f, + 0.001774273932442011f, + 0.001655828820474164f, + 0.001541329271676986f, + 0.001430788817328081f, + 0.001324213422447449f, + 0.001221601170177604f, + 0.001122943571650730f, + 0.001028224584686942f, + 0.000937421598757782f, + 0.000850505496981770f, + 0.000767440808596336f, + 0.000688186201030564f, + 0.000612694289527581f, + 0.000540912739938505f, + 0.000472783700962668f, + 0.000408244468331575f, + 0.000347228091667187f, + 0.000289663252276950f, + 0.000235474395169584f, + 0.000184583050199368f, + 0.000136906695012963f, + 0.000092360432854175f, + 0.000050856088211618f, + 0.000012303734435184f, + -0.000023389083735015f, + -0.000056316612617103f, + -0.000086574168670878f, + -0.000114258627064630f, + -0.000139467943568298f, + -0.000162300101972573f, + -0.000182854056621652f, + -0.000201228717970838f, + -0.000217522684614226f, + -0.000231834561467387f, + -0.000244261829079865f, + -0.000254902132867105f, + -0.000263850662609383f, + -0.000271202733437524f, + -0.000277051522643753f, + -0.000281488659987540f, + -0.000284603980740463f, + -0.000286486063219693f, + -0.000287220112764771f, + -0.000286890694598539f, + -0.000285578633373008f, + -0.000283363923695878f, + -0.000280322370041046f, + -0.000276528686849870f, + -0.000272054419087176f, + -0.000266967862740791f, + -0.000261335292980978f, + -0.000255220180724547f, + -0.000248682177854843f, + -0.000241779257421431f, + -0.000234565855614429f, + -0.000227093646507866f, + -0.000219411598860001f, + -0.000211565351775375f, + -0.000203599379753965f, + -0.000195552549576070f, + -0.000187464129074148f, + -0.000179368841745378f, + -0.000171298895948762f, + -0.000163284378055491f, + -0.000155353239032747f, + -0.000147529334756596f, + -0.000139836270835869f, + -0.000132293212128623f, + -0.000124919754739577f, + -0.000117729935644196f, + -0.000110738977492950f, + -0.000103959504668590f, + -0.000097399649098627f, + -0.000091070103041806f, + -0.000084976788235246f, + -0.000079124725926570f, + -0.000073517650784389f, + -0.000068158618146586f, + -0.000063047547807853f, + -0.000058185242147041f, + -0.000053568215176887f, + -0.000049199353227621f, + -0.000045067469478981f, + -0.000041176665997414f, + -0.000037517497377010f, + -0.000034086060833210f, + -0.000030875236885189f, + -0.000027881953296601f, + -0.000025093613992638f, + -0.000022508204619172f, + -0.000020111369902626f, + -0.000017906061357310f, + -0.000015868003792231f, + -0.000014003128525449f, + -0.000012302324525658f, + -0.000010742797132820f, + -0.000009336504822940f, + -0.000008064028056128f, + -0.000006916263845337f, + -0.000005880953015414f, + -0.000004959329780957f, + -0.000004141892670381f, + -0.000003423524464373f, + -0.000002790586794678f, + -0.000006032200297229f +}; + + +#else +// Previous FIR decimator + + /* Filter taps generated by matlab. * All filters are designed for 0.5 dB passband ripple and 90-100 dB stop-band * attenuation. @@ -351,3 +1785,6 @@ const float *FIR_128_2_TAPS = FIR_8_1_TAPS; // 0.4500000000 0.5500000000 2 #define FIR_128_3_LEN FIR_2_1_LEN const float *FIR_128_3_TAPS = FIR_2_1_TAPS; + +#endif // USE_NEW_FIR_DECIM + From 3e85f1316c382df899502a5fe2a9babf009902f2 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Wed, 5 Apr 2017 23:14:22 +0200 Subject: [PATCH 211/334] Indent fir_decim_coef --- src/dsp/filter/fir_decim_coef.h | 2770 +++++++++++++++---------------- 1 file changed, 1384 insertions(+), 1386 deletions(-) diff --git a/src/dsp/filter/fir_decim_coef.h b/src/dsp/filter/fir_decim_coef.h index 315ede5..d9a70af 100644 --- a/src/dsp/filter/fir_decim_coef.h +++ b/src/dsp/filter/fir_decim_coef.h @@ -4,7 +4,7 @@ * http://gqrx.dk/ * * Copyright 2016 Alexandru Csete OZ9AEC. - * Copyright 2017 Youssef Touil. + * Copyright 2017 Youssef Touil. * * Gqrx is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,1431 +31,1429 @@ static const int d_2_r_2_len = 69; static const float d_2_r_2_kernel[] = { - 0.000399985734121014f, - 0.002073370222476234f, - 0.004853019240304940f, - 0.005977464755456102f, - 0.002625480716699286f, - -0.002713628293157090f, - -0.003379460736391527f, - 0.001637205667907783f, - 0.004080689203761314f, - -0.000982433398470081f, - -0.005119016867477646f, - 0.000177424749467386f, - 0.006424890506348696f, - 0.001008090651156955f, - -0.007915926496343137f, - -0.002717062331286239f, - 0.009511042111613645f, - 0.005077150379032227f, - -0.011151300589456603f, - -0.008251061374053964f, - 0.012781117215688672f, - 0.012490374909303374f, - -0.014344287749952384f, - -0.018209086168089920f, - 0.015778580923975386f, - 0.026178028229057050f, - -0.017029165534577999f, - -0.038051941291319488f, - 0.018060406839966188f, - 0.058210457193828925f, - -0.018831122390764166f, - -0.102778567522516130f, - 0.019291268777910851f, - 0.317182812089170980f, - 0.480536048712957740f, - 0.317182812089170980f, - 0.019291268777910851f, - -0.102778567522516130f, - -0.018831122390764166f, - 0.058210457193828925f, - 0.018060406839966188f, - -0.038051941291319488f, - -0.017029165534577999f, - 0.026178028229057050f, - 0.015778580923975386f, - -0.018209086168089920f, - -0.014344287749952384f, - 0.012490374909303374f, - 0.012781117215688672f, - -0.008251061374053964f, - -0.011151300589456603f, - 0.005077150379032227f, - 0.009511042111613645f, - -0.002717062331286239f, - -0.007915926496343137f, - 0.001008090651156955f, - 0.006424890506348696f, - 0.000177424749467386f, - -0.005119016867477646f, - -0.000982433398470081f, - 0.004080689203761314f, - 0.001637205667907783f, - -0.003379460736391527f, - -0.002713628293157090f, - 0.002625480716699286f, - 0.005977464755456102f, - 0.004853019240304940f, - 0.002073370222476234f, - 0.000399985734121014f + 0.000399985734121014f, + 0.002073370222476234f, + 0.004853019240304940f, + 0.005977464755456102f, + 0.002625480716699286f, + -0.002713628293157090f, + -0.003379460736391527f, + 0.001637205667907783f, + 0.004080689203761314f, + -0.000982433398470081f, + -0.005119016867477646f, + 0.000177424749467386f, + 0.006424890506348696f, + 0.001008090651156955f, + -0.007915926496343137f, + -0.002717062331286239f, + 0.009511042111613645f, + 0.005077150379032227f, + -0.011151300589456603f, + -0.008251061374053964f, + 0.012781117215688672f, + 0.012490374909303374f, + -0.014344287749952384f, + -0.018209086168089920f, + 0.015778580923975386f, + 0.026178028229057050f, + -0.017029165534577999f, + -0.038051941291319488f, + 0.018060406839966188f, + 0.058210457193828925f, + -0.018831122390764166f, + -0.102778567522516130f, + 0.019291268777910851f, + 0.317182812089170980f, + 0.480536048712957740f, + 0.317182812089170980f, + 0.019291268777910851f, + -0.102778567522516130f, + -0.018831122390764166f, + 0.058210457193828925f, + 0.018060406839966188f, + -0.038051941291319488f, + -0.017029165534577999f, + 0.026178028229057050f, + 0.015778580923975386f, + -0.018209086168089920f, + -0.014344287749952384f, + 0.012490374909303374f, + 0.012781117215688672f, + -0.008251061374053964f, + -0.011151300589456603f, + 0.005077150379032227f, + 0.009511042111613645f, + -0.002717062331286239f, + -0.007915926496343137f, + 0.001008090651156955f, + 0.006424890506348696f, + 0.000177424749467386f, + -0.005119016867477646f, + -0.000982433398470081f, + 0.004080689203761314f, + 0.001637205667907783f, + -0.003379460736391527f, + -0.002713628293157090f, + 0.002625480716699286f, + 0.005977464755456102f, + 0.004853019240304940f, + 0.002073370222476234f, + 0.000399985734121014f }; static const int d_4_r_4_len = 139; static const float d_4_r_4_kernel[] = { - 0.000042167047949931f, - 0.000162480875041441f, - 0.000413474829003805f, - 0.000815488719349860f, - 0.001323484844111109f, - 0.001803932401530970f, - 0.002050805379425780f, - 0.001851476423100084f, - 0.001088358238163842f, - -0.000165599354540670f, - -0.001612840277093291f, - -0.002799173360323900f, - -0.003280737659419560f, - -0.002830930204582274f, - -0.001589296551711622f, - -0.000060142418430366f, - 0.001072157673911288f, - 0.001252059507347206f, - 0.000346781210023729f, - -0.001233491421169468f, - -0.002682865592015316f, - -0.003178340139233828f, - -0.002320119390193667f, - -0.000402092792444196f, - 0.001661437823975322f, - 0.002761727219457103f, - 0.002186981534424376f, - 0.000071307331744879f, - -0.002570893712874658f, - -0.004301512250227543f, - -0.004015094439084645f, - -0.001606879839533175f, - 0.001838674337622738f, - 0.004510048531846937f, - 0.004804547613530567f, - 0.002266863620581679f, - -0.002004704037111716f, - -0.005785548895574678f, - -0.006849655924079080f, - -0.004239720077392586f, - 0.001024318787772757f, - 0.006275193248599259f, - 0.008511512338709764f, - 0.006070603106211769f, - -0.000247611530141919f, - -0.007317511868656072f, - -0.011170336815604164f, - -0.009152698013614463f, - -0.001621157345452147f, - 0.007851435931989321f, - 0.014073238852672171f, - 0.012972692080589394f, - 0.004087473189926854f, - -0.008634954375856124f, - -0.018413964067748419f, - -0.019050011539439745f, - -0.008545626179408438f, - 0.009039966712164142f, - 0.024793283315122296f, - 0.029034181171149441f, - 0.016560363014866013f, - -0.009522346448795137f, - -0.037569562545468192f, - -0.051411140638474247f, - -0.037221789978391415f, - 0.009679493935209005f, - 0.081286213859684806f, - 0.158552299980228740f, - 0.217917169253869340f, - 0.240164834839879550f, - 0.217917169253869340f, - 0.158552299980228740f, - 0.081286213859684806f, - 0.009679493935209005f, - -0.037221789978391415f, - -0.051411140638474247f, - -0.037569562545468192f, - -0.009522346448795137f, - 0.016560363014866013f, - 0.029034181171149441f, - 0.024793283315122296f, - 0.009039966712164142f, - -0.008545626179408438f, - -0.019050011539439745f, - -0.018413964067748419f, - -0.008634954375856124f, - 0.004087473189926854f, - 0.012972692080589394f, - 0.014073238852672171f, - 0.007851435931989321f, - -0.001621157345452147f, - -0.009152698013614463f, - -0.011170336815604164f, - -0.007317511868656072f, - -0.000247611530141919f, - 0.006070603106211769f, - 0.008511512338709764f, - 0.006275193248599259f, - 0.001024318787772757f, - -0.004239720077392586f, - -0.006849655924079080f, - -0.005785548895574678f, - -0.002004704037111716f, - 0.002266863620581679f, - 0.004804547613530567f, - 0.004510048531846937f, - 0.001838674337622738f, - -0.001606879839533175f, - -0.004015094439084645f, - -0.004301512250227543f, - -0.002570893712874658f, - 0.000071307331744879f, - 0.002186981534424376f, - 0.002761727219457103f, - 0.001661437823975322f, - -0.000402092792444196f, - -0.002320119390193667f, - -0.003178340139233828f, - -0.002682865592015316f, - -0.001233491421169468f, - 0.000346781210023729f, - 0.001252059507347206f, - 0.001072157673911288f, - -0.000060142418430366f, - -0.001589296551711622f, - -0.002830930204582274f, - -0.003280737659419560f, - -0.002799173360323900f, - -0.001612840277093291f, - -0.000165599354540670f, - 0.001088358238163842f, - 0.001851476423100084f, - 0.002050805379425780f, - 0.001803932401530970f, - 0.001323484844111109f, - 0.000815488719349860f, - 0.000413474829003805f, - 0.000162480875041441f, - 0.000042167047949931f + 0.000042167047949931f, + 0.000162480875041441f, + 0.000413474829003805f, + 0.000815488719349860f, + 0.001323484844111109f, + 0.001803932401530970f, + 0.002050805379425780f, + 0.001851476423100084f, + 0.001088358238163842f, + -0.000165599354540670f, + -0.001612840277093291f, + -0.002799173360323900f, + -0.003280737659419560f, + -0.002830930204582274f, + -0.001589296551711622f, + -0.000060142418430366f, + 0.001072157673911288f, + 0.001252059507347206f, + 0.000346781210023729f, + -0.001233491421169468f, + -0.002682865592015316f, + -0.003178340139233828f, + -0.002320119390193667f, + -0.000402092792444196f, + 0.001661437823975322f, + 0.002761727219457103f, + 0.002186981534424376f, + 0.000071307331744879f, + -0.002570893712874658f, + -0.004301512250227543f, + -0.004015094439084645f, + -0.001606879839533175f, + 0.001838674337622738f, + 0.004510048531846937f, + 0.004804547613530567f, + 0.002266863620581679f, + -0.002004704037111716f, + -0.005785548895574678f, + -0.006849655924079080f, + -0.004239720077392586f, + 0.001024318787772757f, + 0.006275193248599259f, + 0.008511512338709764f, + 0.006070603106211769f, + -0.000247611530141919f, + -0.007317511868656072f, + -0.011170336815604164f, + -0.009152698013614463f, + -0.001621157345452147f, + 0.007851435931989321f, + 0.014073238852672171f, + 0.012972692080589394f, + 0.004087473189926854f, + -0.008634954375856124f, + -0.018413964067748419f, + -0.019050011539439745f, + -0.008545626179408438f, + 0.009039966712164142f, + 0.024793283315122296f, + 0.029034181171149441f, + 0.016560363014866013f, + -0.009522346448795137f, + -0.037569562545468192f, + -0.051411140638474247f, + -0.037221789978391415f, + 0.009679493935209005f, + 0.081286213859684806f, + 0.158552299980228740f, + 0.217917169253869340f, + 0.240164834839879550f, + 0.217917169253869340f, + 0.158552299980228740f, + 0.081286213859684806f, + 0.009679493935209005f, + -0.037221789978391415f, + -0.051411140638474247f, + -0.037569562545468192f, + -0.009522346448795137f, + 0.016560363014866013f, + 0.029034181171149441f, + 0.024793283315122296f, + 0.009039966712164142f, + -0.008545626179408438f, + -0.019050011539439745f, + -0.018413964067748419f, + -0.008634954375856124f, + 0.004087473189926854f, + 0.012972692080589394f, + 0.014073238852672171f, + 0.007851435931989321f, + -0.001621157345452147f, + -0.009152698013614463f, + -0.011170336815604164f, + -0.007317511868656072f, + -0.000247611530141919f, + 0.006070603106211769f, + 0.008511512338709764f, + 0.006275193248599259f, + 0.001024318787772757f, + -0.004239720077392586f, + -0.006849655924079080f, + -0.005785548895574678f, + -0.002004704037111716f, + 0.002266863620581679f, + 0.004804547613530567f, + 0.004510048531846937f, + 0.001838674337622738f, + -0.001606879839533175f, + -0.004015094439084645f, + -0.004301512250227543f, + -0.002570893712874658f, + 0.000071307331744879f, + 0.002186981534424376f, + 0.002761727219457103f, + 0.001661437823975322f, + -0.000402092792444196f, + -0.002320119390193667f, + -0.003178340139233828f, + -0.002682865592015316f, + -0.001233491421169468f, + 0.000346781210023729f, + 0.001252059507347206f, + 0.001072157673911288f, + -0.000060142418430366f, + -0.001589296551711622f, + -0.002830930204582274f, + -0.003280737659419560f, + -0.002799173360323900f, + -0.001612840277093291f, + -0.000165599354540670f, + 0.001088358238163842f, + 0.001851476423100084f, + 0.002050805379425780f, + 0.001803932401530970f, + 0.001323484844111109f, + 0.000815488719349860f, + 0.000413474829003805f, + 0.000162480875041441f, + 0.000042167047949931f }; static const int d_8_r_8_len = 280; static const float d_8_r_8_kernel[] = { - 0.000005299484859782f, - 0.000023653198869943f, - 0.000045443155025411f, - 0.000086660616597102f, - 0.000145468147843215f, - 0.000227646032445337f, - 0.000334591194217999f, - 0.000466890457500183f, - 0.000622018386430552f, - 0.000794466626663634f, - 0.000975304575250323f, - 0.001152454785657775f, - 0.001311296864337127f, - 0.001435783630074849f, - 0.001509953148215840f, - 0.001519741581366084f, - 0.001454903824191261f, - 0.001310813201213376f, - 0.001089882810057675f, - 0.000802361759738747f, - 0.000466304093914126f, - 0.000106589241438445f, - -0.000247017317721992f, - -0.000562646941659305f, - -0.000809708828030606f, - -0.000962510996013040f, - -0.001003685261621032f, - -0.000926952775265634f, - -0.000738799897838057f, - -0.000458730744403599f, - -0.000117916487516219f, - 0.000243742648939376f, - 0.000581911777806535f, - 0.000853035291692318f, - 0.001019866746633974f, - 0.001056611000192218f, - 0.000952962453331239f, - 0.000716408838645576f, - 0.000372351073038558f, - -0.000038150274869667f, - -0.000462881782404900f, - -0.000844797294892937f, - -0.001129425716907750f, - -0.001272432677940103f, - -0.001246307890160262f, - -0.001045192378203970f, - -0.000687044203214210f, - -0.000212653183490116f, - 0.000318579724580746f, - 0.000835734644546107f, - 0.001265542439063603f, - 0.001542487733459282f, - 0.001618487960413105f, - 0.001470755262270050f, - 0.001106608046232222f, - 0.000564346197878288f, - -0.000090197750452171f, - -0.000771230463597417f, - -0.001383890554706424f, - -0.001837132239362339f, - -0.002056896211703681f, - -0.001997709076123834f, - -0.001650953765714851f, - -0.001048413504576680f, - -0.000260276733547870f, - 0.000612469118131840f, - 0.001450527381084600f, - 0.002132190093380017f, - 0.002550584440683641f, - 0.002629881881769309f, - 0.002338080196576415f, - 0.001694308341293216f, - 0.000769260408641065f, - -0.000321736170028782f, - -0.001432485915523021f, - -0.002404976322971185f, - -0.003091310085438950f, - -0.003375549372556256f, - -0.003192330168178722f, - -0.002539372888669491f, - -0.001481713556478757f, - -0.000146533823587781f, - 0.001291251516558131f, - 0.002631154368260663f, - 0.003674321213032700f, - 0.004252198884660451f, - 0.004252637433548458f, - 0.003639528435255283f, - 0.002462762274858131f, - 0.000856475239499534f, - -0.000974892854265319f, - -0.002781496880057425f, - -0.004301065594668099f, - -0.005295755541230454f, - -0.005587859925192526f, - -0.005089203765495300f, - -0.003819632950038145f, - -0.001911267954229858f, - 0.000402995000090862f, - 0.002816115056235722f, - 0.004985868963592199f, - 0.006581423530514738f, - 0.007331423828496663f, - 0.007066900231758860f, - 0.005752595831756849f, - 0.003501526672561130f, - 0.000569595914029656f, - -0.002670342281476470f, - -0.005772755486290897f, - -0.008277141861910673f, - -0.009772095428011296f, - -0.009957304065452081f, - -0.008694779007964944f, - -0.006041501906687299f, - -0.002257673645446692f, - 0.002212348869418207f, - 0.006785874581560984f, - 0.010810304734210376f, - 0.013646746123386143f, - 0.014758915386036504f, - 0.013796112346034117f, - 0.010659097540521932f, - 0.005539210274923477f, - -0.001076115841043161f, - -0.008434444147245189f, - -0.015584625308516726f, - -0.021472430244782261f, - -0.025055744331654087f, - -0.025426655616721288f, - -0.021926322954481325f, - -0.014238733805135361f, - -0.002451384366749276f, - 0.012925647002682830f, - 0.030986186274100380f, - 0.050498778538203032f, - 0.070015421670629074f, - 0.088007266252761618f, - 0.103012981470773550f, - 0.113783757663955240f, - 0.119409036455313980f, - 0.119409036455313980f, - 0.113783757663955240f, - 0.103012981470773550f, - 0.088007266252761618f, - 0.070015421670629074f, - 0.050498778538203032f, - 0.030986186274100380f, - 0.012925647002682830f, - -0.002451384366749276f, - -0.014238733805135361f, - -0.021926322954481325f, - -0.025426655616721288f, - -0.025055744331654087f, - -0.021472430244782261f, - -0.015584625308516726f, - -0.008434444147245189f, - -0.001076115841043161f, - 0.005539210274923477f, - 0.010659097540521932f, - 0.013796112346034117f, - 0.014758915386036504f, - 0.013646746123386143f, - 0.010810304734210376f, - 0.006785874581560984f, - 0.002212348869418207f, - -0.002257673645446692f, - -0.006041501906687299f, - -0.008694779007964944f, - -0.009957304065452081f, - -0.009772095428011296f, - -0.008277141861910673f, - -0.005772755486290897f, - -0.002670342281476470f, - 0.000569595914029656f, - 0.003501526672561130f, - 0.005752595831756849f, - 0.007066900231758860f, - 0.007331423828496663f, - 0.006581423530514738f, - 0.004985868963592199f, - 0.002816115056235722f, - 0.000402995000090862f, - -0.001911267954229858f, - -0.003819632950038145f, - -0.005089203765495300f, - -0.005587859925192526f, - -0.005295755541230454f, - -0.004301065594668099f, - -0.002781496880057425f, - -0.000974892854265319f, - 0.000856475239499534f, - 0.002462762274858131f, - 0.003639528435255283f, - 0.004252637433548458f, - 0.004252198884660451f, - 0.003674321213032700f, - 0.002631154368260663f, - 0.001291251516558131f, - -0.000146533823587781f, - -0.001481713556478757f, - -0.002539372888669491f, - -0.003192330168178722f, - -0.003375549372556256f, - -0.003091310085438950f, - -0.002404976322971185f, - -0.001432485915523021f, - -0.000321736170028782f, - 0.000769260408641065f, - 0.001694308341293216f, - 0.002338080196576415f, - 0.002629881881769309f, - 0.002550584440683641f, - 0.002132190093380017f, - 0.001450527381084600f, - 0.000612469118131840f, - -0.000260276733547870f, - -0.001048413504576680f, - -0.001650953765714851f, - -0.001997709076123834f, - -0.002056896211703681f, - -0.001837132239362339f, - -0.001383890554706424f, - -0.000771230463597417f, - -0.000090197750452171f, - 0.000564346197878288f, - 0.001106608046232222f, - 0.001470755262270050f, - 0.001618487960413105f, - 0.001542487733459282f, - 0.001265542439063603f, - 0.000835734644546107f, - 0.000318579724580746f, - -0.000212653183490116f, - -0.000687044203214210f, - -0.001045192378203970f, - -0.001246307890160262f, - -0.001272432677940103f, - -0.001129425716907750f, - -0.000844797294892937f, - -0.000462881782404900f, - -0.000038150274869667f, - 0.000372351073038558f, - 0.000716408838645576f, - 0.000952962453331239f, - 0.001056611000192218f, - 0.001019866746633974f, - 0.000853035291692318f, - 0.000581911777806535f, - 0.000243742648939376f, - -0.000117916487516219f, - -0.000458730744403599f, - -0.000738799897838057f, - -0.000926952775265634f, - -0.001003685261621032f, - -0.000962510996013040f, - -0.000809708828030606f, - -0.000562646941659305f, - -0.000247017317721992f, - 0.000106589241438445f, - 0.000466304093914126f, - 0.000802361759738747f, - 0.001089882810057675f, - 0.001310813201213376f, - 0.001454903824191261f, - 0.001519741581366084f, - 0.001509953148215840f, - 0.001435783630074849f, - 0.001311296864337127f, - 0.001152454785657775f, - 0.000975304575250323f, - 0.000794466626663634f, - 0.000622018386430552f, - 0.000466890457500183f, - 0.000334591194217999f, - 0.000227646032445337f, - 0.000145468147843215f, - 0.000086660616597102f, - 0.000045443155025411f, - 0.000023653198869943f, - 0.000005299484859782f + 0.000005299484859782f, + 0.000023653198869943f, + 0.000045443155025411f, + 0.000086660616597102f, + 0.000145468147843215f, + 0.000227646032445337f, + 0.000334591194217999f, + 0.000466890457500183f, + 0.000622018386430552f, + 0.000794466626663634f, + 0.000975304575250323f, + 0.001152454785657775f, + 0.001311296864337127f, + 0.001435783630074849f, + 0.001509953148215840f, + 0.001519741581366084f, + 0.001454903824191261f, + 0.001310813201213376f, + 0.001089882810057675f, + 0.000802361759738747f, + 0.000466304093914126f, + 0.000106589241438445f, + -0.000247017317721992f, + -0.000562646941659305f, + -0.000809708828030606f, + -0.000962510996013040f, + -0.001003685261621032f, + -0.000926952775265634f, + -0.000738799897838057f, + -0.000458730744403599f, + -0.000117916487516219f, + 0.000243742648939376f, + 0.000581911777806535f, + 0.000853035291692318f, + 0.001019866746633974f, + 0.001056611000192218f, + 0.000952962453331239f, + 0.000716408838645576f, + 0.000372351073038558f, + -0.000038150274869667f, + -0.000462881782404900f, + -0.000844797294892937f, + -0.001129425716907750f, + -0.001272432677940103f, + -0.001246307890160262f, + -0.001045192378203970f, + -0.000687044203214210f, + -0.000212653183490116f, + 0.000318579724580746f, + 0.000835734644546107f, + 0.001265542439063603f, + 0.001542487733459282f, + 0.001618487960413105f, + 0.001470755262270050f, + 0.001106608046232222f, + 0.000564346197878288f, + -0.000090197750452171f, + -0.000771230463597417f, + -0.001383890554706424f, + -0.001837132239362339f, + -0.002056896211703681f, + -0.001997709076123834f, + -0.001650953765714851f, + -0.001048413504576680f, + -0.000260276733547870f, + 0.000612469118131840f, + 0.001450527381084600f, + 0.002132190093380017f, + 0.002550584440683641f, + 0.002629881881769309f, + 0.002338080196576415f, + 0.001694308341293216f, + 0.000769260408641065f, + -0.000321736170028782f, + -0.001432485915523021f, + -0.002404976322971185f, + -0.003091310085438950f, + -0.003375549372556256f, + -0.003192330168178722f, + -0.002539372888669491f, + -0.001481713556478757f, + -0.000146533823587781f, + 0.001291251516558131f, + 0.002631154368260663f, + 0.003674321213032700f, + 0.004252198884660451f, + 0.004252637433548458f, + 0.003639528435255283f, + 0.002462762274858131f, + 0.000856475239499534f, + -0.000974892854265319f, + -0.002781496880057425f, + -0.004301065594668099f, + -0.005295755541230454f, + -0.005587859925192526f, + -0.005089203765495300f, + -0.003819632950038145f, + -0.001911267954229858f, + 0.000402995000090862f, + 0.002816115056235722f, + 0.004985868963592199f, + 0.006581423530514738f, + 0.007331423828496663f, + 0.007066900231758860f, + 0.005752595831756849f, + 0.003501526672561130f, + 0.000569595914029656f, + -0.002670342281476470f, + -0.005772755486290897f, + -0.008277141861910673f, + -0.009772095428011296f, + -0.009957304065452081f, + -0.008694779007964944f, + -0.006041501906687299f, + -0.002257673645446692f, + 0.002212348869418207f, + 0.006785874581560984f, + 0.010810304734210376f, + 0.013646746123386143f, + 0.014758915386036504f, + 0.013796112346034117f, + 0.010659097540521932f, + 0.005539210274923477f, + -0.001076115841043161f, + -0.008434444147245189f, + -0.015584625308516726f, + -0.021472430244782261f, + -0.025055744331654087f, + -0.025426655616721288f, + -0.021926322954481325f, + -0.014238733805135361f, + -0.002451384366749276f, + 0.012925647002682830f, + 0.030986186274100380f, + 0.050498778538203032f, + 0.070015421670629074f, + 0.088007266252761618f, + 0.103012981470773550f, + 0.113783757663955240f, + 0.119409036455313980f, + 0.119409036455313980f, + 0.113783757663955240f, + 0.103012981470773550f, + 0.088007266252761618f, + 0.070015421670629074f, + 0.050498778538203032f, + 0.030986186274100380f, + 0.012925647002682830f, + -0.002451384366749276f, + -0.014238733805135361f, + -0.021926322954481325f, + -0.025426655616721288f, + -0.025055744331654087f, + -0.021472430244782261f, + -0.015584625308516726f, + -0.008434444147245189f, + -0.001076115841043161f, + 0.005539210274923477f, + 0.010659097540521932f, + 0.013796112346034117f, + 0.014758915386036504f, + 0.013646746123386143f, + 0.010810304734210376f, + 0.006785874581560984f, + 0.002212348869418207f, + -0.002257673645446692f, + -0.006041501906687299f, + -0.008694779007964944f, + -0.009957304065452081f, + -0.009772095428011296f, + -0.008277141861910673f, + -0.005772755486290897f, + -0.002670342281476470f, + 0.000569595914029656f, + 0.003501526672561130f, + 0.005752595831756849f, + 0.007066900231758860f, + 0.007331423828496663f, + 0.006581423530514738f, + 0.004985868963592199f, + 0.002816115056235722f, + 0.000402995000090862f, + -0.001911267954229858f, + -0.003819632950038145f, + -0.005089203765495300f, + -0.005587859925192526f, + -0.005295755541230454f, + -0.004301065594668099f, + -0.002781496880057425f, + -0.000974892854265319f, + 0.000856475239499534f, + 0.002462762274858131f, + 0.003639528435255283f, + 0.004252637433548458f, + 0.004252198884660451f, + 0.003674321213032700f, + 0.002631154368260663f, + 0.001291251516558131f, + -0.000146533823587781f, + -0.001481713556478757f, + -0.002539372888669491f, + -0.003192330168178722f, + -0.003375549372556256f, + -0.003091310085438950f, + -0.002404976322971185f, + -0.001432485915523021f, + -0.000321736170028782f, + 0.000769260408641065f, + 0.001694308341293216f, + 0.002338080196576415f, + 0.002629881881769309f, + 0.002550584440683641f, + 0.002132190093380017f, + 0.001450527381084600f, + 0.000612469118131840f, + -0.000260276733547870f, + -0.001048413504576680f, + -0.001650953765714851f, + -0.001997709076123834f, + -0.002056896211703681f, + -0.001837132239362339f, + -0.001383890554706424f, + -0.000771230463597417f, + -0.000090197750452171f, + 0.000564346197878288f, + 0.001106608046232222f, + 0.001470755262270050f, + 0.001618487960413105f, + 0.001542487733459282f, + 0.001265542439063603f, + 0.000835734644546107f, + 0.000318579724580746f, + -0.000212653183490116f, + -0.000687044203214210f, + -0.001045192378203970f, + -0.001246307890160262f, + -0.001272432677940103f, + -0.001129425716907750f, + -0.000844797294892937f, + -0.000462881782404900f, + -0.000038150274869667f, + 0.000372351073038558f, + 0.000716408838645576f, + 0.000952962453331239f, + 0.001056611000192218f, + 0.001019866746633974f, + 0.000853035291692318f, + 0.000581911777806535f, + 0.000243742648939376f, + -0.000117916487516219f, + -0.000458730744403599f, + -0.000738799897838057f, + -0.000926952775265634f, + -0.001003685261621032f, + -0.000962510996013040f, + -0.000809708828030606f, + -0.000562646941659305f, + -0.000247017317721992f, + 0.000106589241438445f, + 0.000466304093914126f, + 0.000802361759738747f, + 0.001089882810057675f, + 0.001310813201213376f, + 0.001454903824191261f, + 0.001519741581366084f, + 0.001509953148215840f, + 0.001435783630074849f, + 0.001311296864337127f, + 0.001152454785657775f, + 0.000975304575250323f, + 0.000794466626663634f, + 0.000622018386430552f, + 0.000466890457500183f, + 0.000334591194217999f, + 0.000227646032445337f, + 0.000145468147843215f, + 0.000086660616597102f, + 0.000045443155025411f, + 0.000023653198869943f, + 0.000005299484859782f }; static const int d_16_r_8_len = 54; static const float d_16_r_8_kernel[] = { - -0.000010553664672862f, - -0.000061498701563991f, - -0.000169601122616288f, - -0.000389180581238296f, - -0.000769984128346191f, - -0.001370862255977838f, - -0.002239657737237394f, - -0.003399895346870093f, - -0.004830710741492023f, - -0.006448450828431843f, - -0.008091858901382079f, - -0.009515843884697457f, - -0.010397443295914180f, - -0.010356613550454467f, - -0.008992200646607676f, - -0.005930785604319544f, - -0.000883275448312690f, - 0.006298249742162992f, - 0.015572313369334116f, - 0.026677316967261836f, - 0.039125602626276818f, - 0.052226529544645239f, - 0.065138652777540620f, - 0.076946528099683636f, - 0.086753462256061120f, - 0.093778457566739207f, - 0.097444274566674538f, - 0.097444274566674538f, - 0.093778457566739207f, - 0.086753462256061120f, - 0.076946528099683636f, - 0.065138652777540620f, - 0.052226529544645239f, - 0.039125602626276818f, - 0.026677316967261836f, - 0.015572313369334116f, - 0.006298249742162992f, - -0.000883275448312690f, - -0.005930785604319544f, - -0.008992200646607676f, - -0.010356613550454467f, - -0.010397443295914180f, - -0.009515843884697457f, - -0.008091858901382079f, - -0.006448450828431843f, - -0.004830710741492023f, - -0.003399895346870093f, - -0.002239657737237394f, - -0.001370862255977838f, - -0.000769984128346191f, - -0.000389180581238296f, - -0.000169601122616288f, - -0.000061498701563991f, - -0.000010553664672862f + -0.000010553664672862f, + -0.000061498701563991f, + -0.000169601122616288f, + -0.000389180581238296f, + -0.000769984128346191f, + -0.001370862255977838f, + -0.002239657737237394f, + -0.003399895346870093f, + -0.004830710741492023f, + -0.006448450828431843f, + -0.008091858901382079f, + -0.009515843884697457f, + -0.010397443295914180f, + -0.010356613550454467f, + -0.008992200646607676f, + -0.005930785604319544f, + -0.000883275448312690f, + 0.006298249742162992f, + 0.015572313369334116f, + 0.026677316967261836f, + 0.039125602626276818f, + 0.052226529544645239f, + 0.065138652777540620f, + 0.076946528099683636f, + 0.086753462256061120f, + 0.093778457566739207f, + 0.097444274566674538f, + 0.097444274566674538f, + 0.093778457566739207f, + 0.086753462256061120f, + 0.076946528099683636f, + 0.065138652777540620f, + 0.052226529544645239f, + 0.039125602626276818f, + 0.026677316967261836f, + 0.015572313369334116f, + 0.006298249742162992f, + -0.000883275448312690f, + -0.005930785604319544f, + -0.008992200646607676f, + -0.010356613550454467f, + -0.010397443295914180f, + -0.009515843884697457f, + -0.008091858901382079f, + -0.006448450828431843f, + -0.004830710741492023f, + -0.003399895346870093f, + -0.002239657737237394f, + -0.001370862255977838f, + -0.000769984128346191f, + -0.000389180581238296f, + -0.000169601122616288f, + -0.000061498701563991f, + -0.000010553664672862f }; static const int d_32_r_16_len = 107; static const float d_32_r_16_kernel[] = { - -0.000004024163639795f, - -0.000017672975608646f, - -0.000028369983125930f, - -0.000051841257358260f, - -0.000084114931088978f, - -0.000130374705334955f, - -0.000193165706690690f, - -0.000276282392544972f, - -0.000383294466797586f, - -0.000517836385761646f, - -0.000683246849920059f, - -0.000882378788952720f, - -0.001117308161626894f, - -0.001389043294976996f, - -0.001697213461428019f, - -0.002039760314912465f, - -0.002412643435722481f, - -0.002809577646098091f, - -0.003221818992095683f, - -0.003638016956253216f, - -0.004044149516577933f, - -0.004423556043039536f, - -0.004757080371798020f, - -0.005023332869090757f, - -0.005199075945795754f, - -0.005259732456805450f, - -0.005180010907146506f, - -0.004934635615957972f, - -0.004499164222082719f, - -0.003850869437258024f, - -0.002969657050308204f, - -0.001838988139263688f, - -0.000446770521598867f, - 0.001213817123243464f, - 0.003143605116121320f, - 0.005336851770962665f, - 0.007780833517050342f, - 0.010455633416035585f, - 0.013334149150643793f, - 0.016382334116677784f, - 0.019559676833852839f, - 0.022819914826782396f, - 0.026111969807273771f, - 0.029381081811115123f, - 0.032570111325119062f, - 0.035620970792186964f, - 0.038476140562399175f, - 0.041080219701286683f, - 0.043381459308086866f, - 0.045333225316341701f, - 0.046895339212960678f, - 0.048035248704517766f, - 0.048728985952954711f, - 0.048961878385199747f, - 0.048728985952954711f, - 0.048035248704517766f, - 0.046895339212960678f, - 0.045333225316341701f, - 0.043381459308086866f, - 0.041080219701286683f, - 0.038476140562399175f, - 0.035620970792186964f, - 0.032570111325119062f, - 0.029381081811115123f, - 0.026111969807273771f, - 0.022819914826782396f, - 0.019559676833852839f, - 0.016382334116677784f, - 0.013334149150643793f, - 0.010455633416035585f, - 0.007780833517050342f, - 0.005336851770962665f, - 0.003143605116121320f, - 0.001213817123243464f, - -0.000446770521598867f, - -0.001838988139263688f, - -0.002969657050308204f, - -0.003850869437258024f, - -0.004499164222082719f, - -0.004934635615957972f, - -0.005180010907146506f, - -0.005259732456805450f, - -0.005199075945795754f, - -0.005023332869090757f, - -0.004757080371798020f, - -0.004423556043039536f, - -0.004044149516577933f, - -0.003638016956253216f, - -0.003221818992095683f, - -0.002809577646098091f, - -0.002412643435722481f, - -0.002039760314912465f, - -0.001697213461428019f, - -0.001389043294976996f, - -0.001117308161626894f, - -0.000882378788952720f, - -0.000683246849920059f, - -0.000517836385761646f, - -0.000383294466797586f, - -0.000276282392544972f, - -0.000193165706690690f, - -0.000130374705334955f, - -0.000084114931088978f, - -0.000051841257358260f, - -0.000028369983125930f, - -0.000017672975608646f, - -0.000004024163639795f + -0.000004024163639795f, + -0.000017672975608646f, + -0.000028369983125930f, + -0.000051841257358260f, + -0.000084114931088978f, + -0.000130374705334955f, + -0.000193165706690690f, + -0.000276282392544972f, + -0.000383294466797586f, + -0.000517836385761646f, + -0.000683246849920059f, + -0.000882378788952720f, + -0.001117308161626894f, + -0.001389043294976996f, + -0.001697213461428019f, + -0.002039760314912465f, + -0.002412643435722481f, + -0.002809577646098091f, + -0.003221818992095683f, + -0.003638016956253216f, + -0.004044149516577933f, + -0.004423556043039536f, + -0.004757080371798020f, + -0.005023332869090757f, + -0.005199075945795754f, + -0.005259732456805450f, + -0.005180010907146506f, + -0.004934635615957972f, + -0.004499164222082719f, + -0.003850869437258024f, + -0.002969657050308204f, + -0.001838988139263688f, + -0.000446770521598867f, + 0.001213817123243464f, + 0.003143605116121320f, + 0.005336851770962665f, + 0.007780833517050342f, + 0.010455633416035585f, + 0.013334149150643793f, + 0.016382334116677784f, + 0.019559676833852839f, + 0.022819914826782396f, + 0.026111969807273771f, + 0.029381081811115123f, + 0.032570111325119062f, + 0.035620970792186964f, + 0.038476140562399175f, + 0.041080219701286683f, + 0.043381459308086866f, + 0.045333225316341701f, + 0.046895339212960678f, + 0.048035248704517766f, + 0.048728985952954711f, + 0.048961878385199747f, + 0.048728985952954711f, + 0.048035248704517766f, + 0.046895339212960678f, + 0.045333225316341701f, + 0.043381459308086866f, + 0.041080219701286683f, + 0.038476140562399175f, + 0.035620970792186964f, + 0.032570111325119062f, + 0.029381081811115123f, + 0.026111969807273771f, + 0.022819914826782396f, + 0.019559676833852839f, + 0.016382334116677784f, + 0.013334149150643793f, + 0.010455633416035585f, + 0.007780833517050342f, + 0.005336851770962665f, + 0.003143605116121320f, + 0.001213817123243464f, + -0.000446770521598867f, + -0.001838988139263688f, + -0.002969657050308204f, + -0.003850869437258024f, + -0.004499164222082719f, + -0.004934635615957972f, + -0.005180010907146506f, + -0.005259732456805450f, + -0.005199075945795754f, + -0.005023332869090757f, + -0.004757080371798020f, + -0.004423556043039536f, + -0.004044149516577933f, + -0.003638016956253216f, + -0.003221818992095683f, + -0.002809577646098091f, + -0.002412643435722481f, + -0.002039760314912465f, + -0.001697213461428019f, + -0.001389043294976996f, + -0.001117308161626894f, + -0.000882378788952720f, + -0.000683246849920059f, + -0.000517836385761646f, + -0.000383294466797586f, + -0.000276282392544972f, + -0.000193165706690690f, + -0.000130374705334955f, + -0.000084114931088978f, + -0.000051841257358260f, + -0.000028369983125930f, + -0.000017672975608646f, + -0.000004024163639795f }; static const int d_64_r_32_len = 212; static const float d_64_r_32_kernel[] = { - -0.000004403823942508f, - -0.000008963059919890f, - -0.000007276052892980f, - -0.000013448546764569f, - -0.000016407338246392f, - -0.000022821877811828f, - -0.000029059859493782f, - -0.000037502053326083f, - -0.000047050128769168f, - -0.000058647705667398f, - -0.000072066821233235f, - -0.000087775432302674f, - -0.000105848488644829f, - -0.000126598475702349f, - -0.000150205141042045f, - -0.000176926965601505f, - -0.000206973701715915f, - -0.000240575602493366f, - -0.000277937749971926f, - -0.000319260777052827f, - -0.000364722541989086f, - -0.000414482134953896f, - -0.000468670554403767f, - -0.000527388854339363f, - -0.000590701722925615f, - -0.000658633566464172f, - -0.000731163061150287f, - -0.000808218604975926f, - -0.000889673345622962f, - -0.000975340650633742f, - -0.001064969616730599f, - -0.001158240957389821f, - -0.001254763178484453f, - -0.001354069203096897f, - -0.001455613461052586f, - -0.001558769541846508f, - -0.001662828458596891f, - -0.001766997597152117f, - -0.001870400403116935f, - -0.001972076865069115f, - -0.002070984841172726f, - -0.002166002272448999f, - -0.002255930317598858f, - -0.002339497436442704f, - -0.002415364439683740f, - -0.002482130514177367f, - -0.002538340220525754f, - -0.002582491452580508f, - -0.002613044332960035f, - -0.002628431011812668f, - -0.002627066321370591f, - -0.002607359228695053f, - -0.002567725018271331f, - -0.002506598123060911f, - -0.002422445514576562f, - -0.002313780550524778f, - -0.002179177170034060f, - -0.002017284317828416f, - -0.001826840471286680f, - -0.001606688137875605f, - -0.001355788185007890f, - -0.001073233860638388f, - -0.000758264360902667f, - -0.000410277798843436f, - -0.000028843430628706f, - 0.000386287004249912f, - 0.000835168966487215f, - 0.001317655958647924f, - 0.001833391650175865f, - 0.002381803404668191f, - 0.002962097316406667f, - 0.003573254853063226f, - 0.004214031187543062f, - 0.004882955288187807f, - 0.005578331822331469f, - 0.006298244909815173f, - 0.007040563748502659f, - 0.007802950114525442f, - 0.008582867722817980f, - 0.009377593413961051f, - 0.010184230117287451f, - 0.010999721518727896f, - 0.011820868346749476f, - 0.012644346170734195f, - 0.013466724590201118f, - 0.014284487677241258f, - 0.015094055520281103f, - 0.015891806704001060f, - 0.016674101548252919f, - 0.017437305919088521f, - 0.018177815416425963f, - 0.018892079736813970f, - 0.019576627004361302f, - 0.020228087861972253f, - 0.020843219113185100f, - 0.021418926707647539f, - 0.021952287867040517f, - 0.022440572154110033f, - 0.022881261295670835f, - 0.023272067580484536f, - 0.023610950665041715f, - 0.023896132633698622f, - 0.024126111175283287f, - 0.024299670755100852f, - 0.024415891678976044f, - 0.024474156966027200f, - 0.024474156966027200f, - 0.024415891678976044f, - 0.024299670755100852f, - 0.024126111175283287f, - 0.023896132633698622f, - 0.023610950665041715f, - 0.023272067580484536f, - 0.022881261295670835f, - 0.022440572154110033f, - 0.021952287867040517f, - 0.021418926707647539f, - 0.020843219113185100f, - 0.020228087861972253f, - 0.019576627004361302f, - 0.018892079736813970f, - 0.018177815416425963f, - 0.017437305919088521f, - 0.016674101548252919f, - 0.015891806704001060f, - 0.015094055520281103f, - 0.014284487677241258f, - 0.013466724590201118f, - 0.012644346170734195f, - 0.011820868346749476f, - 0.010999721518727896f, - 0.010184230117287451f, - 0.009377593413961051f, - 0.008582867722817980f, - 0.007802950114525442f, - 0.007040563748502659f, - 0.006298244909815173f, - 0.005578331822331469f, - 0.004882955288187807f, - 0.004214031187543062f, - 0.003573254853063226f, - 0.002962097316406667f, - 0.002381803404668191f, - 0.001833391650175865f, - 0.001317655958647924f, - 0.000835168966487215f, - 0.000386287004249912f, - -0.000028843430628706f, - -0.000410277798843436f, - -0.000758264360902667f, - -0.001073233860638388f, - -0.001355788185007890f, - -0.001606688137875605f, - -0.001826840471286680f, - -0.002017284317828416f, - -0.002179177170034060f, - -0.002313780550524778f, - -0.002422445514576562f, - -0.002506598123060911f, - -0.002567725018271331f, - -0.002607359228695053f, - -0.002627066321370591f, - -0.002628431011812668f, - -0.002613044332960035f, - -0.002582491452580508f, - -0.002538340220525754f, - -0.002482130514177367f, - -0.002415364439683740f, - -0.002339497436442704f, - -0.002255930317598858f, - -0.002166002272448999f, - -0.002070984841172726f, - -0.001972076865069115f, - -0.001870400403116935f, - -0.001766997597152117f, - -0.001662828458596891f, - -0.001558769541846508f, - -0.001455613461052586f, - -0.001354069203096897f, - -0.001254763178484453f, - -0.001158240957389821f, - -0.001064969616730599f, - -0.000975340650633742f, - -0.000889673345622962f, - -0.000808218604975926f, - -0.000731163061150287f, - -0.000658633566464172f, - -0.000590701722925615f, - -0.000527388854339363f, - -0.000468670554403767f, - -0.000414482134953896f, - -0.000364722541989086f, - -0.000319260777052827f, - -0.000277937749971926f, - -0.000240575602493366f, - -0.000206973701715915f, - -0.000176926965601505f, - -0.000150205141042045f, - -0.000126598475702349f, - -0.000105848488644829f, - -0.000087775432302674f, - -0.000072066821233235f, - -0.000058647705667398f, - -0.000047050128769168f, - -0.000037502053326083f, - -0.000029059859493782f, - -0.000022821877811828f, - -0.000016407338246392f, - -0.000013448546764569f, - -0.000007276052892980f, - -0.000008963059919890f, - -0.000004403823942508f + -0.000004403823942508f, + -0.000008963059919890f, + -0.000007276052892980f, + -0.000013448546764569f, + -0.000016407338246392f, + -0.000022821877811828f, + -0.000029059859493782f, + -0.000037502053326083f, + -0.000047050128769168f, + -0.000058647705667398f, + -0.000072066821233235f, + -0.000087775432302674f, + -0.000105848488644829f, + -0.000126598475702349f, + -0.000150205141042045f, + -0.000176926965601505f, + -0.000206973701715915f, + -0.000240575602493366f, + -0.000277937749971926f, + -0.000319260777052827f, + -0.000364722541989086f, + -0.000414482134953896f, + -0.000468670554403767f, + -0.000527388854339363f, + -0.000590701722925615f, + -0.000658633566464172f, + -0.000731163061150287f, + -0.000808218604975926f, + -0.000889673345622962f, + -0.000975340650633742f, + -0.001064969616730599f, + -0.001158240957389821f, + -0.001254763178484453f, + -0.001354069203096897f, + -0.001455613461052586f, + -0.001558769541846508f, + -0.001662828458596891f, + -0.001766997597152117f, + -0.001870400403116935f, + -0.001972076865069115f, + -0.002070984841172726f, + -0.002166002272448999f, + -0.002255930317598858f, + -0.002339497436442704f, + -0.002415364439683740f, + -0.002482130514177367f, + -0.002538340220525754f, + -0.002582491452580508f, + -0.002613044332960035f, + -0.002628431011812668f, + -0.002627066321370591f, + -0.002607359228695053f, + -0.002567725018271331f, + -0.002506598123060911f, + -0.002422445514576562f, + -0.002313780550524778f, + -0.002179177170034060f, + -0.002017284317828416f, + -0.001826840471286680f, + -0.001606688137875605f, + -0.001355788185007890f, + -0.001073233860638388f, + -0.000758264360902667f, + -0.000410277798843436f, + -0.000028843430628706f, + 0.000386287004249912f, + 0.000835168966487215f, + 0.001317655958647924f, + 0.001833391650175865f, + 0.002381803404668191f, + 0.002962097316406667f, + 0.003573254853063226f, + 0.004214031187543062f, + 0.004882955288187807f, + 0.005578331822331469f, + 0.006298244909815173f, + 0.007040563748502659f, + 0.007802950114525442f, + 0.008582867722817980f, + 0.009377593413961051f, + 0.010184230117287451f, + 0.010999721518727896f, + 0.011820868346749476f, + 0.012644346170734195f, + 0.013466724590201118f, + 0.014284487677241258f, + 0.015094055520281103f, + 0.015891806704001060f, + 0.016674101548252919f, + 0.017437305919088521f, + 0.018177815416425963f, + 0.018892079736813970f, + 0.019576627004361302f, + 0.020228087861972253f, + 0.020843219113185100f, + 0.021418926707647539f, + 0.021952287867040517f, + 0.022440572154110033f, + 0.022881261295670835f, + 0.023272067580484536f, + 0.023610950665041715f, + 0.023896132633698622f, + 0.024126111175283287f, + 0.024299670755100852f, + 0.024415891678976044f, + 0.024474156966027200f, + 0.024474156966027200f, + 0.024415891678976044f, + 0.024299670755100852f, + 0.024126111175283287f, + 0.023896132633698622f, + 0.023610950665041715f, + 0.023272067580484536f, + 0.022881261295670835f, + 0.022440572154110033f, + 0.021952287867040517f, + 0.021418926707647539f, + 0.020843219113185100f, + 0.020228087861972253f, + 0.019576627004361302f, + 0.018892079736813970f, + 0.018177815416425963f, + 0.017437305919088521f, + 0.016674101548252919f, + 0.015891806704001060f, + 0.015094055520281103f, + 0.014284487677241258f, + 0.013466724590201118f, + 0.012644346170734195f, + 0.011820868346749476f, + 0.010999721518727896f, + 0.010184230117287451f, + 0.009377593413961051f, + 0.008582867722817980f, + 0.007802950114525442f, + 0.007040563748502659f, + 0.006298244909815173f, + 0.005578331822331469f, + 0.004882955288187807f, + 0.004214031187543062f, + 0.003573254853063226f, + 0.002962097316406667f, + 0.002381803404668191f, + 0.001833391650175865f, + 0.001317655958647924f, + 0.000835168966487215f, + 0.000386287004249912f, + -0.000028843430628706f, + -0.000410277798843436f, + -0.000758264360902667f, + -0.001073233860638388f, + -0.001355788185007890f, + -0.001606688137875605f, + -0.001826840471286680f, + -0.002017284317828416f, + -0.002179177170034060f, + -0.002313780550524778f, + -0.002422445514576562f, + -0.002506598123060911f, + -0.002567725018271331f, + -0.002607359228695053f, + -0.002627066321370591f, + -0.002628431011812668f, + -0.002613044332960035f, + -0.002582491452580508f, + -0.002538340220525754f, + -0.002482130514177367f, + -0.002415364439683740f, + -0.002339497436442704f, + -0.002255930317598858f, + -0.002166002272448999f, + -0.002070984841172726f, + -0.001972076865069115f, + -0.001870400403116935f, + -0.001766997597152117f, + -0.001662828458596891f, + -0.001558769541846508f, + -0.001455613461052586f, + -0.001354069203096897f, + -0.001254763178484453f, + -0.001158240957389821f, + -0.001064969616730599f, + -0.000975340650633742f, + -0.000889673345622962f, + -0.000808218604975926f, + -0.000731163061150287f, + -0.000658633566464172f, + -0.000590701722925615f, + -0.000527388854339363f, + -0.000468670554403767f, + -0.000414482134953896f, + -0.000364722541989086f, + -0.000319260777052827f, + -0.000277937749971926f, + -0.000240575602493366f, + -0.000206973701715915f, + -0.000176926965601505f, + -0.000150205141042045f, + -0.000126598475702349f, + -0.000105848488644829f, + -0.000087775432302674f, + -0.000072066821233235f, + -0.000058647705667398f, + -0.000047050128769168f, + -0.000037502053326083f, + -0.000029059859493782f, + -0.000022821877811828f, + -0.000016407338246392f, + -0.000013448546764569f, + -0.000007276052892980f, + -0.000008963059919890f, + -0.000004403823942508f }; static const int d_128_r_32_len = 174; static const float d_128_r_32_kernel[] = { - -0.000007703161797332f, - -0.000007067232655723f, - -0.000010206071983051f, - -0.000014172048980291f, - -0.000019092331824095f, - -0.000025093561850217f, - -0.000032309725460887f, - -0.000040869410108629f, - -0.000050902771287247f, - -0.000062527941809152f, - -0.000075857080877625f, - -0.000090981984892608f, - -0.000107979276021387f, - -0.000126895337525829f, - -0.000147750778600044f, - -0.000170524898241214f, - -0.000195159646270053f, - -0.000221543901544016f, - -0.000249517228886741f, - -0.000278854334896464f, - -0.000309268991706370f, - -0.000340399096744052f, - -0.000371811190567229f, - -0.000402986592324930f, - -0.000433326971103446f, - -0.000462142048725246f, - -0.000488656689255886f, - -0.000512000649038707f, - -0.000531217622524194f, - -0.000545257474301118f, - -0.000552987616398289f, - -0.000553188077307909f, - -0.000544565488882758f, - -0.000525751232639430f, - -0.000495318184744208f, - -0.000451782034515639f, - -0.000393620779029084f, - -0.000319279140356296f, - -0.000227190622760720f, - -0.000115784771504684f, - 0.000016488581452787f, - 0.000171149664304299f, - 0.000349662890884785f, - 0.000553425442457719f, - 0.000783740497411292f, - 0.001041804838025221f, - 0.001328682064289453f, - 0.001645290145967291f, - 0.001992375608565783f, - 0.002370502036550272f, - 0.002780026279675712f, - 0.003221088947286086f, - 0.003693593686280741f, - 0.004197200680900796f, - 0.004731309996663634f, - 0.005295059011515552f, - 0.005887310701543637f, - 0.006506655780921748f, - 0.007151406625936390f, - 0.007819604696828528f, - 0.008509020566706571f, - 0.009217166946123657f, - 0.009941305011649831f, - 0.010678463067957514f, - 0.011425449071796635f, - 0.012178874660574504f, - 0.012935173457761552f, - 0.013690629889370804f, - 0.014441402554104810f, - 0.015183556958199267f, - 0.015913092956531424f, - 0.016625980278750660f, - 0.017318188813430120f, - 0.017985725593062503f, - 0.018624666516886546f, - 0.019231193320663705f, - 0.019801625228558870f, - 0.020332454367773867f, - 0.020820375812973399f, - 0.021262319920613983f, - 0.021655479285054610f, - 0.021997336565315176f, - 0.022285687008084795f, - 0.022518660515178174f, - 0.022694738600454345f, - 0.022812769691468757f, - 0.022871979661449618f, - 0.022871979661449618f, - 0.022812769691468757f, - 0.022694738600454345f, - 0.022518660515178174f, - 0.022285687008084795f, - 0.021997336565315176f, - 0.021655479285054610f, - 0.021262319920613983f, - 0.020820375812973399f, - 0.020332454367773867f, - 0.019801625228558870f, - 0.019231193320663705f, - 0.018624666516886546f, - 0.017985725593062503f, - 0.017318188813430120f, - 0.016625980278750660f, - 0.015913092956531424f, - 0.015183556958199267f, - 0.014441402554104810f, - 0.013690629889370804f, - 0.012935173457761552f, - 0.012178874660574504f, - 0.011425449071796635f, - 0.010678463067957514f, - 0.009941305011649831f, - 0.009217166946123657f, - 0.008509020566706571f, - 0.007819604696828528f, - 0.007151406625936390f, - 0.006506655780921748f, - 0.005887310701543637f, - 0.005295059011515552f, - 0.004731309996663634f, - 0.004197200680900796f, - 0.003693593686280741f, - 0.003221088947286086f, - 0.002780026279675712f, - 0.002370502036550272f, - 0.001992375608565783f, - 0.001645290145967291f, - 0.001328682064289453f, - 0.001041804838025221f, - 0.000783740497411292f, - 0.000553425442457719f, - 0.000349662890884785f, - 0.000171149664304299f, - 0.000016488581452787f, - -0.000115784771504684f, - -0.000227190622760720f, - -0.000319279140356296f, - -0.000393620779029084f, - -0.000451782034515639f, - -0.000495318184744208f, - -0.000525751232639430f, - -0.000544565488882758f, - -0.000553188077307909f, - -0.000552987616398289f, - -0.000545257474301118f, - -0.000531217622524194f, - -0.000512000649038707f, - -0.000488656689255886f, - -0.000462142048725246f, - -0.000433326971103446f, - -0.000402986592324930f, - -0.000371811190567229f, - -0.000340399096744052f, - -0.000309268991706370f, - -0.000278854334896464f, - -0.000249517228886741f, - -0.000221543901544016f, - -0.000195159646270053f, - -0.000170524898241214f, - -0.000147750778600044f, - -0.000126895337525829f, - -0.000107979276021387f, - -0.000090981984892608f, - -0.000075857080877625f, - -0.000062527941809152f, - -0.000050902771287247f, - -0.000040869410108629f, - -0.000032309725460887f, - -0.000025093561850217f, - -0.000019092331824095f, - -0.000014172048980291f, - -0.000010206071983051f, - -0.000007067232655723f, - -0.000007703161797332f + -0.000007703161797332f, + -0.000007067232655723f, + -0.000010206071983051f, + -0.000014172048980291f, + -0.000019092331824095f, + -0.000025093561850217f, + -0.000032309725460887f, + -0.000040869410108629f, + -0.000050902771287247f, + -0.000062527941809152f, + -0.000075857080877625f, + -0.000090981984892608f, + -0.000107979276021387f, + -0.000126895337525829f, + -0.000147750778600044f, + -0.000170524898241214f, + -0.000195159646270053f, + -0.000221543901544016f, + -0.000249517228886741f, + -0.000278854334896464f, + -0.000309268991706370f, + -0.000340399096744052f, + -0.000371811190567229f, + -0.000402986592324930f, + -0.000433326971103446f, + -0.000462142048725246f, + -0.000488656689255886f, + -0.000512000649038707f, + -0.000531217622524194f, + -0.000545257474301118f, + -0.000552987616398289f, + -0.000553188077307909f, + -0.000544565488882758f, + -0.000525751232639430f, + -0.000495318184744208f, + -0.000451782034515639f, + -0.000393620779029084f, + -0.000319279140356296f, + -0.000227190622760720f, + -0.000115784771504684f, + 0.000016488581452787f, + 0.000171149664304299f, + 0.000349662890884785f, + 0.000553425442457719f, + 0.000783740497411292f, + 0.001041804838025221f, + 0.001328682064289453f, + 0.001645290145967291f, + 0.001992375608565783f, + 0.002370502036550272f, + 0.002780026279675712f, + 0.003221088947286086f, + 0.003693593686280741f, + 0.004197200680900796f, + 0.004731309996663634f, + 0.005295059011515552f, + 0.005887310701543637f, + 0.006506655780921748f, + 0.007151406625936390f, + 0.007819604696828528f, + 0.008509020566706571f, + 0.009217166946123657f, + 0.009941305011649831f, + 0.010678463067957514f, + 0.011425449071796635f, + 0.012178874660574504f, + 0.012935173457761552f, + 0.013690629889370804f, + 0.014441402554104810f, + 0.015183556958199267f, + 0.015913092956531424f, + 0.016625980278750660f, + 0.017318188813430120f, + 0.017985725593062503f, + 0.018624666516886546f, + 0.019231193320663705f, + 0.019801625228558870f, + 0.020332454367773867f, + 0.020820375812973399f, + 0.021262319920613983f, + 0.021655479285054610f, + 0.021997336565315176f, + 0.022285687008084795f, + 0.022518660515178174f, + 0.022694738600454345f, + 0.022812769691468757f, + 0.022871979661449618f, + 0.022871979661449618f, + 0.022812769691468757f, + 0.022694738600454345f, + 0.022518660515178174f, + 0.022285687008084795f, + 0.021997336565315176f, + 0.021655479285054610f, + 0.021262319920613983f, + 0.020820375812973399f, + 0.020332454367773867f, + 0.019801625228558870f, + 0.019231193320663705f, + 0.018624666516886546f, + 0.017985725593062503f, + 0.017318188813430120f, + 0.016625980278750660f, + 0.015913092956531424f, + 0.015183556958199267f, + 0.014441402554104810f, + 0.013690629889370804f, + 0.012935173457761552f, + 0.012178874660574504f, + 0.011425449071796635f, + 0.010678463067957514f, + 0.009941305011649831f, + 0.009217166946123657f, + 0.008509020566706571f, + 0.007819604696828528f, + 0.007151406625936390f, + 0.006506655780921748f, + 0.005887310701543637f, + 0.005295059011515552f, + 0.004731309996663634f, + 0.004197200680900796f, + 0.003693593686280741f, + 0.003221088947286086f, + 0.002780026279675712f, + 0.002370502036550272f, + 0.001992375608565783f, + 0.001645290145967291f, + 0.001328682064289453f, + 0.001041804838025221f, + 0.000783740497411292f, + 0.000553425442457719f, + 0.000349662890884785f, + 0.000171149664304299f, + 0.000016488581452787f, + -0.000115784771504684f, + -0.000227190622760720f, + -0.000319279140356296f, + -0.000393620779029084f, + -0.000451782034515639f, + -0.000495318184744208f, + -0.000525751232639430f, + -0.000544565488882758f, + -0.000553188077307909f, + -0.000552987616398289f, + -0.000545257474301118f, + -0.000531217622524194f, + -0.000512000649038707f, + -0.000488656689255886f, + -0.000462142048725246f, + -0.000433326971103446f, + -0.000402986592324930f, + -0.000371811190567229f, + -0.000340399096744052f, + -0.000309268991706370f, + -0.000278854334896464f, + -0.000249517228886741f, + -0.000221543901544016f, + -0.000195159646270053f, + -0.000170524898241214f, + -0.000147750778600044f, + -0.000126895337525829f, + -0.000107979276021387f, + -0.000090981984892608f, + -0.000075857080877625f, + -0.000062527941809152f, + -0.000050902771287247f, + -0.000040869410108629f, + -0.000032309725460887f, + -0.000025093561850217f, + -0.000019092331824095f, + -0.000014172048980291f, + -0.000010206071983051f, + -0.000007067232655723f, + -0.000007703161797332f }; static const int d_256_r_64_len = 348; static const float d_256_r_64_kernel[] = { - -0.000006032200297229f, - -0.000002790586794678f, - -0.000003423524464373f, - -0.000004141892670381f, - -0.000004959329780957f, - -0.000005880953015414f, - -0.000006916263845337f, - -0.000008064028056128f, - -0.000009336504822940f, - -0.000010742797132820f, - -0.000012302324525658f, - -0.000014003128525449f, - -0.000015868003792231f, - -0.000017906061357310f, - -0.000020111369902626f, - -0.000022508204619172f, - -0.000025093613992638f, - -0.000027881953296601f, - -0.000030875236885189f, - -0.000034086060833210f, - -0.000037517497377010f, - -0.000041176665997414f, - -0.000045067469478981f, - -0.000049199353227621f, - -0.000053568215176887f, - -0.000058185242147041f, - -0.000063047547807853f, - -0.000068158618146586f, - -0.000073517650784389f, - -0.000079124725926570f, - -0.000084976788235246f, - -0.000091070103041806f, - -0.000097399649098627f, - -0.000103959504668590f, - -0.000110738977492950f, - -0.000117729935644196f, - -0.000124919754739577f, - -0.000132293212128623f, - -0.000139836270835869f, - -0.000147529334756596f, - -0.000155353239032747f, - -0.000163284378055491f, - -0.000171298895948762f, - -0.000179368841745378f, - -0.000187464129074148f, - -0.000195552549576070f, - -0.000203599379753965f, - -0.000211565351775375f, - -0.000219411598860001f, - -0.000227093646507866f, - -0.000234565855614429f, - -0.000241779257421431f, - -0.000248682177854843f, - -0.000255220180724547f, - -0.000261335292980978f, - -0.000266967862740791f, - -0.000272054419087176f, - -0.000276528686849870f, - -0.000280322370041046f, - -0.000283363923695878f, - -0.000285578633373008f, - -0.000286890694598539f, - -0.000287220112764771f, - -0.000286486063219693f, - -0.000284603980740463f, - -0.000281488659987540f, - -0.000277051522643753f, - -0.000271202733437524f, - -0.000263850662609383f, - -0.000254902132867105f, - -0.000244261829079865f, - -0.000231834561467387f, - -0.000217522684614226f, - -0.000201228717970838f, - -0.000182854056621652f, - -0.000162300101972573f, - -0.000139467943568298f, - -0.000114258627064630f, - -0.000086574168670878f, - -0.000056316612617103f, - -0.000023389083735015f, - 0.000012303734435184f, - 0.000050856088211618f, - 0.000092360432854175f, - 0.000136906695012963f, - 0.000184583050199368f, - 0.000235474395169584f, - 0.000289663252276950f, - 0.000347228091667187f, - 0.000408244468331575f, - 0.000472783700962668f, - 0.000540912739938505f, - 0.000612694289527581f, - 0.000688186201030564f, - 0.000767440808596336f, - 0.000850505496981770f, - 0.000937421598757782f, - 0.001028224584686942f, - 0.001122943571650730f, - 0.001221601170177604f, - 0.001324213422447449f, - 0.001430788817328081f, - 0.001541329271676986f, - 0.001655828820474164f, - 0.001774273932442011f, - 0.001896643321221287f, - 0.002022907760579356f, - 0.002153029565104709f, - 0.002286963138555204f, - 0.002424654105591249f, - 0.002566039990527927f, - 0.002711049190015392f, - 0.002859602052878106f, - 0.003011609882021581f, - 0.003166975340851216f, - 0.003325592606007947f, - 0.003487347156138999f, - 0.003652115769225347f, - 0.003819766988190932f, - 0.003990160791661657f, - 0.004163149004759460f, - 0.004338575232032592f, - 0.004516275281704776f, - 0.004696077226065694f, - 0.004877801369702575f, - 0.005061261175365414f, - 0.005246262760259225f, - 0.005432605634097002f, - 0.005620082968897619f, - 0.005808481837004595f, - 0.005997583515661679f, - 0.006187164045980849f, - 0.006376994441064236f, - 0.006566841257680600f, - 0.006756466702660143f, - 0.006945629644096785f, - 0.007134085474240178f, - 0.007321586857189369f, - 0.007507884388699728f, - 0.007692726710717013f, - 0.007875861286146892f, - 0.008057034853723447f, - 0.008235993962285608f, - 0.008412485423992495f, - 0.008586256905270668f, - 0.008757057550423931f, - 0.008924638381879985f, - 0.009088752763977616f, - 0.009249157391806035f, - 0.009405612190690901f, - 0.009557881349450560f, - 0.009705733651032743f, - 0.009848943025250930f, - 0.009987289003226731f, - 0.010120557317645952f, - 0.010248540384643352f, - 0.010371037696321509f, - 0.010487856281889540f, - 0.010598811426250850f, - 0.010703726661456589f, - 0.010802434494593470f, - 0.010894776824678817f, - 0.010980605060844476f, - 0.011059780725514858f, - 0.011132175645830765f, - 0.011197672374601442f, - 0.011256164283833567f, - 0.011307555970121824f, - 0.011351763540287503f, - 0.011388714558166329f, - 0.011418348423280301f, - 0.011440616600089638f, - 0.011455482402780947f, - 0.011462921415360990f, - 0.011462921415360990f, - 0.011455482402780947f, - 0.011440616600089638f, - 0.011418348423280301f, - 0.011388714558166329f, - 0.011351763540287503f, - 0.011307555970121824f, - 0.011256164283833567f, - 0.011197672374601442f, - 0.011132175645830765f, - 0.011059780725514858f, - 0.010980605060844476f, - 0.010894776824678817f, - 0.010802434494593470f, - 0.010703726661456589f, - 0.010598811426250850f, - 0.010487856281889540f, - 0.010371037696321509f, - 0.010248540384643352f, - 0.010120557317645952f, - 0.009987289003226731f, - 0.009848943025250930f, - 0.009705733651032743f, - 0.009557881349450560f, - 0.009405612190690901f, - 0.009249157391806035f, - 0.009088752763977616f, - 0.008924638381879985f, - 0.008757057550423931f, - 0.008586256905270668f, - 0.008412485423992495f, - 0.008235993962285608f, - 0.008057034853723447f, - 0.007875861286146892f, - 0.007692726710717013f, - 0.007507884388699728f, - 0.007321586857189369f, - 0.007134085474240178f, - 0.006945629644096785f, - 0.006756466702660143f, - 0.006566841257680600f, - 0.006376994441064236f, - 0.006187164045980849f, - 0.005997583515661679f, - 0.005808481837004595f, - 0.005620082968897619f, - 0.005432605634097002f, - 0.005246262760259225f, - 0.005061261175365414f, - 0.004877801369702575f, - 0.004696077226065694f, - 0.004516275281704776f, - 0.004338575232032592f, - 0.004163149004759460f, - 0.003990160791661657f, - 0.003819766988190932f, - 0.003652115769225347f, - 0.003487347156138999f, - 0.003325592606007947f, - 0.003166975340851216f, - 0.003011609882021581f, - 0.002859602052878106f, - 0.002711049190015392f, - 0.002566039990527927f, - 0.002424654105591249f, - 0.002286963138555204f, - 0.002153029565104709f, - 0.002022907760579356f, - 0.001896643321221287f, - 0.001774273932442011f, - 0.001655828820474164f, - 0.001541329271676986f, - 0.001430788817328081f, - 0.001324213422447449f, - 0.001221601170177604f, - 0.001122943571650730f, - 0.001028224584686942f, - 0.000937421598757782f, - 0.000850505496981770f, - 0.000767440808596336f, - 0.000688186201030564f, - 0.000612694289527581f, - 0.000540912739938505f, - 0.000472783700962668f, - 0.000408244468331575f, - 0.000347228091667187f, - 0.000289663252276950f, - 0.000235474395169584f, - 0.000184583050199368f, - 0.000136906695012963f, - 0.000092360432854175f, - 0.000050856088211618f, - 0.000012303734435184f, - -0.000023389083735015f, - -0.000056316612617103f, - -0.000086574168670878f, - -0.000114258627064630f, - -0.000139467943568298f, - -0.000162300101972573f, - -0.000182854056621652f, - -0.000201228717970838f, - -0.000217522684614226f, - -0.000231834561467387f, - -0.000244261829079865f, - -0.000254902132867105f, - -0.000263850662609383f, - -0.000271202733437524f, - -0.000277051522643753f, - -0.000281488659987540f, - -0.000284603980740463f, - -0.000286486063219693f, - -0.000287220112764771f, - -0.000286890694598539f, - -0.000285578633373008f, - -0.000283363923695878f, - -0.000280322370041046f, - -0.000276528686849870f, - -0.000272054419087176f, - -0.000266967862740791f, - -0.000261335292980978f, - -0.000255220180724547f, - -0.000248682177854843f, - -0.000241779257421431f, - -0.000234565855614429f, - -0.000227093646507866f, - -0.000219411598860001f, - -0.000211565351775375f, - -0.000203599379753965f, - -0.000195552549576070f, - -0.000187464129074148f, - -0.000179368841745378f, - -0.000171298895948762f, - -0.000163284378055491f, - -0.000155353239032747f, - -0.000147529334756596f, - -0.000139836270835869f, - -0.000132293212128623f, - -0.000124919754739577f, - -0.000117729935644196f, - -0.000110738977492950f, - -0.000103959504668590f, - -0.000097399649098627f, - -0.000091070103041806f, - -0.000084976788235246f, - -0.000079124725926570f, - -0.000073517650784389f, - -0.000068158618146586f, - -0.000063047547807853f, - -0.000058185242147041f, - -0.000053568215176887f, - -0.000049199353227621f, - -0.000045067469478981f, - -0.000041176665997414f, - -0.000037517497377010f, - -0.000034086060833210f, - -0.000030875236885189f, - -0.000027881953296601f, - -0.000025093613992638f, - -0.000022508204619172f, - -0.000020111369902626f, - -0.000017906061357310f, - -0.000015868003792231f, - -0.000014003128525449f, - -0.000012302324525658f, - -0.000010742797132820f, - -0.000009336504822940f, - -0.000008064028056128f, - -0.000006916263845337f, - -0.000005880953015414f, - -0.000004959329780957f, - -0.000004141892670381f, - -0.000003423524464373f, - -0.000002790586794678f, - -0.000006032200297229f + -0.000006032200297229f, + -0.000002790586794678f, + -0.000003423524464373f, + -0.000004141892670381f, + -0.000004959329780957f, + -0.000005880953015414f, + -0.000006916263845337f, + -0.000008064028056128f, + -0.000009336504822940f, + -0.000010742797132820f, + -0.000012302324525658f, + -0.000014003128525449f, + -0.000015868003792231f, + -0.000017906061357310f, + -0.000020111369902626f, + -0.000022508204619172f, + -0.000025093613992638f, + -0.000027881953296601f, + -0.000030875236885189f, + -0.000034086060833210f, + -0.000037517497377010f, + -0.000041176665997414f, + -0.000045067469478981f, + -0.000049199353227621f, + -0.000053568215176887f, + -0.000058185242147041f, + -0.000063047547807853f, + -0.000068158618146586f, + -0.000073517650784389f, + -0.000079124725926570f, + -0.000084976788235246f, + -0.000091070103041806f, + -0.000097399649098627f, + -0.000103959504668590f, + -0.000110738977492950f, + -0.000117729935644196f, + -0.000124919754739577f, + -0.000132293212128623f, + -0.000139836270835869f, + -0.000147529334756596f, + -0.000155353239032747f, + -0.000163284378055491f, + -0.000171298895948762f, + -0.000179368841745378f, + -0.000187464129074148f, + -0.000195552549576070f, + -0.000203599379753965f, + -0.000211565351775375f, + -0.000219411598860001f, + -0.000227093646507866f, + -0.000234565855614429f, + -0.000241779257421431f, + -0.000248682177854843f, + -0.000255220180724547f, + -0.000261335292980978f, + -0.000266967862740791f, + -0.000272054419087176f, + -0.000276528686849870f, + -0.000280322370041046f, + -0.000283363923695878f, + -0.000285578633373008f, + -0.000286890694598539f, + -0.000287220112764771f, + -0.000286486063219693f, + -0.000284603980740463f, + -0.000281488659987540f, + -0.000277051522643753f, + -0.000271202733437524f, + -0.000263850662609383f, + -0.000254902132867105f, + -0.000244261829079865f, + -0.000231834561467387f, + -0.000217522684614226f, + -0.000201228717970838f, + -0.000182854056621652f, + -0.000162300101972573f, + -0.000139467943568298f, + -0.000114258627064630f, + -0.000086574168670878f, + -0.000056316612617103f, + -0.000023389083735015f, + 0.000012303734435184f, + 0.000050856088211618f, + 0.000092360432854175f, + 0.000136906695012963f, + 0.000184583050199368f, + 0.000235474395169584f, + 0.000289663252276950f, + 0.000347228091667187f, + 0.000408244468331575f, + 0.000472783700962668f, + 0.000540912739938505f, + 0.000612694289527581f, + 0.000688186201030564f, + 0.000767440808596336f, + 0.000850505496981770f, + 0.000937421598757782f, + 0.001028224584686942f, + 0.001122943571650730f, + 0.001221601170177604f, + 0.001324213422447449f, + 0.001430788817328081f, + 0.001541329271676986f, + 0.001655828820474164f, + 0.001774273932442011f, + 0.001896643321221287f, + 0.002022907760579356f, + 0.002153029565104709f, + 0.002286963138555204f, + 0.002424654105591249f, + 0.002566039990527927f, + 0.002711049190015392f, + 0.002859602052878106f, + 0.003011609882021581f, + 0.003166975340851216f, + 0.003325592606007947f, + 0.003487347156138999f, + 0.003652115769225347f, + 0.003819766988190932f, + 0.003990160791661657f, + 0.004163149004759460f, + 0.004338575232032592f, + 0.004516275281704776f, + 0.004696077226065694f, + 0.004877801369702575f, + 0.005061261175365414f, + 0.005246262760259225f, + 0.005432605634097002f, + 0.005620082968897619f, + 0.005808481837004595f, + 0.005997583515661679f, + 0.006187164045980849f, + 0.006376994441064236f, + 0.006566841257680600f, + 0.006756466702660143f, + 0.006945629644096785f, + 0.007134085474240178f, + 0.007321586857189369f, + 0.007507884388699728f, + 0.007692726710717013f, + 0.007875861286146892f, + 0.008057034853723447f, + 0.008235993962285608f, + 0.008412485423992495f, + 0.008586256905270668f, + 0.008757057550423931f, + 0.008924638381879985f, + 0.009088752763977616f, + 0.009249157391806035f, + 0.009405612190690901f, + 0.009557881349450560f, + 0.009705733651032743f, + 0.009848943025250930f, + 0.009987289003226731f, + 0.010120557317645952f, + 0.010248540384643352f, + 0.010371037696321509f, + 0.010487856281889540f, + 0.010598811426250850f, + 0.010703726661456589f, + 0.010802434494593470f, + 0.010894776824678817f, + 0.010980605060844476f, + 0.011059780725514858f, + 0.011132175645830765f, + 0.011197672374601442f, + 0.011256164283833567f, + 0.011307555970121824f, + 0.011351763540287503f, + 0.011388714558166329f, + 0.011418348423280301f, + 0.011440616600089638f, + 0.011455482402780947f, + 0.011462921415360990f, + 0.011462921415360990f, + 0.011455482402780947f, + 0.011440616600089638f, + 0.011418348423280301f, + 0.011388714558166329f, + 0.011351763540287503f, + 0.011307555970121824f, + 0.011256164283833567f, + 0.011197672374601442f, + 0.011132175645830765f, + 0.011059780725514858f, + 0.010980605060844476f, + 0.010894776824678817f, + 0.010802434494593470f, + 0.010703726661456589f, + 0.010598811426250850f, + 0.010487856281889540f, + 0.010371037696321509f, + 0.010248540384643352f, + 0.010120557317645952f, + 0.009987289003226731f, + 0.009848943025250930f, + 0.009705733651032743f, + 0.009557881349450560f, + 0.009405612190690901f, + 0.009249157391806035f, + 0.009088752763977616f, + 0.008924638381879985f, + 0.008757057550423931f, + 0.008586256905270668f, + 0.008412485423992495f, + 0.008235993962285608f, + 0.008057034853723447f, + 0.007875861286146892f, + 0.007692726710717013f, + 0.007507884388699728f, + 0.007321586857189369f, + 0.007134085474240178f, + 0.006945629644096785f, + 0.006756466702660143f, + 0.006566841257680600f, + 0.006376994441064236f, + 0.006187164045980849f, + 0.005997583515661679f, + 0.005808481837004595f, + 0.005620082968897619f, + 0.005432605634097002f, + 0.005246262760259225f, + 0.005061261175365414f, + 0.004877801369702575f, + 0.004696077226065694f, + 0.004516275281704776f, + 0.004338575232032592f, + 0.004163149004759460f, + 0.003990160791661657f, + 0.003819766988190932f, + 0.003652115769225347f, + 0.003487347156138999f, + 0.003325592606007947f, + 0.003166975340851216f, + 0.003011609882021581f, + 0.002859602052878106f, + 0.002711049190015392f, + 0.002566039990527927f, + 0.002424654105591249f, + 0.002286963138555204f, + 0.002153029565104709f, + 0.002022907760579356f, + 0.001896643321221287f, + 0.001774273932442011f, + 0.001655828820474164f, + 0.001541329271676986f, + 0.001430788817328081f, + 0.001324213422447449f, + 0.001221601170177604f, + 0.001122943571650730f, + 0.001028224584686942f, + 0.000937421598757782f, + 0.000850505496981770f, + 0.000767440808596336f, + 0.000688186201030564f, + 0.000612694289527581f, + 0.000540912739938505f, + 0.000472783700962668f, + 0.000408244468331575f, + 0.000347228091667187f, + 0.000289663252276950f, + 0.000235474395169584f, + 0.000184583050199368f, + 0.000136906695012963f, + 0.000092360432854175f, + 0.000050856088211618f, + 0.000012303734435184f, + -0.000023389083735015f, + -0.000056316612617103f, + -0.000086574168670878f, + -0.000114258627064630f, + -0.000139467943568298f, + -0.000162300101972573f, + -0.000182854056621652f, + -0.000201228717970838f, + -0.000217522684614226f, + -0.000231834561467387f, + -0.000244261829079865f, + -0.000254902132867105f, + -0.000263850662609383f, + -0.000271202733437524f, + -0.000277051522643753f, + -0.000281488659987540f, + -0.000284603980740463f, + -0.000286486063219693f, + -0.000287220112764771f, + -0.000286890694598539f, + -0.000285578633373008f, + -0.000283363923695878f, + -0.000280322370041046f, + -0.000276528686849870f, + -0.000272054419087176f, + -0.000266967862740791f, + -0.000261335292980978f, + -0.000255220180724547f, + -0.000248682177854843f, + -0.000241779257421431f, + -0.000234565855614429f, + -0.000227093646507866f, + -0.000219411598860001f, + -0.000211565351775375f, + -0.000203599379753965f, + -0.000195552549576070f, + -0.000187464129074148f, + -0.000179368841745378f, + -0.000171298895948762f, + -0.000163284378055491f, + -0.000155353239032747f, + -0.000147529334756596f, + -0.000139836270835869f, + -0.000132293212128623f, + -0.000124919754739577f, + -0.000117729935644196f, + -0.000110738977492950f, + -0.000103959504668590f, + -0.000097399649098627f, + -0.000091070103041806f, + -0.000084976788235246f, + -0.000079124725926570f, + -0.000073517650784389f, + -0.000068158618146586f, + -0.000063047547807853f, + -0.000058185242147041f, + -0.000053568215176887f, + -0.000049199353227621f, + -0.000045067469478981f, + -0.000041176665997414f, + -0.000037517497377010f, + -0.000034086060833210f, + -0.000030875236885189f, + -0.000027881953296601f, + -0.000025093613992638f, + -0.000022508204619172f, + -0.000020111369902626f, + -0.000017906061357310f, + -0.000015868003792231f, + -0.000014003128525449f, + -0.000012302324525658f, + -0.000010742797132820f, + -0.000009336504822940f, + -0.000008064028056128f, + -0.000006916263845337f, + -0.000005880953015414f, + -0.000004959329780957f, + -0.000004141892670381f, + -0.000003423524464373f, + -0.000002790586794678f, + -0.000006032200297229f }; - #else // Previous FIR decimator - /* Filter taps generated by matlab. * All filters are designed for 0.5 dB passband ripple and 90-100 dB stop-band * attenuation. From d85fafa903f970bd6157b517c2ac80a313525488 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Wed, 5 Apr 2017 23:23:06 +0200 Subject: [PATCH 212/334] Update readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 48b3003..5ed20ff 100644 --- a/README.md +++ b/README.md @@ -277,7 +277,8 @@ Wolfgang Fritz DK7OB - Various UI improvements. Youssef Touil -- FIRCalc design tool for optimizing input decimator. +- Two-stage FIR decimator design. +- FIRCalc design tool for optimizing previous input decimator. Some of the icons are from: - The GNOME icon theme CC-SA 3.0 by GNOME icon artists From 1b83c02c601fb35f0761a7674bdd0d90db8f039e Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 6 Apr 2017 21:09:18 +0200 Subject: [PATCH 213/334] Update news.txt --- resources/news.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/news.txt b/resources/news.txt index 77f6ac3..782c32f 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -13,6 +13,7 @@ IMPROVED: Increase narrow band receiver rate to 96 ksps (for APT). IMPROVED: LimeSDR integration. IMPROVED: Voiceover interface. + IMPROVED: Input decimator performance. 2.6.1: Released February 16, 2017 From 5bcb07b20ffa734eaf0fcb3642164a16acf23821 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Fri, 7 Apr 2017 21:01:26 +0200 Subject: [PATCH 214/334] Don't use auto type for variables Fixes issue #508. --- src/dsp/filter/fir_decim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dsp/filter/fir_decim.cpp b/src/dsp/filter/fir_decim.cpp index d7fdf64..af2ebda 100644 --- a/src/dsp/filter/fir_decim.cpp +++ b/src/dsp/filter/fir_decim.cpp @@ -113,7 +113,7 @@ fir_decim_cc::fir_decim_cc(unsigned int decim) std::cout << "Decimation: " << decim << std::endl; while (decim > 1 && index >= 0) { - auto stage = &decimation_stages[index]; + const decimation_stage *stage = &decimation_stages[index]; if (decim % stage->decimation == 0) { From a2965f0805bfff024f61fd4de363eb724a05ce18 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 23 Apr 2017 00:35:14 +0200 Subject: [PATCH 215/334] Allow frequency controller to have up to max digits --- src/applications/gqrx/mainwindow.cpp | 4 ++-- src/qtgui/freqctrl.cpp | 17 +++++++++++++++-- src/qtgui/freqctrl.h | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 72725cc..9b08e7d 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -83,7 +83,7 @@ MainWindow::MainWindow(const QString cfgfile, bool edit_conf, QWidget *parent) : setWindowTitle(QString("Gqrx %1").arg(VERSION)); /* frequency control widget */ - ui->freqCtrl->setup(10, (quint64) 0, (quint64) 9999e6, 1, UNITS_MHZ); + ui->freqCtrl->setup(0, (quint64) 0, (quint64) 9999e6, 1, UNITS_MHZ); ui->freqCtrl->setFrequency(144500000); d_filter_shape = receiver::FILTER_SHAPE_NORMAL; @@ -745,7 +745,7 @@ void MainWindow::updateFrequencyRange() qint64 start = (qint64)(rx->get_filter_offset()) + d_hw_freq_start + d_lnb_lo; qint64 stop = (qint64)(rx->get_filter_offset()) + d_hw_freq_stop + d_lnb_lo; - ui->freqCtrl->setup(10, start, stop, 1, UNITS_MHZ); + ui->freqCtrl->setup(0, start, stop, 1, UNITS_MHZ); uiDockRxOpt->setRxFreqRange(start, stop); } diff --git a/src/qtgui/freqctrl.cpp b/src/qtgui/freqctrl.cpp index 980f2d1..47d231e 100644 --- a/src/qtgui/freqctrl.cpp +++ b/src/qtgui/freqctrl.cpp @@ -72,7 +72,7 @@ CFreqCtrl::CFreqCtrl(QWidget *parent) : m_HighlightColor = QColor(0x5A, 0x5A, 0x5A, 0xFF); m_UnitsColor = Qt::gray; m_freq = 146123456; - setup(10, 1, 4000000000U, 1, UNITS_MHZ); + setup(0, 1, 4000000000U, 1, UNITS_MHZ); m_Oldfreq = 0; m_LastLeadZeroPos = 0; m_LRMouseFreqSel = false; @@ -113,6 +113,18 @@ bool CFreqCtrl::inRect(QRect &rect, QPoint &point) return false; } +static int fmax_to_numdigits(qint64 fmax) +{ + if (fmax < 1e9) + return 9; + else if (fmax < 10e9) + return 10; + else if (fmax < 100e9) + return 11; + + return 12; +} + ////////////////////////////////////////////////////////////////////////////// // Setup various parameters for the control ////////////////////////////////////////////////////////////////////////////// @@ -122,7 +134,8 @@ void CFreqCtrl::setup(int NumDigits, qint64 Minf, qint64 Maxf,int MinStep, FUNIT qint64 pwr = 1; m_LastEditDigit = 0; m_Oldfreq = -1; - m_NumDigits = NumDigits; + + m_NumDigits = NumDigits ? NumDigits : fmax_to_numdigits(Maxf); if (m_NumDigits > MAX_DIGITS) m_NumDigits = MAX_DIGITS; diff --git a/src/qtgui/freqctrl.h b/src/qtgui/freqctrl.h index cafcd3c..9828318 100644 --- a/src/qtgui/freqctrl.h +++ b/src/qtgui/freqctrl.h @@ -50,7 +50,7 @@ class CFreqCtrl : public QFrame QSize minimumSizeHint() const; QSize sizeHint() const; - //primary access routines + // Use NumDigits=0 for auto void setup(int NumDigits, qint64 Minf, qint64 Maxf,int MinStep, FUNITS UnitsType); void setUnits(FUNITS units); void setDigitColor(QColor cr); From 4d061234078c4de578cfdde0465b30bfb55c83e1 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 23 Apr 2017 00:44:00 +0200 Subject: [PATCH 216/334] Increase LNB LO range to +/- 500 GHz Fixes #343. --- src/qtgui/dockinputctl.ui | 4 ++-- src/qtgui/ioconfig.ui | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qtgui/dockinputctl.ui b/src/qtgui/dockinputctl.ui index 6c08f55..b4e8ead 100644 --- a/src/qtgui/dockinputctl.ui +++ b/src/qtgui/dockinputctl.ui @@ -82,10 +82,10 @@ 6 - -2000.000000000000000 +-500000.000000000000000 - diff --git a/src/qtgui/ioconfig.ui b/src/qtgui/ioconfig.ui index c95c5d8..bd961eb 100644 --- a/src/qtgui/ioconfig.ui +++ b/src/qtgui/ioconfig.ui @@ -126,10 +126,10 @@7900.000000000000000 +500000.000000000000000 6 - -15000.000000000000000 +-500000.000000000000000 - From 3b253e093582014b55df444321761d7570446b14 Mon Sep 17 00:00:00 2001 From: Alexandru Csete15000.000000000000000 +500000.000000000000000 Date: Sun, 23 Apr 2017 01:13:49 +0200 Subject: [PATCH 217/334] Remove incorrect type cast --- src/applications/gqrx/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 9b08e7d..f646a0e 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -83,7 +83,7 @@ MainWindow::MainWindow(const QString cfgfile, bool edit_conf, QWidget *parent) : setWindowTitle(QString("Gqrx %1").arg(VERSION)); /* frequency control widget */ - ui->freqCtrl->setup(0, (quint64) 0, (quint64) 9999e6, 1, UNITS_MHZ); + ui->freqCtrl->setup(0, 0, 9999e6, 1, UNITS_MHZ); ui->freqCtrl->setFrequency(144500000); d_filter_shape = receiver::FILTER_SHAPE_NORMAL; From e7a9d6c54f0d8a3ad846685f595f0264d1a7957d Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 23 Apr 2017 01:32:21 +0200 Subject: [PATCH 218/334] Update news.txt --- resources/news.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/news.txt b/resources/news.txt index 782c32f..a401e4d 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -14,6 +14,7 @@ IMPROVED: LimeSDR integration. IMPROVED: Voiceover interface. IMPROVED: Input decimator performance. + IMPROVED: Increased frequency limit to 999 GHz (500 GHz LO). 2.6.1: Released February 16, 2017 From ca4010d37ccfa2655c436721016926cd84958cc5 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 23 Apr 2017 22:14:33 +0200 Subject: [PATCH 219/334] Reduce the number of active digits for HF radios --- src/qtgui/freqctrl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qtgui/freqctrl.cpp b/src/qtgui/freqctrl.cpp index 47d231e..72fdd7e 100644 --- a/src/qtgui/freqctrl.cpp +++ b/src/qtgui/freqctrl.cpp @@ -115,7 +115,11 @@ bool CFreqCtrl::inRect(QRect &rect, QPoint &point) static int fmax_to_numdigits(qint64 fmax) { - if (fmax < 1e9) + if (fmax < 10e6) + return 7; + else if (fmax < 100e6) + return 8; + else if (fmax < 1e9) return 9; else if (fmax < 10e9) return 10; From a400ad490a8f6e42fd15b10b1002876fd485e159 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 23 Apr 2017 22:56:59 +0200 Subject: [PATCH 220/334] Disable digit group separators --- src/qtgui/freqctrl.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/qtgui/freqctrl.cpp b/src/qtgui/freqctrl.cpp index 72fdd7e..9bb359e 100644 --- a/src/qtgui/freqctrl.cpp +++ b/src/qtgui/freqctrl.cpp @@ -684,14 +684,13 @@ void CFreqCtrl::drawBkGround(QPainter &Painter) rect.bottom()); Painter.fillRect(m_SepRect[i], m_BkColor); digpos -= sepwidth; - if (i==m_DecPos) + if (i == m_DecPos) Painter.drawText(m_SepRect[i], Qt::AlignHCenter|Qt::AlignVCenter, "."); - else - if (i>m_DecPos && i m_DecPos && i < m_LeadZeroPos) +// Painter.drawText(m_SepRect[i], Qt::AlignHCenter|Qt::AlignVCenter, ","); + else if (i < m_LeadZeroPos) + Painter.drawText(m_SepRect[i], Qt::AlignHCenter|Qt::AlignVCenter, " "); } else { From ff597b93d6b4065072c79c6c8911f5ce9f0b1995 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Sun, 23 Apr 2017 23:30:26 +0200 Subject: [PATCH 221/334] Adjust SSB filter presets --- src/qtgui/dockrxopt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qtgui/dockrxopt.cpp b/src/qtgui/dockrxopt.cpp index ede6b1e..217e0d6 100644 --- a/src/qtgui/dockrxopt.cpp +++ b/src/qtgui/dockrxopt.cpp @@ -37,8 +37,8 @@ static const int filter_preset_table[DockRxOpt::MODE_LAST][3][2] = {{ -10000, 10000}, { -5000, 5000}, { -2500, 2500}}, // MODE_NFM {{-100000, 100000}, {-80000, 80000}, {-60000, 60000}}, // MODE_WFM_MONO {{-100000, 100000}, {-80000, 80000}, {-60000, 60000}}, // MODE_WFM_STEREO - {{ -4000, -100}, { -2800, -100}, { -1600, -200}}, // MODE_LSB - {{ 100, 4000}, { 100, 2800}, { 200, 1600}}, // MODE_USB + {{ -4000, -100}, { -2800, -100}, { -2400, -300}}, // MODE_LSB + {{ 100, 4000}, { 100, 2800}, { 300, 2400}}, // MODE_USB {{ -1000, 1000}, { -250, 250}, { -100, 100}}, // MODE_CWL {{ -1000, 1000}, { -250, 250}, { -100, 100}}, // MODE_CWU {{-100000, 100000}, {-80000, 80000}, {-60000, 60000}} // MODE_WFM_STEREO_OIRT From fdc8f6ba80347e1a646f7ba808737a756225cebd Mon Sep 17 00:00:00 2001 From: AsciiWolf Date: Wed, 26 Apr 2017 20:25:47 +0200 Subject: [PATCH 222/334] Add description to the AppData file Based on description from the Gqrx website --- gqrx.appdata.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gqrx.appdata.xml b/gqrx.appdata.xml index 4b4bc7d..ccc04b7 100644 --- a/gqrx.appdata.xml +++ b/gqrx.appdata.xml @@ -8,10 +8,10 @@ Alexandru Csete - + Gqrx is an open source software defined radio receiver (SDR) powered by the GNU Radio and the Qt graphical toolkit.
- + Gqrx supports many of the SDR hardware available, including Airspy, Funcube Dongles, rtl-sdr, HackRF and USRP devices.
CC-BY-3.0 From 0fc320b3704a69ca92fadfced3d9f00dfd88423d Mon Sep 17 00:00:00 2001 From: Matt HostetterDate: Thu, 27 Apr 2017 17:15:50 -0400 Subject: [PATCH 223/334] Add additional waterfall time spans --- src/qtgui/dockfft.cpp | 4 +++- src/qtgui/dockfft.ui | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/qtgui/dockfft.cpp b/src/qtgui/dockfft.cpp index 5056eca..a26acb3 100644 --- a/src/qtgui/dockfft.cpp +++ b/src/qtgui/dockfft.cpp @@ -364,6 +364,8 @@ void DockFft::on_fftRateComboBox_currentIndexChanged(const QString & text) static const quint64 wf_span_table[] = { 0, // Auto + 1*60*1000, // 1 minute + 2*60*1000, // 2 minutes 5*60*1000, // 5 minutes 10*60*1000, // 10 minutes 15*60*1000, // 15 minutes @@ -381,7 +383,7 @@ static const quint64 wf_span_table[] = /** Waterfall time span changed. */ void DockFft::on_wfSpanComboBox_currentIndexChanged(int index) { - if (index < 0 || index > 12) + if (index < 0 || index > 14) return; emit wfSpanChanged(wf_span_table[index]); diff --git a/src/qtgui/dockfft.ui b/src/qtgui/dockfft.ui index 6742884..e47fd6f 100644 --- a/src/qtgui/dockfft.ui +++ b/src/qtgui/dockfft.ui @@ -628,6 +628,16 @@ Auto +- +
++ +1 min +- +
+ +2 min +5 min From e62104bdaf0c210ca2fab3df96e4202987fe7192 Mon Sep 17 00:00:00 2001 From: Alexandru CseteDate: Sat, 29 Apr 2017 11:27:22 +0200 Subject: [PATCH 224/334] Update news.txt --- resources/news.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/news.txt b/resources/news.txt index a401e4d..24a95d6 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -15,6 +15,7 @@ IMPROVED: Voiceover interface. IMPROVED: Input decimator performance. IMPROVED: Increased frequency limit to 999 GHz (500 GHz LO). + IMPROVED: More short waterfall time spans. 2.6.1: Released February 16, 2017 From e6612afff02100b16d2f398aeae41d1dd34400d8 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Wed, 3 May 2017 22:53:40 +0200 Subject: [PATCH 225/334] Change squelch units to dB to free up some layout space --- src/qtgui/dockrxopt.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qtgui/dockrxopt.ui b/src/qtgui/dockrxopt.ui index 89e47a7..a3c820d 100644 --- a/src/qtgui/dockrxopt.ui +++ b/src/qtgui/dockrxopt.ui @@ -352,7 +352,7 @@ This is an offset from the hardware RF frequency.</p></body></htm true - dBFS +dB 1 From d47fd73e758ce42fc97a339b6cb5511b8139e580 Mon Sep 17 00:00:00 2001 From: Alexandru CseteDate: Wed, 3 May 2017 23:01:58 +0200 Subject: [PATCH 226/334] Add squelch reset button Fixes #516. --- resources/news.txt | 1 + src/qtgui/dockrxopt.cpp | 7 ++ src/qtgui/dockrxopt.h | 1 + src/qtgui/dockrxopt.ui | 220 ++++++++++++++++++++++------------------ 4 files changed, 131 insertions(+), 98 deletions(-) diff --git a/resources/news.txt b/resources/news.txt index 24a95d6..3a12f81 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -5,6 +5,7 @@ NEW: Restore remote control state between sessions. NEW: Support for passband when setting mode through remote. NEW: Widget to enter receiver frequency. + NEW: Button to reset squelch to its default (-150 dB) value. FIXED: Keep waterfall zoom level and zoom slider synchronised. FIXED: RDS status is not kept while jumping through bookmark. FIXED: .conf files are deleted when changes are saved. diff --git a/src/qtgui/dockrxopt.cpp b/src/qtgui/dockrxopt.cpp index 217e0d6..412feae 100644 --- a/src/qtgui/dockrxopt.cpp +++ b/src/qtgui/dockrxopt.cpp @@ -75,12 +75,14 @@ DockRxOpt::DockRxOpt(qint64 filterOffsetRange, QWidget *parent) : ui->modeButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); ui->agcButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); ui->autoSquelchButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); + ui->resetSquelchButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); #endif #ifdef Q_OS_LINUX ui->modeButton->setMinimumSize(32, 24); ui->agcButton->setMinimumSize(32, 24); ui->autoSquelchButton->setMinimumSize(32, 24); + ui->resetSquelchButton->setMinimumSize(32, 24); ui->nbOptButton->setMinimumSize(32, 24); ui->nb2Button->setMinimumSize(32, 24); ui->nb1Button->setMinimumSize(32, 24); @@ -567,6 +569,11 @@ void DockRxOpt::on_autoSquelchButton_clicked() ui->sqlSpinBox->setValue(newval); } +void DockRxOpt::on_resetSquelchButton_clicked() +{ + ui->sqlSpinBox->setValue(-150.0); +} + /** AGC preset has changed. */ void DockRxOpt::on_agcPresetCombo_currentIndexChanged(int index) { diff --git a/src/qtgui/dockrxopt.h b/src/qtgui/dockrxopt.h index 1bb47ed..4255365 100644 --- a/src/qtgui/dockrxopt.h +++ b/src/qtgui/dockrxopt.h @@ -185,6 +185,7 @@ private slots: void on_modeButton_clicked(); void on_agcButton_clicked(); void on_autoSquelchButton_clicked(); + void on_resetSquelchButton_clicked(); //void on_agcPresetCombo_activated(int index); void on_agcPresetCombo_currentIndexChanged(int index); void on_sqlSpinBox_valueChanged(double value); diff --git a/src/qtgui/dockrxopt.ui b/src/qtgui/dockrxopt.ui index a3c820d..5b83284 100644 --- a/src/qtgui/dockrxopt.ui +++ b/src/qtgui/dockrxopt.ui @@ -6,8 +6,8 @@ 0 0 -266 -313 +305 +335 @@ -18,8 +18,8 @@ - 266 -313 +305 +335 @@ -40,21 +40,6 @@ - - -4 -- -4 -- -2 -- -4 -- 2 -- -
@@ -134,43 +119,6 @@ This is an offset from the hardware RF frequency.</p></body></htm - 5 - -
- -- -- -0 -0 -- -- -50 -30 -- -- -16777215 -16777215 -- -Set squelch to the current signal or noise level -- -Auto squelch -- -A -- -- -16 -16 -@@ -331,46 +279,6 @@ This is an offset from the hardware RF frequency.</p></body></htm - -
- -- -- -0 -0 -- -Squelch level in dB below full scale -- -Squelch -- -Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter -- -true -- -dB -- -1 -- --150.000000000000000 -- -0.000000000000000 -- -1.000000000000000 -- --150.000000000000000 -- +
@@ -710,6 +618,124 @@ This is an offset from the hardware RF frequency.</p></body></htm - +
++ ++ ++ +0 +0 ++ ++ +50 +30 ++ ++ +16777215 +16777215 ++ +Reset squelch to its default value ++ +Auto squelch ++ +R ++ ++ +16 +16 +- +
+ +- +
++ ++ ++ +0 +0 ++ +Squelch level in dB below full scale ++ +Squelch ++ +Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter ++ +true ++ +dB ++ +1 ++ +-150.000000000000000 ++ +0.000000000000000 ++ +1.000000000000000 ++ +-150.000000000000000 +- +
++ ++ ++ +0 +0 ++ ++ +50 +30 ++ ++ +16777215 +16777215 ++ +Set squelch to the current signal or noise level ++ +Auto squelch ++ +A ++ ++ +16 +16 +- @@ -744,8 +770,6 @@ This is an offset from the hardware RF frequency.</p></body></htm
+modeButton agcPresetCombo agcButton -sqlSpinBox -autoSquelchButton nb1Button nb2Button nbOptButton From a815c3880fd5c17d38f0cecacaef30bdefb8d595 Mon Sep 17 00:00:00 2001 From: Alexandru CseteDate: Wed, 3 May 2017 23:09:03 +0200 Subject: [PATCH 227/334] Update tab order in DockRxOpt --- src/qtgui/dockrxopt.ui | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qtgui/dockrxopt.ui b/src/qtgui/dockrxopt.ui index 5b83284..877ebfd 100644 --- a/src/qtgui/dockrxopt.ui +++ b/src/qtgui/dockrxopt.ui @@ -770,6 +770,9 @@ This is an offset from the hardware RF frequency.</p></body></htm modeButton agcPresetCombo agcButton +sqlSpinBox +autoSquelchButton +resetSquelchButton nb1Button nb2Button nbOptButton From 5baeb40b7ff4385db62eecf891bb4e9becc069ab Mon Sep 17 00:00:00 2001 From: Alexandru CseteDate: Wed, 3 May 2017 23:10:19 +0200 Subject: [PATCH 228/334] Update tab order in I/O config --- src/qtgui/ioconfig.ui | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/qtgui/ioconfig.ui b/src/qtgui/ioconfig.ui index bd961eb..4c82e66 100644 --- a/src/qtgui/ioconfig.ui +++ b/src/qtgui/ioconfig.ui @@ -349,6 +349,16 @@ Leave it at default unless you know what you are doing. + inDevCombo +inDevEdit +inSrCombo +decimCombo +bwSpinBox +loSpinBox +outDevCombo +outSrCombo +From b860cc80d6a8eb10b61f5f737925c3ab05f0e97d Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 4 May 2017 00:00:44 +0200 Subject: [PATCH 229/334] Update CFreqCtl to support unitless display Syncing from softrig so it also includes various formatting changes. --- src/applications/gqrx/mainwindow.cpp | 4 +- src/qtgui/dockrxopt.cpp | 5 +- src/qtgui/freqctrl.cpp | 683 ++++++++++++--------------- src/qtgui/freqctrl.h | 231 +++++---- 4 files changed, 418 insertions(+), 505 deletions(-) diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index f646a0e..b095dd2 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -83,7 +83,7 @@ MainWindow::MainWindow(const QString cfgfile, bool edit_conf, QWidget *parent) : setWindowTitle(QString("Gqrx %1").arg(VERSION)); /* frequency control widget */ - ui->freqCtrl->setup(0, 0, 9999e6, 1, UNITS_MHZ); + ui->freqCtrl->setup(0, 0, 9999e6, 1, FCTL_UNIT_MHZ); ui->freqCtrl->setFrequency(144500000); d_filter_shape = receiver::FILTER_SHAPE_NORMAL; @@ -745,7 +745,7 @@ void MainWindow::updateFrequencyRange() qint64 start = (qint64)(rx->get_filter_offset()) + d_hw_freq_start + d_lnb_lo; qint64 stop = (qint64)(rx->get_filter_offset()) + d_hw_freq_stop + d_lnb_lo; - ui->freqCtrl->setup(0, start, stop, 1, UNITS_MHZ); + ui->freqCtrl->setup(0, start, stop, 1, FCTL_UNIT_MHZ); uiDockRxOpt->setRxFreqRange(start, stop); } diff --git a/src/qtgui/dockrxopt.cpp b/src/qtgui/dockrxopt.cpp index 412feae..1a178a5 100644 --- a/src/qtgui/dockrxopt.cpp +++ b/src/qtgui/dockrxopt.cpp @@ -88,7 +88,8 @@ DockRxOpt::DockRxOpt(qint64 filterOffsetRange, QWidget *parent) : ui->nb1Button->setMinimumSize(32, 24); #endif - ui->filterFreq->setup(7, -filterOffsetRange/2, filterOffsetRange/2, 1, UNITS_KHZ); + ui->filterFreq->setup(7, -filterOffsetRange/2, filterOffsetRange/2, 1, + FCTL_UNIT_KHZ); ui->filterFreq->setFrequency(0); // use same slot for filteCombo and filterShapeCombo @@ -139,7 +140,7 @@ void DockRxOpt::setFilterOffset(qint64 freq_hz) void DockRxOpt::setFilterOffsetRange(qint64 range_hz) { if (range_hz > 0) - ui->filterFreq->setup(7, -range_hz/2, range_hz/2, 1, UNITS_KHZ); + ui->filterFreq->setup(7, -range_hz/2, range_hz/2, 1, FCTL_UNIT_KHZ); } /** diff --git a/src/qtgui/freqctrl.cpp b/src/qtgui/freqctrl.cpp index 9bb359e..7e36d39 100644 --- a/src/qtgui/freqctrl.cpp +++ b/src/qtgui/freqctrl.cpp @@ -1,65 +1,51 @@ -///////////////////////////////////////////////////////////////////// -// freqctrl.cpp: implementation of the CFreqCtrl class. -// -// This class implements a frequency control widget to set/change -//frequency data. -// -// History: -// 2010-09-15 Initial creation MSW -// 2011-03-27 Initial release -// 2011-04-17 Fixed bug with m_Oldfreq being set after emit instead of before -///////////////////////////////////////////////////////////////////// - -//========================================================================================== -// + + + This Software is released under the "Simplified BSD License" + + + -// Copyright 2010 Moe Wheatley. -// Copyright 2012 Alexandru Csete -// All rights reserved. -// -//Redistribution and use in source and binary forms, with or without modification, are -//permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -//THIS SOFTWARE IS PROVIDED BY Moe Wheatley ``AS IS'' AND ANY EXPRESS OR IMPLIED -//WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -//FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Moe Wheatley OR -//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -//CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -//SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -//ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -//ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -//The views and conclusions contained in the software and documentation are those of the -//authors and should not be interpreted as representing official policies, either expressed -//or implied, of Moe Wheatley. -//========================================================================================== - +/* + * Frequency controller widget (originally from CuteSDR) + * + * This file is part of gqrx sdr. + * + * Copyright 2010 Moe Wheatley AE4JY + * Copyright 2012-2017 Alexandru Csete OZ9AEC + * All rights reserved. + * + * This software is released under the "Simplified BSD License". + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ #include #include "freqctrl.h" - -//Manual adjustment of Font size as percent of control height +// Manual adjustment of Font size as percent of control height #define DIGIT_SIZE_PERCENT 90 #define UNITS_SIZE_PERCENT 60 -//adjustment for separation between digits -#define SEPRATIO_N 100 //separation rectangle size ratio numerator times 100 -#define SEPRATIO_D 3 //separation rectangle size ratio denominator +// adjustment for separation between digits +#define SEPRATIO_N 100 // separation rectangle size ratio numerator times 100 +#define SEPRATIO_D 3 // separation rectangle size ratio denominator #define STATUS_TIP \ "Scroll or left-click to increase/decrease digit. " \ "Right-click to clear digits." -///////////////////////////////////////////////////////////////////// -// Constructor/Destructor -///////////////////////////////////////////////////////////////////// CFreqCtrl::CFreqCtrl(QWidget *parent) : QFrame(parent) { @@ -72,7 +58,7 @@ CFreqCtrl::CFreqCtrl(QWidget *parent) : m_HighlightColor = QColor(0x5A, 0x5A, 0x5A, 0xFF); m_UnitsColor = Qt::gray; m_freq = 146123456; - setup(0, 1, 4000000000U, 1, UNITS_MHZ); + setup(0, 1, 4000000000U, 1, FCTL_UNIT_NONE); m_Oldfreq = 0; m_LastLeadZeroPos = 0; m_LRMouseFreqSel = false; @@ -88,9 +74,6 @@ CFreqCtrl::~CFreqCtrl() { } -///////////////////////////////////////////////////////////////////// -// Size hint stuff -///////////////////////////////////////////////////////////////////// QSize CFreqCtrl::minimumSizeHint() const { return QSize(100, 20); @@ -101,9 +84,6 @@ QSize CFreqCtrl::sizeHint() const return QSize(100, 20); } -///////////////////////////////////////////////////////////////////// -// Various helper functions -///////////////////////////////////////////////////////////////////// bool CFreqCtrl::inRect(QRect &rect, QPoint &point) { if ((point.x() < rect.right()) && (point.x() > rect.x()) && @@ -129,23 +109,21 @@ static int fmax_to_numdigits(qint64 fmax) return 12; } -////////////////////////////////////////////////////////////////////////////// -// Setup various parameters for the control -////////////////////////////////////////////////////////////////////////////// -void CFreqCtrl::setup(int NumDigits, qint64 Minf, qint64 Maxf,int MinStep, FUNITS UnitsType) +void CFreqCtrl::setup(int NumDigits, qint64 Minf, qint64 Maxf, int MinStep, + FctlUnit unit) { - int i; - qint64 pwr = 1; + int i; + qint64 pwr = 1; m_LastEditDigit = 0; m_Oldfreq = -1; m_NumDigits = NumDigits ? NumDigits : fmax_to_numdigits(Maxf); - if (m_NumDigits > MAX_DIGITS) - m_NumDigits = MAX_DIGITS; + if (m_NumDigits > FCTL_MAX_DIGITS) + m_NumDigits = FCTL_MAX_DIGITS; - if (m_NumDigits < MIN_DIGITS) - m_NumDigits = MIN_DIGITS; + if (m_NumDigits < FCTL_MIN_DIGITS) + m_NumDigits = FCTL_MIN_DIGITS; m_UnitString = ""; m_MinStep = MinStep; @@ -173,9 +151,9 @@ void CFreqCtrl::setup(int NumDigits, qint64 Minf, qint64 Maxf,int MinStep, FUNIT } if (m_MaxFreq > pwr) - m_MaxFreq = pwr-1; + m_MaxFreq = pwr - 1; - m_MaxFreq = m_MaxFreq - m_MaxFreq%m_MinStep; + m_MaxFreq = m_MaxFreq - m_MaxFreq % m_MinStep; if (m_MinFreq > pwr) m_MinFreq = 1; @@ -183,43 +161,9 @@ void CFreqCtrl::setup(int NumDigits, qint64 Minf, qint64 Maxf,int MinStep, FUNIT m_MinFreq = m_MinFreq - m_MinFreq % m_MinStep; m_DigStart = 0; - switch (UnitsType) - { - case UNITS_HZ: - m_DecPos = 0; - m_UnitString = "Hz "; - break; - case UNITS_KHZ: - m_DecPos = 3; - m_UnitString = "kHz"; - break; - case UNITS_MHZ: - m_DecPos = 6; - m_UnitString = "MHz"; - break; - case UNITS_GHZ: - m_DecPos = 9; - m_UnitString = "GHz"; - break; - case UNITS_SEC: - m_DecPos = 6; - m_UnitString = "Sec"; - break; - case UNITS_MSEC: - m_DecPos = 3; - m_UnitString = "mS "; - break; - case UNITS_USEC: - m_DecPos = 0; - m_UnitString = "uS "; - break; - case UNITS_NSEC: - m_DecPos = 0; - m_UnitString = "nS "; - break; - } + setUnit(unit); - for (i = m_NumDigits-1; i >= 0; i--) + for (i = m_NumDigits - 1; i >= 0; i--) { if (m_DigitInfo[i].weight <= m_MinStep) { @@ -230,25 +174,22 @@ void CFreqCtrl::setup(int NumDigits, qint64 Minf, qint64 Maxf,int MinStep, FUNIT } else { - if ((m_MinStep%m_DigitInfo[i+1].weight) != 0) + if ((m_MinStep % m_DigitInfo[i + 1].weight) != 0) m_DigStart = i; m_DigitInfo[i].incval = 0; } } } - m_NumSeps = (m_NumDigits-1)/3 - m_DigStart/3; + m_NumSeps = (m_NumDigits - 1) / 3 - m_DigStart / 3; } -////////////////////////////////////////////////////////////////////////////// -// Sets the frequency and individual digit values -////////////////////////////////////////////////////////////////////////////// void CFreqCtrl::setFrequency(qint64 freq) { - int i; - qint64 acc = 0; - qint64 rem; - int val; + int i; + qint64 acc = 0; + qint64 rem; + int val; if (freq == m_Oldfreq) return; @@ -263,7 +204,7 @@ void CFreqCtrl::setFrequency(qint64 freq) rem = m_freq; m_LeadZeroPos = m_NumDigits; - for (i = m_NumDigits-1; i >= m_DigStart; i--) + for (i = m_NumDigits - 1; i >= m_DigStart; i--) { val = (int)(rem / m_DigitInfo[i].weight); if (m_DigitInfo[i].val != val) @@ -271,7 +212,7 @@ void CFreqCtrl::setFrequency(qint64 freq) m_DigitInfo[i].val = val; m_DigitInfo[i].modified = true; } - rem = rem - val*m_DigitInfo[i].weight; + rem = rem - val * m_DigitInfo[i].weight; acc += val; if ((acc == 0) && (i > m_DecPos)) { @@ -292,10 +233,11 @@ void CFreqCtrl::setFrequency(qint64 freq) /** TBC if this works for all configurations */ if (m_freq < 0) { - if (m_DigitInfo[m_LeadZeroPos-1].val > 0) - m_DigitInfo[m_LeadZeroPos-1].val = -m_DigitInfo[m_LeadZeroPos-1].val; + if (m_DigitInfo[m_LeadZeroPos - 1].val > 0) + m_DigitInfo[m_LeadZeroPos - + 1].val = -m_DigitInfo[m_LeadZeroPos - 1].val; - for (i = 0; i < (m_LeadZeroPos-1); i++) + for (i = 0; i < (m_LeadZeroPos - 1); i++) { if (m_DigitInfo[i].val < 0) m_DigitInfo[i].val = -m_DigitInfo[i].val; @@ -304,74 +246,70 @@ void CFreqCtrl::setFrequency(qint64 freq) // signal the new frequency to world m_Oldfreq = m_freq; - emit newFrequency(m_freq); + emit newFrequency(m_freq); updateCtrl(m_LastLeadZeroPos != m_LeadZeroPos); m_LastLeadZeroPos = m_LeadZeroPos; } -////////////////////////////////////////////////////////////////////////////// -// Sets the Digit and comma and decimal pt color -////////////////////////////////////////////////////////////////////////////// -void CFreqCtrl::setDigitColor(QColor cr) +void CFreqCtrl::setDigitColor(QColor col) { m_UpdateAll = true; - m_DigitColor = cr; - for(int i=m_DigStart; i =0) +void CFreqCtrl::leaveEvent(QEvent *) +{ + // called when mouse cursor leaves this control so deactivate any highlights + if (m_ActiveEditDigit >= 0) { - if( m_DigitInfo[m_ActiveEditDigit].editmode ) + if (m_DigitInfo[m_ActiveEditDigit].editmode) { m_DigitInfo[m_ActiveEditDigit].editmode = false; m_DigitInfo[m_ActiveEditDigit].modified = true; @@ -440,32 +365,26 @@ void CFreqCtrl::leaveEvent( QEvent * ) } } -///////////////////////////////////////////////////////////////////// -// main draw event for this control -///////////////////////////////////////////////////////////////////// void CFreqCtrl::paintEvent(QPaintEvent *) { - QPainter painter(&m_Pixmap); + QPainter painter(&m_Pixmap); - if (m_UpdateAll) //if need to redraw everything + if (m_UpdateAll) // if need to redraw everything { drawBkGround(painter); m_UpdateAll = false; } // draw any modified digits to the m_MemDC drawDigits(painter); - //now draw pixmap onto screen - QPainter scrnpainter(this); - scrnpainter.drawPixmap(0,0,m_Pixmap); //blt to the screen(flickers like a candle, why?) + // now draw pixmap onto screen + QPainter scrnpainter(this); + scrnpainter.drawPixmap(0, 0, m_Pixmap); // blt to the screen(flickers like a candle, why?) } -///////////////////////////////////////////////////////////////////// -// Mouse Event overrides -///////////////////////////////////////////////////////////////////// -void CFreqCtrl::mouseMoveEvent(QMouseEvent * event) +void CFreqCtrl::mouseMoveEvent(QMouseEvent *event) { -QPoint pt = event->pos(); - //find which digit is to be edited + QPoint pt = event->pos(); + // find which digit is to be edited if (isActiveWindow()) { if (!hasFocus()) @@ -482,7 +401,8 @@ QPoint pt = event->pos(); } } else - { //un-highlight the previous digit if moved off it + { + // un-highlight the previous digit if moved off it if (m_DigitInfo[i].editmode) { m_DigitInfo[i].editmode = false; @@ -495,17 +415,14 @@ QPoint pt = event->pos(); } } -////////////////////////////////////////////////////////////////////////////// -// Service mouse button clicks to inc or dec the selected frequency -////////////////////////////////////////////////////////////////////////////// -void CFreqCtrl::mousePressEvent(QMouseEvent * event) +void CFreqCtrl::mousePressEvent(QMouseEvent *event) { - QPoint pt = event->pos(); + QPoint pt = event->pos(); if (event->button() == Qt::LeftButton) { for (int i = m_DigStart; i < m_NumDigits; i++) { - if (inRect(m_DigitInfo[i].dQRect, pt)) //if in i'th digit + if (inRect(m_DigitInfo[i].dQRect, pt)) // if in i'th digit { if (m_LRMouseFreqSel) { @@ -513,10 +430,10 @@ void CFreqCtrl::mousePressEvent(QMouseEvent * event) } else { - if (pt.y() < m_DigitInfo[i].dQRect.bottom()/2) //top half? + if (pt.y() < m_DigitInfo[i].dQRect.bottom() / 2) // top half? incFreq(); else - decFreq(); //bottom half + decFreq(); // bottom half } } } @@ -525,7 +442,7 @@ void CFreqCtrl::mousePressEvent(QMouseEvent * event) { for (int i = m_DigStart; i < m_NumDigits; i++) { - if (inRect(m_DigitInfo[i].dQRect, pt)) //if in i'th digit + if (inRect(m_DigitInfo[i].dQRect, pt)) // if in i'th digit { if (m_LRMouseFreqSel) { @@ -540,18 +457,15 @@ void CFreqCtrl::mousePressEvent(QMouseEvent * event) } } -///////////////////////////////////////////////////////////////////// -// Mouse Wheel Event overrides -///////////////////////////////////////////////////////////////////// -void CFreqCtrl::wheelEvent(QWheelEvent * event) +void CFreqCtrl::wheelEvent(QWheelEvent *event) { - QPoint pt = event->pos(); - int numDegrees = event->delta() / 8; - int numSteps = numDegrees / 15; + QPoint pt = event->pos(); + int numDegrees = event->delta() / 8; + int numSteps = numDegrees / 15; for (int i = m_DigStart; i < m_NumDigits; i++) { - if (inRect(m_DigitInfo[i].dQRect, pt)) //if in i'th digit + if (inRect(m_DigitInfo[i].dQRect, pt)) // if in i'th digit { if (numSteps > 0) incFreq(); @@ -561,122 +475,119 @@ void CFreqCtrl::wheelEvent(QWheelEvent * event) } } - -///////////////////////////////////////////////////////////////////// -// Keyboard Event overrides -///////////////////////////////////////////////////////////////////// -void CFreqCtrl::keyPressEvent( QKeyEvent * event ) +void CFreqCtrl::keyPressEvent(QKeyEvent *event) { - //call base class if dont over ride key - bool fSkipMsg = false; - qint64 tmp; + // call base class if dont over ride key + bool fSkipMsg = false; + qint64 tmp; - //qDebug() < key(); + // qDebug() < key(); - switch(event->key()) + switch (event->key()) { - case Qt::Key_0: - case Qt::Key_1: - case Qt::Key_2: - case Qt::Key_3: - case Qt::Key_4: - case Qt::Key_5: - case Qt::Key_6: - case Qt::Key_7: - case Qt::Key_8: - case Qt::Key_9: - if (m_ActiveEditDigit >= 0) + case Qt::Key_0: + case Qt::Key_1: + case Qt::Key_2: + case Qt::Key_3: + case Qt::Key_4: + case Qt::Key_5: + case Qt::Key_6: + case Qt::Key_7: + case Qt::Key_8: + case Qt::Key_9: + if (m_ActiveEditDigit >= 0) + { + if (m_DigitInfo[m_ActiveEditDigit].editmode) { - if (m_DigitInfo[m_ActiveEditDigit].editmode) - { - tmp = (m_freq/m_DigitInfo[m_ActiveEditDigit].weight) % 10; - m_freq -= tmp*m_DigitInfo[m_ActiveEditDigit].weight; - m_freq = m_freq+(event->key()-'0')*m_DigitInfo[m_ActiveEditDigit].weight; - setFrequency(m_freq); - } + tmp = (m_freq / m_DigitInfo[m_ActiveEditDigit].weight) % 10; + m_freq -= tmp * m_DigitInfo[m_ActiveEditDigit].weight; + m_freq = m_freq + (event->key() - '0') * + m_DigitInfo[m_ActiveEditDigit].weight; + setFrequency(m_freq); } - moveCursorRight(); + } + moveCursorRight(); + fSkipMsg = true; + break; + case Qt::Key_Left: + if (m_ActiveEditDigit != -1) + { + moveCursorLeft(); fSkipMsg = true; - break; - case Qt::Key_Left: - if (m_ActiveEditDigit != -1) - { - moveCursorLeft(); - fSkipMsg = true; - } - break; - case Qt::Key_Up: - if (m_ActiveEditDigit != -1) - { - incFreq(); - fSkipMsg = true; - } - break; - case Qt::Key_Down: - if (m_ActiveEditDigit != -1) - { - decFreq(); - fSkipMsg = true; - } - break; - case Qt::Key_Right: - if (m_ActiveEditDigit != -1) - { - moveCursorRight(); - fSkipMsg = true; - } - break; - case Qt::Key_Home: - cursorHome(); + } + break; + case Qt::Key_Up: + if (m_ActiveEditDigit != -1) + { + incFreq(); fSkipMsg = true; - break; - case Qt::Key_End: - cursorEnd(); + } + break; + case Qt::Key_Down: + if (m_ActiveEditDigit != -1) + { + decFreq(); fSkipMsg = true; - break; - default: - break; + } + break; + case Qt::Key_Right: + if (m_ActiveEditDigit != -1) + { + moveCursorRight(); + fSkipMsg = true; + } + break; + case Qt::Key_Home: + cursorHome(); + fSkipMsg = true; + break; + case Qt::Key_End: + cursorEnd(); + fSkipMsg = true; + break; + default: + break; } if (!fSkipMsg) QFrame::keyPressEvent(event); } - -////////////////////////////////////////////////////////////////////////////// -// Calculates all the rectangles for the digits, separators, and units text -// and creates the fonts for them. -////////////////////////////////////////////////////////////////////////////// void CFreqCtrl::drawBkGround(QPainter &Painter) { - QRect rect(0, 0, width(), height()); - - //qDebug() < m_DigStart) && ((i%3)==0)) + if ((i > m_DigStart) && ((i % 3) == 0)) { m_SepRect[i].setCoords(digpos - sepwidth, rect.top(), @@ -684,30 +595,34 @@ void CFreqCtrl::drawBkGround(QPainter &Painter) rect.bottom()); Painter.fillRect(m_SepRect[i], m_BkColor); digpos -= sepwidth; - if (i == m_DecPos) - Painter.drawText(m_SepRect[i], Qt::AlignHCenter|Qt::AlignVCenter, "."); -// disable digit group separators -// else if (i > m_DecPos && i < m_LeadZeroPos) -// Painter.drawText(m_SepRect[i], Qt::AlignHCenter|Qt::AlignVCenter, ","); - else if (i < m_LeadZeroPos) - Painter.drawText(m_SepRect[i], Qt::AlignHCenter|Qt::AlignVCenter, " "); + if (m_Unit == FCTL_UNIT_NONE) + { + if (m_LeadZeroPos > i) + dgsep = '.'; + else + dgsep = ' '; + } + else + { + if (i == m_DecPos) + dgsep = '.'; + else if (i < m_LeadZeroPos) + dgsep = ' '; + } + Painter.drawText(m_SepRect[i], Qt::AlignHCenter | Qt::AlignVCenter, + QChar(dgsep)); } else { m_SepRect[i].setCoords(0, 0, 0, 0); } - m_DigitInfo[i].dQRect.setCoords(digpos - cellwidth, - rect.top(), - digpos, - rect.bottom()); + m_DigitInfo[i].dQRect.setCoords(digpos - cellwidth, rect.top(), + digpos, rect.bottom()); digpos -= cellwidth; } - } -////////////////////////////////////////////////////////////////////////////// // Draws just the Digits that have been modified -////////////////////////////////////////////////////////////////////////////// void CFreqCtrl::drawDigits(QPainter &Painter) { Painter.setFont(m_DigitFont); @@ -731,47 +646,55 @@ void CFreqCtrl::drawDigits(QPainter &Painter) Painter.setPen(m_DigitColor); if (m_freq < 0 && i == m_LeadZeroPos - 1 && m_DigitInfo[i].val == 0) - Painter.drawText(m_DigitInfo[i].dQRect, Qt::AlignHCenter|Qt::AlignVCenter, + Painter.drawText(m_DigitInfo[i].dQRect, + Qt::AlignHCenter | Qt::AlignVCenter, QString("-0")); else - Painter.drawText(m_DigitInfo[i].dQRect, Qt::AlignHCenter|Qt::AlignVCenter, + Painter.drawText(m_DigitInfo[i].dQRect, + Qt::AlignHCenter | Qt::AlignVCenter, QString().number(m_DigitInfo[i].val)); m_DigitInfo[i].modified = false; } } } -////////////////////////////////////////////////////////////////////////////// -// Increment just the digit active in edit mode -////////////////////////////////////////////////////////////////////////////// +// Increment just the digit active in edit mode void CFreqCtrl::incDigit() { /** FIXME: no longer used? */ - int tmp; - qint64 tmpl; + int tmp; + qint64 tmpl; if (m_ActiveEditDigit >= 0) { if (m_DigitInfo[m_ActiveEditDigit].editmode) { - if (m_DigitInfo[m_ActiveEditDigit].weight == m_DigitInfo[m_ActiveEditDigit].incval) + if (m_DigitInfo[m_ActiveEditDigit].weight == + m_DigitInfo[m_ActiveEditDigit].incval) { // get the current digit value - tmp = (int)((m_freq/m_DigitInfo[m_ActiveEditDigit].weight) % 10); + tmp = + (int)((m_freq / m_DigitInfo[m_ActiveEditDigit].weight) % + 10); // set the current digit value to zero - m_freq -= tmp*m_DigitInfo[m_ActiveEditDigit].weight; + m_freq -= tmp * m_DigitInfo[m_ActiveEditDigit].weight; tmp++; if (tmp > 9) tmp = 0; - m_freq = m_freq + (qint64)tmp*m_DigitInfo[m_ActiveEditDigit].weight; + m_freq = m_freq + (qint64)tmp * + m_DigitInfo[m_ActiveEditDigit].weight; } else { - tmp = (int)((m_freq/m_DigitInfo[m_ActiveEditDigit+1].weight) % 10); + tmp = + (int)((m_freq / m_DigitInfo[m_ActiveEditDigit + 1].weight) % + 10); tmpl = m_freq + m_DigitInfo[m_ActiveEditDigit].incval; - if (tmp != (int)((tmpl/m_DigitInfo[m_ActiveEditDigit+1].weight) % 10)) + if (tmp != + (int)((tmpl / m_DigitInfo[m_ActiveEditDigit + 1].weight) % + 10)) { - tmpl -= m_DigitInfo[m_ActiveEditDigit+1].weight; + tmpl -= m_DigitInfo[m_ActiveEditDigit + 1].weight; } m_freq = tmpl; } @@ -780,9 +703,7 @@ void CFreqCtrl::incDigit() } } -////////////////////////////////////////////////////////////////////////////// -// Increment the frequency by this digit active in edit mode -////////////////////////////////////////////////////////////////////////////// +// Increment the frequency by this digit active in edit mode void CFreqCtrl::incFreq() { if (m_ActiveEditDigit >= 0) @@ -790,9 +711,11 @@ void CFreqCtrl::incFreq() if (m_DigitInfo[m_ActiveEditDigit].editmode) { m_freq += m_DigitInfo[m_ActiveEditDigit].incval; - if (m_ResetLowerDigits) { + if (m_ResetLowerDigits) + { /* Set digits below the active one to 0 */ - m_freq = m_freq - m_freq%m_DigitInfo[m_ActiveEditDigit].weight; + m_freq = m_freq - m_freq % + m_DigitInfo[m_ActiveEditDigit].weight; } setFrequency(m_freq); m_LastEditDigit = m_ActiveEditDigit; @@ -800,37 +723,43 @@ void CFreqCtrl::incFreq() } } -////////////////////////////////////////////////////////////////////////////// -// Decrement the digit active in edit mode -////////////////////////////////////////////////////////////////////////////// +// Decrement the digit active in edit mode void CFreqCtrl::decDigit() { /** FIXME: no longer used? */ - int tmp; - qint64 tmpl; + int tmp; + qint64 tmpl; if (m_ActiveEditDigit >= 0) { if (m_DigitInfo[m_ActiveEditDigit].editmode) { - if (m_DigitInfo[m_ActiveEditDigit].weight == m_DigitInfo[m_ActiveEditDigit].incval) + if (m_DigitInfo[m_ActiveEditDigit].weight == + m_DigitInfo[m_ActiveEditDigit].incval) { // get the current digit value - tmp = (int)((m_freq/m_DigitInfo[m_ActiveEditDigit].weight) % 10); + tmp = + (int)((m_freq / m_DigitInfo[m_ActiveEditDigit].weight) % + 10); // set the current digit value to zero - m_freq -= tmp*m_DigitInfo[m_ActiveEditDigit].weight; + m_freq -= tmp * m_DigitInfo[m_ActiveEditDigit].weight; tmp--; if (tmp < 0) tmp = 9; - m_freq = m_freq+(qint64)tmp*m_DigitInfo[m_ActiveEditDigit].weight; + m_freq = m_freq + (qint64)tmp * + m_DigitInfo[m_ActiveEditDigit].weight; } else { - tmp = (int)((m_freq/m_DigitInfo[m_ActiveEditDigit+1].weight) % 10); + tmp = + (int)((m_freq / m_DigitInfo[m_ActiveEditDigit + 1].weight) % + 10); tmpl = m_freq - m_DigitInfo[m_ActiveEditDigit].incval; - if (tmp != (int)((tmpl/m_DigitInfo[m_ActiveEditDigit+1].weight)%10)) + if (tmp != + (int)((tmpl / m_DigitInfo[m_ActiveEditDigit + 1].weight) % + 10)) { - tmpl += m_DigitInfo[m_ActiveEditDigit+1].weight; + tmpl += m_DigitInfo[m_ActiveEditDigit + 1].weight; } m_freq = tmpl; } @@ -839,9 +768,7 @@ void CFreqCtrl::decDigit() } } -////////////////////////////////////////////////////////////////////////////// -// Decrement the frequency by this digit active in edit mode -////////////////////////////////////////////////////////////////////////////// +// Decrement the frequency by this digit active in edit mode void CFreqCtrl::decFreq() { if (m_ActiveEditDigit >= 0) @@ -852,7 +779,8 @@ void CFreqCtrl::decFreq() if (m_ResetLowerDigits) { /* digits below the active one are reset to 0 */ - m_freq = m_freq - m_freq%m_DigitInfo[m_ActiveEditDigit].weight; + m_freq = m_freq - m_freq % + m_DigitInfo[m_ActiveEditDigit].weight; } setFrequency(m_freq); @@ -861,9 +789,7 @@ void CFreqCtrl::decFreq() } } -////////////////////////////////////////////////////////////////////////////// -// Clear the selected digit and the digits below (i.e. set them to 0) -////////////////////////////////////////////////////////////////////////////// +// Clear the selected digit and the digits below (i.e. set them to 0) void CFreqCtrl::clearFreq() { if (m_ActiveEditDigit >= 0) @@ -871,7 +797,7 @@ void CFreqCtrl::clearFreq() if (m_DigitInfo[m_ActiveEditDigit].editmode) { m_freq -= m_DigitInfo[m_ActiveEditDigit].val * - m_DigitInfo[m_ActiveEditDigit].incval; + m_DigitInfo[m_ActiveEditDigit].incval; /* digits below the active one are reset to 0 */ m_freq -= m_freq % m_DigitInfo[m_ActiveEditDigit].weight; @@ -880,17 +806,15 @@ void CFreqCtrl::clearFreq() m_LastEditDigit = m_ActiveEditDigit; } } - } -///////////////////////////////////////////////////////////////////// // Cursor move routines for arrow key editing -///////////////////////////////////////////////////////////////////// void CFreqCtrl::moveCursorLeft() { - if ((m_ActiveEditDigit >= 0) && (m_ActiveEditDigit < m_NumDigits-1)) + if ((m_ActiveEditDigit >= 0) && (m_ActiveEditDigit < m_NumDigits - 1)) { - cursor().setPos(mapToGlobal(m_DigitInfo[++m_ActiveEditDigit].dQRect.center())); + cursor().setPos(mapToGlobal(m_DigitInfo[++m_ActiveEditDigit].dQRect. + center())); } } @@ -898,7 +822,8 @@ void CFreqCtrl::moveCursorRight() { if (m_ActiveEditDigit > m_FirstEditableDigit) { - cursor().setPos(mapToGlobal(m_DigitInfo[--m_ActiveEditDigit].dQRect.center())); + cursor().setPos(mapToGlobal(m_DigitInfo[--m_ActiveEditDigit].dQRect. + center())); } } @@ -906,7 +831,8 @@ void CFreqCtrl::cursorHome() { if (m_ActiveEditDigit >= 0) { - cursor().setPos(mapToGlobal( m_DigitInfo[m_NumDigits-1].dQRect.center())); + cursor().setPos(mapToGlobal( + m_DigitInfo[m_NumDigits - 1].dQRect.center())); } } @@ -914,6 +840,7 @@ void CFreqCtrl::cursorEnd() { if (m_ActiveEditDigit > 0) { - cursor().setPos(mapToGlobal(m_DigitInfo[m_FirstEditableDigit].dQRect.center())); + cursor().setPos(mapToGlobal(m_DigitInfo[m_FirstEditableDigit].dQRect. + center())); } } diff --git a/src/qtgui/freqctrl.h b/src/qtgui/freqctrl.h index 9828318..a3ce398 100644 --- a/src/qtgui/freqctrl.h +++ b/src/qtgui/freqctrl.h @@ -1,148 +1,133 @@ -////////////////////////////////////////////////////////////////////// -// freqctrl.h: interface for the CFreqCtrl class. -// -// History: -// 2010-09-15 Initial creation MSW -// 2011-03-27 Initial release -///////////////////////////////////////////////////////////////////// -#ifndef FREQCTRL_H -#define FREQCTRL_H -/////////////////////////////////////////////////////////////////////// -// To use this control, add a frame using the QT designer editor. -// Promote it to the CFreqCtrl class and include file freqctrl.h -// Initilaize the control in the constructor of the controls parent -// ex: ui->frameFreqCtrl->Setup(9, 10000U, 230000000U, 1, UNITS_MHZ ); -// where 9 is the number of display digits, min freq is 10kHz , Max is 230MHz -// the minimum step size is 1Hz and the freq is displayed as MHz -// NOTE: the frequency is a qint64 64 bit integer value -// to change frequency call SetFrequency() -// ex: ui->frameFreqCtrl->SetFrequency(146000000); -// -// One signal is sent when the control frequency changes: -//void NewFrequency(qint64 freq); //emitted when frequency has changed -/////////////////////////////////////////////////////////////////////// +/* + * Frequency controller widget (originally from CuteSDR) + */ +#pragma once -#include #include #include +#include -enum FUNITS -{ - UNITS_HZ, - UNITS_KHZ, - UNITS_MHZ, - UNITS_GHZ, - UNITS_SEC, - UNITS_MSEC, - UNITS_USEC, - UNITS_NSEC +enum FctlUnit { + FCTL_UNIT_NONE, // Freq displayed without unit: 14.236.000 + FCTL_UNIT_HZ, + FCTL_UNIT_KHZ, + FCTL_UNIT_MHZ, + FCTL_UNIT_GHZ, + FCTL_UNIT_SEC, + FCTL_UNIT_MSEC, + FCTL_UNIT_USEC, + FCTL_UNIT_NSEC }; -#define MAX_DIGITS 12 -#define MIN_DIGITS 4 +#define FCTL_MAX_DIGITS 12 +#define FCTL_MIN_DIGITS 4 class CFreqCtrl : public QFrame { Q_OBJECT + public: explicit CFreqCtrl(QWidget *parent = 0); ~CFreqCtrl(); - QSize minimumSizeHint() const; - QSize sizeHint() const; + + QSize minimumSizeHint() const; + QSize sizeHint() const; // Use NumDigits=0 for auto - void setup(int NumDigits, qint64 Minf, qint64 Maxf,int MinStep, FUNITS UnitsType); - void setUnits(FUNITS units); - void setDigitColor(QColor cr); - void setBkColor(QColor cr); - void setUnitsColor(QColor cr); - void setHighlightColor(QColor cr); - qint64 getFrequency() { return m_freq; } - - void setResetLowerDigits(bool reset) { + void setup(int NumDigits, qint64 Minf, qint64 Maxf, int MinStep, + FctlUnit unit); + void setUnit(FctlUnit unit); + void setDigitColor(QColor col); + void setBgColor(QColor col); + void setUnitsColor(QColor col); + void setHighlightColor(QColor col); + qint64 getFrequency() const + { + return m_freq; + } + + void setResetLowerDigits(bool reset) + { m_ResetLowerDigits = reset; } signals: - void newFrequency(qint64 freq); //emitted when frequency has changed + void newFrequency(qint64 freq); // emitted when frequency has changed public slots: - void setFrequency(qint64 freq); + void setFrequency(qint64 freq); -protected: //overrides for this control - void paintEvent(QPaintEvent *); - void resizeEvent(QResizeEvent *); - void mouseMoveEvent(QMouseEvent *); - void mousePressEvent(QMouseEvent *); - void wheelEvent(QWheelEvent *); - void leaveEvent(QEvent *); - void keyPressEvent(QKeyEvent *); +protected: + void paintEvent(QPaintEvent *); + void resizeEvent(QResizeEvent *); + void mouseMoveEvent(QMouseEvent *); + void mousePressEvent(QMouseEvent *); + void wheelEvent(QWheelEvent *); + void leaveEvent(QEvent *); + void keyPressEvent(QKeyEvent *); private: - void updateCtrl(bool all); - void drawBkGround(QPainter &Painter); - void drawDigits(QPainter &Painter); - void incDigit(); - void decDigit(); - void incFreq(); - void decFreq(); - void clearFreq(); - void cursorHome(); - void cursorEnd(); - void moveCursorLeft(); - void moveCursorRight(); - bool inRect(QRect &rect, QPoint &point); - - bool m_UpdateAll; - bool m_ExternalKeyActive; - bool m_LRMouseFreqSel; /*! Use left/right mouse buttons. If FALSE click area determines up/down. */ - - bool m_ResetLowerDigits; /*! If TRUE digits below the active one will be reset to 0 - when the active digit is incremented or decremented. */ - - int m_FirstEditableDigit; - int m_LastLeadZeroPos; - int m_LeadZeroPos; - int m_NumDigits; - int m_DigStart; - int m_ActiveEditDigit; - int m_LastEditDigit; - int m_DecPos; - int m_NumSeps; - - qint64 m_MinStep; - qint64 m_freq; - qint64 m_Oldfreq; - qint64 m_MinFreq; - qint64 m_MaxFreq; - - QColor m_DigitColor; - QColor m_BkColor; - QColor m_UnitsColor; - QColor m_HighlightColor; - - QPixmap m_Pixmap; - QSize m_Size; - FUNITS m_Units; - - QRect m_rectCtrl; //main control rectangle - QRect m_UnitsRect; //rectangle where Units text goes - QRect m_SepRect[MAX_DIGITS]; //separation rectangles for commas,dec pt, etc. - - QString m_UnitString; - - QFont m_DigitFont; - QFont m_UnitsFont; - - struct DigStuct - { - qint64 weight; //decimal weight of this digit - qint64 incval; //value this digit increments or decrements - QRect dQRect; //Digit bounding rectangle - int val; //value of this digit(0-9) - bool modified; //set if this digit has been modified - bool editmode; //set if this digit is selected for editing - } m_DigitInfo[MAX_DIGITS]; + void updateCtrl(bool all); + void drawBkGround(QPainter &Painter); + void drawDigits(QPainter &Painter); + void incDigit(); + void decDigit(); + void incFreq(); + void decFreq(); + void clearFreq(); + void cursorHome(); + void cursorEnd(); + void moveCursorLeft(); + void moveCursorRight(); + bool inRect(QRect &rect, QPoint &point); + + bool m_UpdateAll; + bool m_ExternalKeyActive; + bool m_LRMouseFreqSel; /* Use left/right mouse buttons. If FALSE click area determines up/down. */ + + bool m_ResetLowerDigits; /* If TRUE digits below the active one will be reset to 0 + * when the active digit is incremented or decremented. */ + + int m_FirstEditableDigit; + int m_LastLeadZeroPos; + int m_LeadZeroPos; + int m_NumDigits; + int m_DigStart; + int m_ActiveEditDigit; + int m_LastEditDigit; + int m_DecPos; + int m_NumSeps; + + qint64 m_MinStep; + qint64 m_freq; + qint64 m_Oldfreq; + qint64 m_MinFreq; + qint64 m_MaxFreq; + + QColor m_DigitColor; + QColor m_BkColor; + QColor m_UnitsColor; + QColor m_HighlightColor; + + QPixmap m_Pixmap; + QSize m_Size; + FctlUnit m_Unit; + + QRect m_rectCtrl; // main control rectangle + QRect m_UnitsRect; // rectangle where Units text goes + QRect m_SepRect[FCTL_MAX_DIGITS]; // separation rectangles for commas, decimal point, etc. + + QString m_UnitString; + + QFont m_DigitFont; + QFont m_UnitsFont; + + struct DigStuct { + qint64 weight; // decimal weight of this digit + qint64 incval; // value this digit increments or decrements + QRect dQRect; // Digit bounding rectangle + int val; // value of this digit(0-9) + bool modified; // set if this digit has been modified + bool editmode; // set if this digit is selected for editing + } m_DigitInfo[FCTL_MAX_DIGITS]; }; - -#endif // FREQCTRL_H From 7a39d989c8aa994e27df3bda8c721e7e29d134d0 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 4 May 2017 00:13:37 +0200 Subject: [PATCH 230/334] Fix incorrect digit separator in CFreqCtrl --- src/qtgui/freqctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qtgui/freqctrl.cpp b/src/qtgui/freqctrl.cpp index 7e36d39..8d9a7b1 100644 --- a/src/qtgui/freqctrl.cpp +++ b/src/qtgui/freqctrl.cpp @@ -606,7 +606,7 @@ void CFreqCtrl::drawBkGround(QPainter &Painter) { if (i == m_DecPos) dgsep = '.'; - else if (i < m_LeadZeroPos) + else dgsep = ' '; } Painter.drawText(m_SepRect[i], Qt::AlignHCenter | Qt::AlignVCenter, From 09f89e4c384bb39258b52c286febc51d8e75e2eb Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 11 May 2017 23:39:47 +0200 Subject: [PATCH 231/334] Switch to Hamradio style frequency display --- resources/news.txt | 1 + src/applications/gqrx/mainwindow.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/news.txt b/resources/news.txt index 3a12f81..dabc394 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -16,6 +16,7 @@ IMPROVED: Voiceover interface. IMPROVED: Input decimator performance. IMPROVED: Increased frequency limit to 999 GHz (500 GHz LO). + IMPROVED: Hamradio style frequency display. IMPROVED: More short waterfall time spans. diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index b095dd2..225ca04 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -83,7 +83,7 @@ MainWindow::MainWindow(const QString cfgfile, bool edit_conf, QWidget *parent) : setWindowTitle(QString("Gqrx %1").arg(VERSION)); /* frequency control widget */ - ui->freqCtrl->setup(0, 0, 9999e6, 1, FCTL_UNIT_MHZ); + ui->freqCtrl->setup(0, 0, 9999e6, 1, FCTL_UNIT_NONE); ui->freqCtrl->setFrequency(144500000); d_filter_shape = receiver::FILTER_SHAPE_NORMAL; @@ -745,7 +745,7 @@ void MainWindow::updateFrequencyRange() qint64 start = (qint64)(rx->get_filter_offset()) + d_hw_freq_start + d_lnb_lo; qint64 stop = (qint64)(rx->get_filter_offset()) + d_hw_freq_stop + d_lnb_lo; - ui->freqCtrl->setup(0, start, stop, 1, FCTL_UNIT_MHZ); + ui->freqCtrl->setup(0, start, stop, 1, FCTL_UNIT_NONE); uiDockRxOpt->setRxFreqRange(start, stop); } From 82e0cc2c6be3c3d360cf7565f84b6d942329cc53 Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Thu, 1 Jun 2017 00:44:29 +0200 Subject: [PATCH 232/334] Add new logos to be integrated Sponsored by Libre Space Foundation --- new_logo/PNG/horizontal color.png | Bin 0 -> 28448 bytes new_logo/PNG/horizontal white.png | Bin 0 -> 21815 bytes new_logo/PNG/icon color.png | Bin 0 -> 10986 bytes new_logo/PNG/icon white.png | Bin 0 -> 8964 bytes new_logo/PNG/vertical color.png | Bin 0 -> 27363 bytes new_logo/PNG/vertical white.png | Bin 0 -> 21238 bytes new_logo/SVG/horizontal color.svg | 91 +++++++++++++++++++++ new_logo/SVG/horizontal white.svg | 94 ++++++++++++++++++++++ new_logo/SVG/icon color.svg | 82 +++++++++++++++++++ new_logo/SVG/icon white.svg | 84 ++++++++++++++++++++ new_logo/SVG/vertical color.svg | 126 ++++++++++++++++++++++++++++++ new_logo/SVG/vertical white.svg | 126 ++++++++++++++++++++++++++++++ 12 files changed, 603 insertions(+) create mode 100644 new_logo/PNG/horizontal color.png create mode 100644 new_logo/PNG/horizontal white.png create mode 100644 new_logo/PNG/icon color.png create mode 100644 new_logo/PNG/icon white.png create mode 100644 new_logo/PNG/vertical color.png create mode 100644 new_logo/PNG/vertical white.png create mode 100644 new_logo/SVG/horizontal color.svg create mode 100644 new_logo/SVG/horizontal white.svg create mode 100644 new_logo/SVG/icon color.svg create mode 100644 new_logo/SVG/icon white.svg create mode 100644 new_logo/SVG/vertical color.svg create mode 100644 new_logo/SVG/vertical white.svg diff --git a/new_logo/PNG/horizontal color.png b/new_logo/PNG/horizontal color.png new file mode 100644 index 0000000000000000000000000000000000000000..3fdbde4a29fc77acbdbd432b516945c99e068791 GIT binary patch literal 28448 zcmd3Og 4Q_x;d0|ch|Wa{eJiU z3wJ+{54g`+d#|--=AD^$W)Y$&FNKLgf&l;kru19!_W%Ha0|0_L8VY#lboBlf{DI{3 zMp^|8ygs5Ce*yoGZvR%(2>=MI9{wSSXEfr0H;J7kG@O;~Or6~f9Zdi?H#ZgwTPr6c zLwgezJ4dsWeE|{xpaP`DMOEBWcjrCaRo1SA?=QRupZhJ9Jx9>4)Eb#p+dJRVo7Lyh z@<(blVvozLXQeD{3W#=>?Z|##GojXHsT3=_tP(4tt=;rxo~YE-L0=d{(=U|%ZSU{b z7YEpx63>nKhXgp{E_NC{bzdaCzR<>$-giph@X4+Jp(QFVZivx1yR8Fz_T}Mnb+ksM zqW*VPPv7F>{=L>-bHl~|T^^AG!vAh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new_logo/PNG/horizontal white.png new file mode 100644 index 0000000000000000000000000000000000000000..64716306dd58ba0eb946f34bf44f22d0ae390808 GIT binary patch literal 21815 zcmd3OhgVb07H>j;s5B!YC_NMlO{9mWA3+ER2uQDr2I(#IuAdO32kA{EfOIr;1fn9S zGzrpM1O-D!TBvykz4xuV-e2&tmJ6JmIkRWao?U;NnA`eVET=A<0)ap*C~c$>2n3;l zKwz^IjKIhy>F5CXLGSYq>dpz^6LR7{7Wn^3Pi+ey5QyW=@joy!zv&Dxcpjr^jxqK? zWBl)WKLGjr`%5~xyZAWV^?V@d;q92cqH+NQ5&)r)H|_-FEKNFQ+&5|5UZ=_Y5EeiY zL65j#U`^&raP(Czr1v?bca)$b4+q1IH&`fSrp$Zo753@VM^AP1uNeL~EnM6<&E~@9 z$kkL_R=P9hvRb YzB*K5VG44@$d20N15|>>*Yt4;e0Vz zXk>wIwDg~O+~ t2(2my`x^n#WNa)S)Y^Py~bkXO! z9gc_5^0F!$9&Vmq$a2+1s7MckHADGG0G#l7y}RvrvD&AOM-{T*=7g;nYye%x*ux9| zVf2rgX`Ovjq_uo@Up~aT{|?uGi2w0`W=fhRios_(MnjYFY@lfmQJjUu+oeC}V);=9 z`1&L}#}NqTrM5QC`1|j1vWWB@SY2iViQR0sX$g6auLp6?$KN;Q?mNf^h_EONn48v7 zdO7@_UjQC<@<7~y@9%0aerAS?efP63#0I>|hoXXbJujcOFv=Y4{GUCa* C
8ZZL&MV5!`m z`tgB(WhyEUU