Skip to content

Commit

Permalink
Merge branch 'master' of github.com:kukabu/gqrx
Browse files Browse the repository at this point in the history
  • Loading branch information
kukabu committed Feb 6, 2024
2 parents 446323b + bbf9f01 commit 8fd60cf
Show file tree
Hide file tree
Showing 18 changed files with 140 additions and 28 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
cd /tmp
git clone https://gitea.osmocom.org/sdr/rtl-sdr.git
cd rtl-sdr
git checkout v2.0.1
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DDETACH_KERNEL_DRIVER=ON ..
Expand Down Expand Up @@ -97,9 +98,10 @@ jobs:
ldconfig
cd /tmp
git clone https://github.com/gqrx-sdr/gr-osmosdr.git
git clone https://gitea.osmocom.org/sdr/gr-osmosdr.git
cd gr-osmosdr
git checkout origin/gr3.8
git cherry-pick -n 9c09c90d920dd4906fa8bb9d8443eef84d2565a3
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_MODULES_DIR=/usr/lib/x86_64-linux-gnu/cmake -DENABLE_PYTHON=False ..
Expand Down Expand Up @@ -195,7 +197,7 @@ jobs:
make install
cd /tmp
git clone https://github.com/gqrx-sdr/gr-osmosdr.git
git clone https://gitea.osmocom.org/sdr/gr-osmosdr.git
cd gr-osmosdr
mkdir build
cd build
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,68 @@ jobs:
- name: Compile
working-directory: build
run: make -j4
windows-build:
runs-on: windows-latest
name: Windows CI
defaults:
run:
shell: msys2 {0}
steps:
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
git
make
pacboy: >-
toolchain:p
cmake:p
ninja:p
libusb:p
boost:p
qt6-base:p
qt6-svg:p
spdlog:p
volk:p
libsndfile:p
fftw:p
- name: Clone and build GNU Radio
working-directory: ${{ runner.temp }}
run: |
git clone --depth 1 https://github.com/gnuradio/gnuradio.git
cd gnuradio
cmake -S . -B build \
-DCMAKE_INSTALL_PREFIX=${RUNNER_TEMP}/msys64/mingw64 \
-DENABLE_DEFAULT=OFF \
-DENABLE_COMMON_PCH=ON \
-DENABLE_GNURADIO_RUNTIME=ON \
-DENABLE_GR_ANALOG=ON \
-DENABLE_GR_AUDIO=ON \
-DENABLE_GR_BLOCKS=ON \
-DENABLE_GR_DIGITAL=ON \
-DENABLE_GR_FFT=ON \
-DENABLE_GR_FILTER=ON \
-DENABLE_GR_NETWORK=ON
cmake --build build
cmake --install build
- name: Clone and build gr-osmosdr
working-directory: ${{ runner.temp }}
run: |
git clone https://gitea.osmocom.org/sdr/gr-osmosdr.git
cd gr-osmosdr
cmake -S . -B build \
-DCMAKE_INSTALL_PREFIX=${RUNNER_TEMP}/msys64/mingw64 \
-DENABLE_DEFAULT=OFF \
-DENABLE_FILE=ON
cmake --build build
cmake --install build
- name: Checkout code
uses: actions/checkout@v3
- name: Configure, compile & install
run: |
cmake -S . -B build \
-DCMAKE_INSTALL_PREFIX=C:/gqrx
cmake --build build
cmake --install build
33 changes: 25 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.2)
project(gqrx)
set(${PROJECT_NAME}_MAJOR "2")
set(${PROJECT_NAME}_MINOR "17")
set(${PROJECT_NAME}_PATCH "0")
set(${PROJECT_NAME}_PATCH "3")
set(IS_RELEASE FALSE)

if(IS_RELEASE)
Expand Down Expand Up @@ -53,11 +53,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
add_definitions(-Wall)
add_definitions(-Wextra)
add_definitions(-Wdouble-promotion)
add_definitions(-Wno-unused-parameter)
add_definitions(-Wsign-compare)
add_compile_options(-Wall)
add_compile_options(-Wextra)
add_compile_options(-Wdouble-promotion)
add_compile_options(-Wno-unused-parameter)
add_compile_options(-Wsign-compare)
endif()

if(MSVC)
Expand Down Expand Up @@ -122,10 +122,20 @@ else()
endif()

# 3rd Party Dependency Stuff
find_package(Qt6 QUIET COMPONENTS Core Network Widgets Svg SvgWidgets)
if(NOT Qt6_FOUND)
option(FORCE_QT6 "Force Qt6 to be used" OFF)
option(FORCE_QT5 "Force Qt5 to be used" OFF)

if(FORCE_QT6)
find_package(Qt6 REQUIRED COMPONENTS Core Network Widgets Svg SvgWidgets)
elseif(FORCE_QT5)
find_package(Qt5 REQUIRED COMPONENTS Core Network Widgets Svg)
else()
find_package(Qt6 QUIET COMPONENTS Core Network Widgets Svg SvgWidgets)
if(NOT Qt6_FOUND)
find_package(Qt5 REQUIRED COMPONENTS Core Network Widgets Svg)
endif()
endif()

include(FindPkgConfig)
find_package(Gnuradio-osmosdr REQUIRED)

Expand Down Expand Up @@ -221,6 +231,13 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
endif()
endif()

find_program(CCACHE "ccache")
if(CCACHE)
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE})
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE})
set(ENV{CCACHE_SLOPPINESS} pch_defines,time_macros)
endif(CCACHE)


# Airspy optimizations that require modified gr-osmosdr
option(CUSTOM_AIRSPY_KERNELS "Enable non-standard Airspy optimizations" ON)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Download
Gqrx is distributed as a source code package and binaries for Linux and Mac.
Many Linux distributions provide gqrx in their package repositories.
Alternate Mac support is available through [MacPorts](https://ports.macports.org/port/gqrx/summary) and [Homebrew](https://formulae.brew.sh/cask/gqrx).
Windows support is available through [radioconda](https://github.com/ryanvolz/radioconda#radioconda).

* [Official releases](https://github.com/gqrx-sdr/gqrx/releases)
* [Pre-release builds](https://github.com/gqrx-sdr/gqrx/actions?query=workflow%3ABuild+branch%3Amaster)
Expand Down
1 change: 1 addition & 0 deletions dk.gqrx.gqrx.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<!-- <url type="help"></url> -->
<url type="homepage">https://gqrx.dk/</url>
<!-- <project_group>none</project_group> not a project from GNOME, KDE or XFCE -->
<launchable type="desktop-id">dk.gqrx.gqrx.desktop</launchable>
<screenshots>
<screenshot type="default">
<!-- <caption></caption> -->
Expand Down
2 changes: 1 addition & 1 deletion resources/gqrx.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH GQRX "1" "October 1, 2023" "gqrx 2.17" "User Commands"
.TH GQRX "1" "October 20, 2023" "gqrx 2.17.3" "User Commands"
.SH NAME
gqrx \- Software Defined Radio GUI application
.SH DESCRIPTION
Expand Down
15 changes: 13 additions & 2 deletions resources/news.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@

2.17.1: In progress...
2.17.3: Released October 20, 2023

FIXED: Delete key shortcut for bookmark removal.


2.17.2: Released October 9, 2023

NEW: FORCE_QT6 and FORCE_QT5 CMake options to force Qt version.


2.17.1: Released October 9, 2023

NEW: Delete key clears the waterfall.
NEW: I/Q tool can save recordings in SigMF format.
NEW: Holding Ctrl speeds up mouse wheel zoom.
IMPROVED: Reduced CPU utilization of waterfall display.
CHANGED: DMG release requires macOS 12.7 or later.

Expand All @@ -16,7 +27,7 @@
NEW: Min hold line in plot.
NEW: A/B measurement markers on plot.
NEW: Plot tooltip displays delta from demod frequency.
NEW: Dropped frames are indicated by red background in FFT Settigns panel.
NEW: Dropped frames are indicated by red background in FFT Settings panel.
NEW: "Avg" waterfall mode, which displays average of FFT bins.
NEW: "Sync" waterfall mode, which mirrors averaged data from plot.
NEW: Support for RTL-SDR Blog V4 in AppImage and DMG releases.
Expand Down
6 changes: 5 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ endif()

#build a win32 app, not a console app
if (WIN32)
set(CMAKE_EXE_LINKER_FLAGS "/entry:mainCRTStartup ${CMAKE_EXE_LINKER_FLAGS}")
if (MSVC)
set(CMAKE_EXE_LINKER_FLAGS "/entry:mainCRTStartup ${CMAKE_EXE_LINKER_FLAGS}")
else()
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-e,mainCRTStartup ${CMAKE_EXE_LINKER_FLAGS}")
endif(MSVC)
set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE ON)
endif (WIN32)

Expand Down
3 changes: 2 additions & 1 deletion src/applications/gqrx/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ void MainWindow::setFmMaxdev(float max_dev)


/**
* @brief New FM de-emphasis time consant selected.
* @brief New FM de-emphasis time constant selected.
* @param tau The new time constant
*/
void MainWindow::setFmEmph(double tau)
Expand Down Expand Up @@ -1656,6 +1656,7 @@ void MainWindow::startIqRecording(const QString& recdir, const QString& format)
{"core:sample_rate", sr/dec},
{"core:version", "1.0.0"},
{"core:recorder", "Gqrx " VERSION},
{"core:hw", QString("OsmoSDR: ") + m_settings->value("input/device", "").toString()},
}}, {"captures", QJsonArray {
QJsonObject {
{"core:sample_start", 0},
Expand Down
4 changes: 2 additions & 2 deletions src/applications/gqrx/receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ receiver::status receiver::stop_audio_recording()
// Temporary workaround for https://github.com/gnuradio/gnuradio/issues/5436
tb->disconnect(ddc, 0, rx, 0);
tb->connect(ddc, 0, rx, 0);
// End temporary workaronud
// End temporary workaround

tb->unlock();
wav_gain0.reset();
Expand Down Expand Up @@ -1314,7 +1314,7 @@ receiver::status receiver::stop_sniffer()
// Temporary workaround for https://github.com/gnuradio/gnuradio/issues/5436
tb->disconnect(ddc, 0, rx, 0);
tb->connect(ddc, 0, rx, 0);
// End temporary workaronud
// End temporary workaround

tb->disconnect(sniffer_rr, 0, sniffer, 0);
tb->unlock();
Expand Down
2 changes: 1 addition & 1 deletion src/dsp/afsk1200/cafsk12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <QDebug>
#include <QTime>
Expand Down
2 changes: 1 addition & 1 deletion src/dsp/afsk1200/cafsk12.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef CAFSK12_H
#define CAFSK12_H
Expand Down
2 changes: 1 addition & 1 deletion src/dsp/afsk1200/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

/* ---------------------------------------------------------------------- */
Expand Down
14 changes: 11 additions & 3 deletions src/qtgui/dockbookmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,20 @@ void DockBookmarks::on_tableWidgetTagList_itemChanged(QTableWidgetItem *item)

bool DockBookmarks::eventFilter(QObject* object, QEvent* event)
{
if (event->type() == QEvent::KeyPress)
// Since Key_Delete can be (is) used as a global shortcut, override the
// shortcut. Accepting a ShortcutOverride causes the event to be delivered
// again, but as a KeyPress.
if (event->type() == QEvent::KeyPress || event->type() == QEvent::ShortcutOverride)
{
QKeyEvent* pKeyEvent = static_cast<QKeyEvent *>(event);
if (pKeyEvent->key() == Qt::Key_Delete && ui->tableViewFrequencyList->hasFocus())
if (pKeyEvent->key() == Qt::Key_Delete)
{
return DeleteSelectedBookmark();
if (event->type() == QEvent::ShortcutOverride) {
event->accept();
}
else {
return DeleteSelectedBookmark();
}
}
}
return QWidget::eventFilter(object, event);
Expand Down
2 changes: 1 addition & 1 deletion src/qtgui/ioconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ void CIoConfig::inputDeviceSelected(int index)
*
* This slot is activated when the device string in the text edit box has changed
* either by the user or programmatically. We use this to enable/disable the OK
* button - we allo OK only if there is some text in the text entry.
* button - we allow OK only if there is some text in the text entry.
*/
void CIoConfig::inputDevstrChanged(const QString &text)
{
Expand Down
2 changes: 1 addition & 1 deletion src/qtgui/ioconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace Ui {
class CIoConfig;
}

/** @brief Inout/output device configurator. */
/** @brief Input/output device configurator. */
class CIoConfig : public QDialog
{
Q_OBJECT
Expand Down
2 changes: 1 addition & 1 deletion src/qtgui/meter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void CMeter::draw(QPainter &painter)
painter.setFont(font);

painter.setPen(QColor(0xDA, 0xDA, 0xDA, 0xFF));
painter.drawText(marg, height() - 2, QString::number(m_dBFS, 'f', 1) + " dBFS" );
painter.drawText(marg, height() - 2, QString::number((double)m_dBFS, 'f', 1) + " dBFS" );
}

// Called to draw an overlay bitmap containing items that
Expand Down
6 changes: 4 additions & 2 deletions src/qtgui/plotter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -930,12 +930,14 @@ void CPlotter::wheelEvent(QWheelEvent * event)
// delta is in eigths of a degree, 15 degrees is one step
int delta = m_InvertScrolling? -event->angleDelta().y() : event->angleDelta().y();
double numSteps = delta / (8.0 * 15.0);
// zoom faster when Ctrl is held
double zoomBase = (event->modifiers() & Qt::ControlModifier) ? 0.7 : 0.9;

if (m_CursorCaptured == YAXIS)
{
// Vertical zoom. Wheel down: zoom out, wheel up: zoom in
// During zoom we try to keep the point (dB or kHz) under the cursor fixed
float zoom_fac = pow(0.9, numSteps);
float zoom_fac = pow(zoomBase, numSteps);
float ratio = (float) py / (float) h;
float db_range = m_PandMaxdB - m_PandMindB;
float y_range = (float) h;
Expand All @@ -957,7 +959,7 @@ void CPlotter::wheelEvent(QWheelEvent * event)
}
else if (m_CursorCaptured == XAXIS)
{
zoomStepX(pow(0.9, numSteps), px);
zoomStepX(pow(zoomBase, numSteps), px);
}
else if (event->modifiers() & Qt::ControlModifier)
{
Expand Down

0 comments on commit 8fd60cf

Please sign in to comment.