-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'touch' into plotter_bandplan
- Loading branch information
Showing
40 changed files
with
31,642 additions
and
2,661 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# minFrequency, maxFrequency, mode, step, color, name | ||
|
||
# USA Amateur Radio | ||
135700, 137800, CW, 10, #90009470, 2200m Ham Band | ||
472000, 479000, CW, 10, #90009470, 630m Ham Band | ||
1800000, 2000000, CW, 10, #90009470, 160m Ham Band | ||
3500000, 3600000, CW, 10, #90009470, 80m CW/Data Ham Band | ||
3600000, 4000000, CW, 10, #90009470, 80m Phone Ham Band | ||
5351500, 5366500, USB, 10, #90009470, 60m Ham Band | ||
7000000, 7125000, CW, 10, #90009470, 40m CW/Data Ham Band | ||
7125000, 7300000, LSB, 10, #90009470, 40m Phone Ham Band | ||
10100000, 10150000, CW, 10, #90009470, 30m CW/Data Ham Band | ||
14000000, 14150000, CW, 10, #90009470, 20m CW/Data Ham Band | ||
14150000, 14350000, USB, 10, #90009470, 20m Phone Ham Band | ||
18068000, 18110000, CW, 10, #90009470, 17m CW/Data Ham Band | ||
18110000, 18168000, USB, 10, #90009470, 17m Ham Band | ||
21000000, 21200000, CW, 10, #90009470, 15m CW/Data Ham Band | ||
21200000, 21450000, USB, 10, #90009470, 15m Ham Band | ||
24890000, 24930000, CW, 10, #90009470, 12m CW/Data Ham Band | ||
24930000, 24990000, USB, 10, #90009470, 12m Ham Band | ||
28000000, 28300000, CW, 10, #90009470, 10m CW/Data Ham Band | ||
28300000, 29700000, USB, 10, #90009470, 10m Ham Band | ||
50000000, 50100000, CW, 10, #90009470, 6m CW/Data Ham Band | ||
50100000, 54000000, USB, 10, #90009470, 6m Ham Band | ||
144000000, 144100000, CW, 10, #90009470, 2m CW/Data Ham Band | ||
144100000, 148000000, NFM, 10, #90009470, 2m Ham Band | ||
222000000, 225000000, NFM, 10, #90009470, 1.25m Ham Band | ||
420000000, 450000000, NFM, 10, #90009470, 70cm Ham Band | ||
902000000, 928000000, NFM, 10, #90009470, 33cm Ham Band | ||
1240000000, 1300000000, NFM, 10, #90009470, 23cm Ham Band | ||
2300000000, 2310000000, NFM, 10, #90009470, GHz Ham Band | ||
2390000000, 2450000000, NFM, 10, #90009470, GHz Ham Band | ||
3300000000, 3500000000, NFM, 10, #90009470, GHz Ham Band | ||
5650000000, 5925000000, NFM, 10, #90009470, GHz Ham Band | ||
10000000000, 10500000000, NFM, 10, #90009470, GHz Ham Band | ||
24000000000, 24250000000, NFM, 10, #90009470, GHz Ham Band | ||
47000000000, 47200000000, NFM, 10, #90009470, GHz Ham Band | ||
77000000000, 81000000000, NFM, 10, #90009470, GHz Ham Band | ||
122250000000, 123000000000, NFM, 10, #90009470, GHz Ham Band | ||
134000000000, 141000000000, NFM, 10, #90009470, GHz Ham Band | ||
241000000000, 250000000000, NFM, 10, #90009470, GHz Ham Band | ||
|
||
# Radionavigation - Source: https://www.ntia.doc.gov/files/ntia/publications/2003-allochrt.pdf | ||
9000, 14000, USB, 10, #99AABD26, Radionavigation | ||
90000, 110000, USB, 10, #99AABD26, Radionavigation | ||
190000, 200000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
200000, 275000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
275000, 285000, USB, 10, #994C8E75, Maritime Radionavigation (Radio Beacons) | ||
275000, 285000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
285000, 300000, USB, 10, #99C05017, Aeronautical Radionavigation (Radio Beacons) | ||
285000, 300000, USB, 10, #994C8E75, Maritime Radionavigation (Radio Beacons) | ||
300000, 325000, USB, 10, #99C05017, Aeronautical Radionavigation (Radio Beacons) | ||
300000, 325000, USB, 10, #994C8E75, Maritime Radionavigation (Radio Beacons) | ||
325000, 335000, USB, 10, #99C05017, Aeronautical Radionavigation (Radio Beacons) | ||
325000, 335000, USB, 10, #994C8E75, Maritime Radionavigation (Radio Beacons) | ||
335000, 405000, USB, 10, #99C05017, Aeronautical Radionavigation (Radio Beacons) | ||
405000, 415000, USB, 10, #99AABD26, Radionavigation | ||
415000, 495000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
510000, 535000, USB, 10, #99C05017, Aeronautical Radionavigation (Radio Beacons) | ||
74800000, 75200000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
328600000, 335400000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
399900000, 400050000, USB, 10, #99E9EB7C, Radionavigation Satellite | ||
960000000, 1215000000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
1215000000, 1240000000, USB, 10, #99E9EB7C, Radionavigation Satellite | ||
1300000000, 1350000000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
1559000000, 1610000000, USB, 10, #99E9EB7C, Radionavigation Satellite (Space to Earth) | ||
1559000000, 1626500000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
2700000000, 2900000000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
2900000000, 3100000000, USB, 10, #994C8E75, Maritime Radionavigation | ||
3500000000, 3650000000, USB, 10, #99C05017, Aeronautical Radionavigation (Ground) | ||
4200000000, 4400000000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
5000000000, 5250000000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
5350000000, 5460000000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
5460000000, 5470000000, USB, 10, #99AABD26, Radionavigation | ||
5470000000, 5650000000, USB, 10, #994C8E75, Maritime Radionavigation | ||
9000000000, 9200000000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
9200000000, 9300000000, USB, 10, #994C8E75, Maritime Radionavigation | ||
9300000000, 9500000000, USB, 10, #99AABD26, Radionavigation | ||
13250000000, 13400000000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
14000000000, 14200000000, USB, 10, #99AABD26, Radionavigation | ||
15400000000, 15700000000, USB, 10, #99C05017, Aeronautical Radionavigation | ||
24450000000, 24650000000, USB, 10, #99AABD26, Radionavigation | ||
24750000000, 25050000000, USB, 10, #99AABD26, Radionavigation | ||
31800000000, 33400000000, USB, 10, #99AABD26, Radionavigation | ||
45500000000, 47000000000, USB, 10, #99E9EB7C, Radionavigation Satellite | ||
66000000000, 71000000000, USB, 10, #99AABD26, Radionavigation | ||
66000000000, 71000000000, USB, 10, #99E9EB7C, Radionavigation Satellite | ||
95000000000, 100000000000, USB, 10, #99AABD26, Radionavigation | ||
95000000000, 100000000000, USB, 10, #99E9EB7C, Radionavigation Satellite | ||
134000000000, 142000000000, USB, 10, #99E9EB7C, Radionavigation Satellite | ||
134000000000, 142000000000, USB, 10, #99AABD26, Radionavigation | ||
190000000000, 200000000000, USB, 10, #99E9EB7C, Radionavigation Satellite | ||
190000000000, 200000000000, USB, 10, #99AABD26, Radionavigation | ||
252000000000, 265000000000, USB, 10, #99E9EB7C, Radionavigation Satellite | ||
252000000000, 265000000000, USB, 10, #99AABD26, Radionavigation | ||
|
||
# Broadcast | ||
54000000, 72000000, AM, 10, #902E98BB, Broadcast Television | ||
76000000, 088000000, AM, 10, #902E98BB, Broadcast Television | ||
88000000, 108000000, WFM, 10, #902E98BB, Broadcast Radio | ||
174000000, 216000000, AM, 10, #902E98BB, Broadcast Television | ||
470000000, 512000000, AM, 10, #902E98BB, Broadcast Television | ||
512000000, 608000000, AM, 10, #902E98BB, Broadcast Television | ||
614000000, 698000000, AM, 10, #902E98BB, Broadcast Television | ||
698000000, 763000000, AM, 10, #902E98BB, Broadcast Television | ||
|
||
# Other | ||
108000000, 118000000, AM, 5000, #906600FF, Air Band VOR/ILS | ||
118000000, 137000000, AM, 5000, #900000FF, Air Band Voice | ||
26960000, 27410000, AM, 5000, #90FF0000, CB | ||
156000000, 162025000, NFM, 12500, #90000080, Marine | ||
225000000, 380000000, NFM, 12500, #90FF0000, Military Air | ||
240000000, 270000000, NFM, 12500, #90FF0000, Mil Sat | ||
446000000, 446200000, NFM, 6250, #9000FF00, PMR446 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,242 @@ | ||
/* -*- c++ -*- */ | ||
/* | ||
* Gqrx SDR: Software defined radio receiver powered by GNU Radio and Qt | ||
* https://gqrx.dk/ | ||
* | ||
* Copyright 2011-2013 Alexandru Csete OZ9AEC. | ||
* | ||
* Gqrx is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 3, or (at your option) | ||
* any later version. | ||
* | ||
* Gqrx is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Gqrx; see the file COPYING. If not, write to | ||
* the Free Software Foundation, Inc., 51 Franklin Street, | ||
* Boston, MA 02110-1301, USA. | ||
*/ | ||
#include <QApplication> | ||
#include <QCommandLineParser> | ||
#include <QDir> | ||
#include <QFile> | ||
#include <QMessageBox> | ||
#include <QString> | ||
#include <QStringList> | ||
#include <QtGlobal> | ||
|
||
#ifdef WITH_PORTAUDIO | ||
#include <portaudio.h> | ||
#endif | ||
#ifdef WITH_PULSEAUDIO | ||
#include <pulse/error.h> | ||
#include <pulse/simple.h> | ||
#endif | ||
|
||
#include "mainwindow_touch.h" | ||
#include "gqrx.h" | ||
|
||
#include <iostream> | ||
|
||
static void reset_conf(const QString &file_name); | ||
static void list_conf(); | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
QString cfg_file; | ||
bool edit_conf = false; | ||
int return_code = 0; | ||
|
||
QApplication app(argc, argv); | ||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); | ||
QCoreApplication::setOrganizationName(GQRX_ORG_NAME); | ||
QCoreApplication::setOrganizationDomain(GQRX_ORG_DOMAIN); | ||
QCoreApplication::setApplicationName(GQRX_APP_NAME); | ||
QCoreApplication::setApplicationVersion(VERSION); | ||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) | ||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); | ||
#endif | ||
QLoggingCategory::setFilterRules("*.debug=false"); | ||
|
||
QString plugin_path = QDir::cleanPath(QCoreApplication::applicationDirPath() + "/../soapy-modules"); | ||
QFileInfo plugin_path_info(plugin_path); | ||
if (plugin_path_info.isDir()) | ||
{ | ||
qputenv("SOAPY_SDR_PLUGIN_PATH", plugin_path.toUtf8()); | ||
qputenv("SOAPY_SDR_ROOT", "/invalid"); | ||
} | ||
|
||
// setup controlport via environment variables | ||
// see http://lists.gnu.org/archive/html/discuss-gnuradio/2013-05/msg00270.html | ||
// Note: tried using gr::prefs().save() but that doesn't have effect until the next time | ||
if (qputenv("GR_CONF_CONTROLPORT_ON", "False")) | ||
qDebug() << "Controlport disabled"; | ||
else | ||
qDebug() << "Failed to disable controlport"; | ||
|
||
QCommandLineParser parser; | ||
parser.setApplicationDescription("Gqrx software defined radio receiver " VERSION); | ||
parser.addHelpOption(); | ||
parser.addOptions({ | ||
{{"s", "style"}, "Use the given style (fusion, windows)", "style"}, | ||
{{"l", "list"}, "List existing configurations"}, | ||
{{"c", "conf"}, "Start with this config file", "file"}, | ||
{{"e", "edit"}, "Edit the config file before using it"}, | ||
{{"r", "reset"}, "Reset configuration file"}, | ||
}); | ||
parser.process(app); | ||
|
||
if (parser.isSet("style")) | ||
QApplication::setStyle(parser.value("style")); | ||
|
||
if (parser.isSet("list")) | ||
{ | ||
list_conf(); | ||
return 0; | ||
} | ||
|
||
// check whether audio backend is functional | ||
#ifdef WITH_PORTAUDIO | ||
PaError err = Pa_Initialize(); | ||
if (err != paNoError) | ||
{ | ||
QString message = QString("Portaudio error: %1").arg(Pa_GetErrorText(err)); | ||
qCritical() << message; | ||
QMessageBox::critical(nullptr, "Audio Error", message, | ||
QMessageBox::Abort, QMessageBox::NoButton); | ||
return 1; | ||
} | ||
#endif | ||
|
||
#ifdef WITH_PULSEAUDIO | ||
int error = 0; | ||
pa_simple *test_sink; | ||
pa_sample_spec ss; | ||
|
||
ss.format = PA_SAMPLE_FLOAT32LE; | ||
ss.rate = 48000; | ||
ss.channels = 2; | ||
test_sink = pa_simple_new(NULL, "Gqrx Test", PA_STREAM_PLAYBACK, NULL, | ||
"Test stream", &ss, NULL, NULL, &error); | ||
if (!test_sink) | ||
{ | ||
QString message = QString("Pulseaudio error: %1").arg(pa_strerror(error)); | ||
qCritical() << message; | ||
QMessageBox::critical(0, "Audio Error", message, | ||
QMessageBox::Abort, QMessageBox::NoButton); | ||
return 1; | ||
} | ||
pa_simple_free(test_sink); | ||
#endif | ||
|
||
|
||
if (parser.isSet("conf")) | ||
{ | ||
cfg_file = parser.value("conf"); | ||
qDebug() << "User specified config file:" << cfg_file; | ||
} | ||
else | ||
{ | ||
cfg_file = "default.conf"; | ||
qDebug() << "No user supplied config file. Using" << cfg_file; | ||
} | ||
|
||
if (parser.isSet("reset")) | ||
reset_conf(cfg_file); | ||
else if (parser.isSet("edit")) | ||
edit_conf = true; | ||
|
||
try { | ||
// Mainwindow will check whether we have a configuration | ||
// and open the config dialog if there is none or the specified | ||
// file does not exist. | ||
MainWindow w(cfg_file, edit_conf); | ||
|
||
if (w.configOk) | ||
{ | ||
w.show(); | ||
return_code = QApplication::exec(); | ||
} | ||
else | ||
{ | ||
return_code = 1; | ||
} | ||
} | ||
catch (std::exception &x) | ||
{ | ||
QMessageBox::warning(nullptr, | ||
QObject::tr("Crash detected"), | ||
QObject::tr("<p>gqrx exited with an exception:</p>" | ||
"<p><b>%1</b></p>" | ||
"<p>More information can be found by launching it from the console.</p>") | ||
.arg(x.what()), | ||
QMessageBox::Close); | ||
} | ||
|
||
#ifdef WITH_PORTAUDIO | ||
Pa_Terminate(); | ||
#endif | ||
|
||
return return_code; | ||
} | ||
|
||
/** Reset configuration file specified by file_name. */ | ||
static void reset_conf(const QString &file_name) | ||
{ | ||
QString cfg_file; | ||
QByteArray xdg_dir = qgetenv("XDG_CONFIG_HOME"); | ||
|
||
if (xdg_dir.isEmpty()) | ||
cfg_file = QString("%1/.config/gqrx/%2").arg(QDir::homePath()).arg(file_name); | ||
else | ||
cfg_file = QString("%1/gqrx/%2").arg(xdg_dir.data()).arg(file_name); | ||
|
||
if (QFile::exists(cfg_file)) | ||
{ | ||
if (QFile::remove(cfg_file)) | ||
qDebug() << cfg_file << "deleted"; | ||
else | ||
qDebug() << "Failed to remove" << cfg_file; | ||
} | ||
else | ||
{ | ||
qDebug() << "Can not delete" << cfg_file << "- file does not exist!"; | ||
} | ||
} | ||
|
||
/** List available configurations. */ | ||
static void list_conf() | ||
{ | ||
QString conf_path; | ||
QByteArray xdg_dir = qgetenv("XDG_CONFIG_HOME"); | ||
|
||
if (xdg_dir.isEmpty()) | ||
conf_path = QString("%1/.config/gqrx/").arg(QDir::homePath()); | ||
else | ||
conf_path = QString("%1/gqrx/").arg(xdg_dir.data()); | ||
|
||
QDir conf_dir = QDir(conf_path, "*.conf", QDir::Name, QDir::Files); | ||
QStringList conf_files = conf_dir.entryList(QStringList("*.conf")); | ||
|
||
std::cout << std::endl | ||
<< " Existing configuration files in " | ||
<< conf_path.toStdString() | ||
<< std::endl; | ||
|
||
if (conf_files.isEmpty()) | ||
{ | ||
std::cout << " *** NONE ***" << std::endl; | ||
} | ||
else | ||
{ | ||
for (int i = 0; i < conf_files.count(); i++) | ||
{ | ||
std::cout << " "; | ||
std::cout << conf_files.at(i).toLocal8Bit().constData() << std::endl; | ||
} | ||
} | ||
} |
Oops, something went wrong.