Commit 8d7db041 authored by Andreas Bombe's avatar Andreas Bombe

New upstream version 0.2.0+git20170310+dfsg

parent ac88baf7
This diff is collapsed.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/> Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
...@@ -290,8 +290,8 @@ to attach them to the start of each source file to most effectively ...@@ -290,8 +290,8 @@ to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found. the "copyright" line and a pointer to where the full notice is found.
CubicSDR <one line to give the program's name and a brief idea of what it does.>
Copyright (C) 2014 Charles J. Cliffe Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -329,7 +329,7 @@ necessary. Here is a sample; alter the names: ...@@ -329,7 +329,7 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker. `Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989 <signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice Ty Coon, President of Vice
This General Public License does not permit incorporating your program into This General Public License does not permit incorporating your program into
...@@ -337,4 +337,3 @@ proprietary programs. If your program is a subroutine library, you may ...@@ -337,4 +337,3 @@ proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. Public License instead of this License.
...@@ -48,4 +48,4 @@ Target Platforms: ...@@ -48,4 +48,4 @@ Target Platforms:
License: License:
------- -------
- GPL - GPL-2.0+
# https://github.com/idiap/juicer/blob/master/cmake/FindRtAudio.cmake
#
# Copyright 2015 by Idiap Research Institute
#
# Licensed under 3-clause BSD.
#
# Author(s):
# Phil Garner, November 2015
#
# ...but basically copied from FindSndFile in libube, in turn from the examples
# on the web.
#
#
# Try to find RtAudio
# Once done this will define
# RTAUDIO_FOUND - System has RtAudio
# RTAUDIO_INCLUDE_DIR - The RtAudio include directories
# RTAUDIO_LIBRARIES - The libraries needed to use RtAudio
# RTAUDIO_DEFINITIONS - Compiler switches required for using RtAudio
# RTAUDIO_VERSION_STRING - the version of RtAudio found
#
find_package(PkgConfig)
pkg_check_modules(PC_RTAUDIO rtaudio)
set(RTAUDIO_DEFINITIONS ${PC_RTAUDIO_CFLAGS_OTHER})
set(RTAUDIO_VERSION_STRING ${PC_RTAUDIO_VERSION})
find_path(
RTAUDIO_INCLUDE_DIR RtAudio.h
HINTS ${PC_RTAUDIO_INCLUDEDIR} ${PC_RTAUDIO_INCLUDE_DIRS}
)
find_library(
RTAUDIO_LIBRARIES NAMES rtaudio
HINTS ${PC_RTAUDIO_LIBDIR} ${PC_RTAUDIO_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
RtAudio
REQUIRED_VARS RTAUDIO_LIBRARIES RTAUDIO_INCLUDE_DIR
VERSION_VAR RTAUDIO_VERSION_STRING
)
#mark_as_advanced(RTAUDIO_INCLUDE_DIR RTAUDIO_LIBRARIES)
/* /*
LodePNG version 20160501 LodePNG version 20161127
Copyright (c) 2005-2016 Lode Vandevenne Copyright (c) 2005-2016 Lode Vandevenne
...@@ -39,7 +39,7 @@ Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for ...@@ -39,7 +39,7 @@ Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for
#pragma warning( disable : 4996 ) /*VS does not like fopen, but fopen_s is not standard C so unusable here*/ #pragma warning( disable : 4996 ) /*VS does not like fopen, but fopen_s is not standard C so unusable here*/
#endif /*_MSC_VER */ #endif /*_MSC_VER */
const char* LODEPNG_VERSION_STRING = "20160501"; const char* LODEPNG_VERSION_STRING = "20161127";
/* /*
This source file is built up in the following large parts. The code sections This source file is built up in the following large parts. The code sections
...@@ -3534,8 +3534,8 @@ void lodepng_color_profile_init(LodePNGColorProfile* profile) ...@@ -3534,8 +3534,8 @@ void lodepng_color_profile_init(LodePNGColorProfile* profile)
{ {
profile->colored = 0; profile->colored = 0;
profile->key = 0; profile->key = 0;
profile->alpha = 0;
profile->key_r = profile->key_g = profile->key_b = 0; profile->key_r = profile->key_g = profile->key_b = 0;
profile->alpha = 0;
profile->numcolors = 0; profile->numcolors = 0;
profile->bits = 1; profile->bits = 1;
} }
...@@ -3622,8 +3622,8 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile, ...@@ -3622,8 +3622,8 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
if(a != 65535 && (a != 0 || (profile->key && !matchkey))) if(a != 65535 && (a != 0 || (profile->key && !matchkey)))
{ {
profile->alpha = 1; profile->alpha = 1;
profile->key = 0;
alpha_done = 1; alpha_done = 1;
if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
} }
else if(a == 0 && !profile->alpha && !profile->key) else if(a == 0 && !profile->alpha && !profile->key)
{ {
...@@ -3636,6 +3636,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile, ...@@ -3636,6 +3636,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
{ {
/* Color key cannot be used if an opaque pixel also has that RGB color. */ /* Color key cannot be used if an opaque pixel also has that RGB color. */
profile->alpha = 1; profile->alpha = 1;
profile->key = 0;
alpha_done = 1; alpha_done = 1;
} }
} }
...@@ -3651,6 +3652,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile, ...@@ -3651,6 +3652,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
{ {
/* Color key cannot be used if an opaque pixel also has that RGB color. */ /* Color key cannot be used if an opaque pixel also has that RGB color. */
profile->alpha = 1; profile->alpha = 1;
profile->key = 0;
alpha_done = 1; alpha_done = 1;
} }
} }
...@@ -3684,6 +3686,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile, ...@@ -3684,6 +3686,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
if(a != 255 && (a != 0 || (profile->key && !matchkey))) if(a != 255 && (a != 0 || (profile->key && !matchkey)))
{ {
profile->alpha = 1; profile->alpha = 1;
profile->key = 0;
alpha_done = 1; alpha_done = 1;
if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
} }
...@@ -3698,6 +3701,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile, ...@@ -3698,6 +3701,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
{ {
/* Color key cannot be used if an opaque pixel also has that RGB color. */ /* Color key cannot be used if an opaque pixel also has that RGB color. */
profile->alpha = 1; profile->alpha = 1;
profile->key = 0;
alpha_done = 1; alpha_done = 1;
if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
} }
...@@ -3734,7 +3738,9 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile, ...@@ -3734,7 +3738,9 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
{ {
/* Color key cannot be used if an opaque pixel also has that RGB color. */ /* Color key cannot be used if an opaque pixel also has that RGB color. */
profile->alpha = 1; profile->alpha = 1;
profile->key = 0;
alpha_done = 1; alpha_done = 1;
if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
} }
} }
} }
...@@ -3760,7 +3766,7 @@ unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out, ...@@ -3760,7 +3766,7 @@ unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out,
{ {
LodePNGColorProfile prof; LodePNGColorProfile prof;
unsigned error = 0; unsigned error = 0;
unsigned i, n, palettebits, grey_ok, palette_ok; unsigned i, n, palettebits, palette_ok;
lodepng_color_profile_init(&prof); lodepng_color_profile_init(&prof);
error = lodepng_get_color_profile(&prof, image, w, h, mode_in); error = lodepng_get_color_profile(&prof, image, w, h, mode_in);
...@@ -3770,14 +3776,14 @@ unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out, ...@@ -3770,14 +3776,14 @@ unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out,
if(prof.key && w * h <= 16) if(prof.key && w * h <= 16)
{ {
prof.alpha = 1; /*too few pixels to justify tRNS chunk overhead*/ prof.alpha = 1; /*too few pixels to justify tRNS chunk overhead*/
prof.key = 0;
if(prof.bits < 8) prof.bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ if(prof.bits < 8) prof.bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
} }
grey_ok = !prof.colored && !prof.alpha; /*grey without alpha, with potentially low bits*/
n = prof.numcolors; n = prof.numcolors;
palettebits = n <= 2 ? 1 : (n <= 4 ? 2 : (n <= 16 ? 4 : 8)); palettebits = n <= 2 ? 1 : (n <= 4 ? 2 : (n <= 16 ? 4 : 8));
palette_ok = n <= 256 && (n * 2 < w * h) && prof.bits <= 8; palette_ok = n <= 256 && prof.bits <= 8;
if(w * h < n * 2) palette_ok = 0; /*don't add palette overhead if image has only a few pixels*/ if(w * h < n * 2) palette_ok = 0; /*don't add palette overhead if image has only a few pixels*/
if(grey_ok && prof.bits <= palettebits) palette_ok = 0; /*grey is less overhead*/ if(!prof.colored && prof.bits <= palettebits) palette_ok = 0; /*grey is less overhead*/
if(palette_ok) if(palette_ok)
{ {
...@@ -3806,7 +3812,7 @@ unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out, ...@@ -3806,7 +3812,7 @@ unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out,
mode_out->colortype = prof.alpha ? (prof.colored ? LCT_RGBA : LCT_GREY_ALPHA) mode_out->colortype = prof.alpha ? (prof.colored ? LCT_RGBA : LCT_GREY_ALPHA)
: (prof.colored ? LCT_RGB : LCT_GREY); : (prof.colored ? LCT_RGB : LCT_GREY);
if(prof.key && !prof.alpha) if(prof.key)
{ {
unsigned mask = (1u << mode_out->bitdepth) - 1u; /*profile always uses 16-bit, mask converts it*/ unsigned mask = (1u << mode_out->bitdepth) - 1u; /*profile always uses 16-bit, mask converts it*/
mode_out->key_r = prof.key_r & mask; mode_out->key_r = prof.key_r & mask;
......
/* /*
LodePNG version 20160501 LodePNG version 20161127
Copyright (c) 2005-2016 Lode Vandevenne Copyright (c) 2005-2016 Lode Vandevenne
...@@ -559,11 +559,11 @@ Used internally by default if "auto_convert" is enabled. Public because it's use ...@@ -559,11 +559,11 @@ Used internally by default if "auto_convert" is enabled. Public because it's use
typedef struct LodePNGColorProfile typedef struct LodePNGColorProfile
{ {
unsigned colored; /*not greyscale*/ unsigned colored; /*not greyscale*/
unsigned key; /*if true, image is not opaque. Only if true and alpha is false, color key is possible.*/ unsigned key; /*image is not opaque and color key is possible instead of full alpha*/
unsigned short key_r; /*these values are always in 16-bit bitdepth in the profile*/ unsigned short key_r; /*key values, always as 16-bit, in 8-bit case the byte is duplicated, e.g. 65535 means 255*/
unsigned short key_g; unsigned short key_g;
unsigned short key_b; unsigned short key_b;
unsigned alpha; /*alpha channel or alpha palette required*/ unsigned alpha; /*image is not opaque and alpha channel or alpha palette required*/
unsigned numcolors; /*amount of colors, up to 257. Not valid if bits == 16.*/ unsigned numcolors; /*amount of colors, up to 257. Not valid if bits == 16.*/
unsigned char palette[1024]; /*Remembers up to the first 256 RGBA colors, in no particular order*/ unsigned char palette[1024]; /*Remembers up to the first 256 RGBA colors, in no particular order*/
unsigned bits; /*bits per channel (not for palette). 1,2 or 4 for greyscale only. 16 if 16-bit per channel required.*/ unsigned bits; /*bits per channel (not for palette). 1,2 or 4 for greyscale only. 16 if 16-bit per channel required.*/
...@@ -896,6 +896,7 @@ TODO: ...@@ -896,6 +896,7 @@ TODO:
[X] let the "isFullyOpaque" function check color keys and transparent palettes too [X] let the "isFullyOpaque" function check color keys and transparent palettes too
[X] better name for the variables "codes", "codesD", "codelengthcodes", "clcl" and "lldl" [X] better name for the variables "codes", "codesD", "codelengthcodes", "clcl" and "lldl"
[ ] don't stop decoding on errors like 69, 57, 58 (make warnings) [ ] don't stop decoding on errors like 69, 57, 58 (make warnings)
[ ] make warnings like: oob palette, checksum fail, data after iend, wrong/unknown crit chunk, no null terminator in text, ...
[ ] let the C++ wrapper catch exceptions coming from the standard library and return LodePNG error codes [ ] let the C++ wrapper catch exceptions coming from the standard library and return LodePNG error codes
[ ] allow user to provide custom color conversion functions, e.g. for premultiplied alpha, padding bits or not, ... [ ] allow user to provide custom color conversion functions, e.g. for premultiplied alpha, padding bits or not, ...
[ ] allow user to give data (void*) to custom allocator [ ] allow user to give data (void*) to custom allocator
...@@ -1607,6 +1608,7 @@ yyyymmdd. ...@@ -1607,6 +1608,7 @@ yyyymmdd.
Some changes aren't backwards compatible. Those are indicated with a (!) Some changes aren't backwards compatible. Those are indicated with a (!)
symbol. symbol.
*) 27 nov 2016: grey+alpha auto color model detection bugfix
*) 18 apr 2016: Changed qsort to custom stable sort (for platforms w/o qsort). *) 18 apr 2016: Changed qsort to custom stable sort (for platforms w/o qsort).
*) 09 apr 2016: Fixed colorkey usage detection, and better file loading (within *) 09 apr 2016: Fixed colorkey usage detection, and better file loading (within
the limits of pure C90). the limits of pure C90).
......
// Copyright (c) Charles J. Cliffe
// SPDX-License-Identifier: GPL-2.0+
#include "AppConfig.h" #include "AppConfig.h"
#include "CubicSDR.h" #include "CubicSDR.h"
...@@ -28,7 +31,6 @@ long long DeviceConfig::getOffset() { ...@@ -28,7 +31,6 @@ long long DeviceConfig::getOffset() {
return offset.load(); return offset.load();
} }
void DeviceConfig::setSampleRate(long srate) { void DeviceConfig::setSampleRate(long srate) {
sampleRate.store(srate); sampleRate.store(srate);
} }
...@@ -82,7 +84,7 @@ void DeviceConfig::save(DataNode *node) { ...@@ -82,7 +84,7 @@ void DeviceConfig::save(DataNode *node) {
std::lock_guard < std::mutex > lock(busy_lock); std::lock_guard < std::mutex > lock(busy_lock);
*node->newChild("id") = deviceId; *node->newChild("id") = deviceId;
*node->newChild("name") = deviceName; *node->newChild("name") = deviceName;
*node->newChild("ppm") = (int)ppm.load(); *node->newChild("ppm") = ppm.load();
*node->newChild("offset") = offset.load(); *node->newChild("offset") = offset.load();
*node->newChild("sample_rate") = sampleRate.load(); *node->newChild("sample_rate") = sampleRate.load();
*node->newChild("agc_mode") = agcMode.load()?1:0; *node->newChild("agc_mode") = agcMode.load()?1:0;
...@@ -289,7 +291,13 @@ AppConfig::AppConfig() : configName("") { ...@@ -289,7 +291,13 @@ AppConfig::AppConfig() : configName("") {
centerFreq.store(100000000); centerFreq.store(100000000);
waterfallLinesPerSec.store(DEFAULT_WATERFALL_LPS); waterfallLinesPerSec.store(DEFAULT_WATERFALL_LPS);
spectrumAvgSpeed.store(0.65f); spectrumAvgSpeed.store(0.65f);
dbOffset.store(0);
modemPropsCollapsed.store(false); modemPropsCollapsed.store(false);
mainSplit = -1;
visSplit = -1;
bookmarkSplit = 200;
bookmarksVisible.store(true);
#ifdef USE_HAMLIB #ifdef USE_HAMLIB
rigEnabled.store(false); rigEnabled.store(false);
rigModel.store(1); rigModel.store(1);
...@@ -425,6 +433,14 @@ float AppConfig::getSpectrumAvgSpeed() { ...@@ -425,6 +433,14 @@ float AppConfig::getSpectrumAvgSpeed() {
return spectrumAvgSpeed.load(); return spectrumAvgSpeed.load();
} }
void AppConfig::setDBOffset(int offset) {
this->dbOffset.store(offset);
}
int AppConfig::getDBOffset() {
return dbOffset.load();
}
void AppConfig::setManualDevices(std::vector<SDRManualDef> manuals) { void AppConfig::setManualDevices(std::vector<SDRManualDef> manuals) {
manualDevices = manuals; manualDevices = manuals;
} }
...@@ -433,6 +449,39 @@ std::vector<SDRManualDef> AppConfig::getManualDevices() { ...@@ -433,6 +449,39 @@ std::vector<SDRManualDef> AppConfig::getManualDevices() {
return manualDevices; return manualDevices;
} }
void AppConfig::setMainSplit(float value) {
mainSplit.store(value);
}
float AppConfig::getMainSplit() {
return mainSplit.load();
}
void AppConfig::setVisSplit(float value) {
visSplit.store(value);
}
float AppConfig::getVisSplit() {
return visSplit.load();
}
void AppConfig::setBookmarkSplit(float value) {
bookmarkSplit.store(value);
}
float AppConfig::getBookmarkSplit() {
return bookmarkSplit.load();
}
void AppConfig::setBookmarksVisible(bool state) {
bookmarksVisible.store(state);
}
bool AppConfig::getBookmarksVisible() {
return bookmarksVisible.load();
}
void AppConfig::setConfigName(std::string configName) { void AppConfig::setConfigName(std::string configName) {
this->configName = configName; this->configName = configName;
} }
...@@ -478,6 +527,12 @@ bool AppConfig::save() { ...@@ -478,6 +527,12 @@ bool AppConfig::save() {
*window_node->newChild("waterfall_lps") = waterfallLinesPerSec.load(); *window_node->newChild("waterfall_lps") = waterfallLinesPerSec.load();
*window_node->newChild("spectrum_avg") = spectrumAvgSpeed.load(); *window_node->newChild("spectrum_avg") = spectrumAvgSpeed.load();
*window_node->newChild("modemprops_collapsed") = modemPropsCollapsed.load();; *window_node->newChild("modemprops_collapsed") = modemPropsCollapsed.load();;
*window_node->newChild("db_offset") = dbOffset.load();
*window_node->newChild("main_split") = mainSplit.load();
*window_node->newChild("vis_split") = visSplit.load();
*window_node->newChild("bookmark_split") = bookmarkSplit.load();
*window_node->newChild("bookmark_visible") = bookmarksVisible.load();
} }
DataNode *devices_node = cfg.rootNode()->newChild("devices"); DataNode *devices_node = cfg.rootNode()->newChild("devices");
...@@ -556,12 +611,13 @@ bool AppConfig::load() { ...@@ -556,12 +611,13 @@ bool AppConfig::load() {
} }
if (cfg.rootNode()->hasAnother("window")) { if (cfg.rootNode()->hasAnother("window")) {
int x,y,w,h; int x = 0 ,y = 0 ,w = 0 ,h = 0;
int max,tips,lpm,mpc; int max = 0 ,tips = 0 ,lpm = 0 ,mpc = 0;
DataNode *win_node = cfg.rootNode()->getNext("window"); DataNode *win_node = cfg.rootNode()->getNext("window");
if (win_node->hasAnother("w") && win_node->hasAnother("h") && win_node->hasAnother("x") && win_node->hasAnother("y")) { if (win_node->hasAnother("w") && win_node->hasAnother("h") && win_node->hasAnother("x") && win_node->hasAnother("y")) {
win_node->getNext("x")->element()->get(x); win_node->getNext("x")->element()->get(x);
win_node->getNext("y")->element()->get(y); win_node->getNext("y")->element()->get(y);
win_node->getNext("w")->element()->get(w); win_node->getNext("w")->element()->get(w);
...@@ -628,6 +684,37 @@ bool AppConfig::load() { ...@@ -628,6 +684,37 @@ bool AppConfig::load() {
win_node->getNext("modemprops_collapsed")->element()->get(mpc); win_node->getNext("modemprops_collapsed")->element()->get(mpc);
modemPropsCollapsed.store(mpc?true:false); modemPropsCollapsed.store(mpc?true:false);
} }
if (win_node->hasAnother("db_offset")) {
DataNode *offset_node = win_node->getNext("db_offset");
int offsetValue = 0;
offset_node->element()->get(offsetValue);
setDBOffset(offsetValue);
}
if (win_node->hasAnother("main_split")) {
float gVal;
win_node->getNext("main_split")->element()->get(gVal);
mainSplit.store(gVal);
}
if (win_node->hasAnother("vis_split")) {
float gVal;
win_node->getNext("vis_split")->element()->get(gVal);
visSplit.store(gVal);
}
if (win_node->hasAnother("bookmark_split")) {
float gVal;
win_node->getNext("bookmark_split")->element()->get(gVal);
bookmarkSplit.store(gVal);
}
if (win_node->hasAnother("bookmark_visible")) {
int bVal;
win_node->getNext("bookmark_visible")->element()->get(bVal);
bookmarksVisible.store(bVal);
}
} }
if (cfg.rootNode()->hasAnother("devices")) { if (cfg.rootNode()->hasAnother("devices")) {
......
// Copyright (c) Charles J. Cliffe
// SPDX-License-Identifier: GPL-2.0+
#pragma once #pragma once
#include <wx/stdpaths.h> #include <wx/stdpaths.h>
...@@ -112,9 +115,25 @@ public: ...@@ -112,9 +115,25 @@ public:
void setSpectrumAvgSpeed(float avgSpeed); void setSpectrumAvgSpeed(float avgSpeed);
float getSpectrumAvgSpeed(); float getSpectrumAvgSpeed();
void setDBOffset(int offset);
int getDBOffset();
void setManualDevices(std::vector<SDRManualDef> manuals); void setManualDevices(std::vector<SDRManualDef> manuals);
std::vector<SDRManualDef> getManualDevices(); std::vector<SDRManualDef> getManualDevices();
void setMainSplit(float value);
float getMainSplit();
void setVisSplit(float value);
float getVisSplit();
void setBookmarkSplit(float value);
float getBookmarkSplit();
void setBookmarksVisible(bool state);
bool getBookmarksVisible();
#if USE_HAMLIB #if USE_HAMLIB
int getRigModel(); int getRigModel();
void setRigModel(int rigModel); void setRigModel(int rigModel);
...@@ -157,8 +176,10 @@ private: ...@@ -157,8 +176,10 @@ private:
std::atomic_llong snap; std::atomic_llong snap;
std::atomic_llong centerFreq; std::atomic_llong centerFreq;
std::atomic_int waterfallLinesPerSec; std::atomic_int waterfallLinesPerSec;
std::atomic<float> spectrumAvgSpeed; std::atomic<float> spectrumAvgSpeed, mainSplit, visSplit, bookmarkSplit;
std::atomic_int dbOffset;
std::vector<SDRManualDef> manualDevices; std::vector<SDRManualDef> manualDevices;
std::atomic_bool bookmarksVisible;
#if USE_HAMLIB #if USE_HAMLIB
std::atomic_int rigModel, rigRate; std::atomic_int rigModel, rigRate;
std::string rigPort; std::string rigPort;
......
This diff is collapsed.
// Copyright (c) Charles J. Cliffe
// SPDX-License-Identifier: GPL-2.0+
#pragma once #pragma once
#include <wx/frame.h> #include <wx/frame.h>
#include <wx/panel.h> #include <wx/panel.h>
#include <wx/splitter.h> #include <wx/splitter.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/bitmap.h>
#include <wx/statbmp.h>
#include "PrimaryGLContext.h" #include "PrimaryGLContext.h"
...@@ -19,6 +24,8 @@ ...@@ -19,6 +24,8 @@
#include "ModemProperties.h" #include "ModemProperties.h"
//#include "UITestCanvas.h" //#include "UITestCanvas.h"
#include "FrequencyDialog.h" #include "FrequencyDialog.h"
#include "BookmarkView.h"
#include "AboutDialog.h"
#include <map> #include <map>
...@@ -32,9 +39,12 @@ ...@@ -32,9 +39,12 @@
#define wxID_AGC_CONTROL 2009 #define wxID_AGC_CONTROL 2009
#define wxID_SDR_START_STOP 2010 #define wxID_SDR_START_STOP 2010
#define wxID_LOW_PERF 2011 #define wxID_LOW_PERF 2011
#define wxID_SET_DB_OFFSET 2012
#define wxID_ABOUT_CUBICSDR 2013
#define wxID_MAIN_SPLITTER 2050 #define wxID_MAIN_SPLITTER 2050
#define wxID_VIS_SPLITTER 2051 #define wxID_VIS_SPLITTER 2051
#define wxID_BM_SPLITTER 2052
#define wxID_THEME_DEFAULT 2100 #define wxID_THEME_DEFAULT 2100
#define wxID_THEME_SHARP 2101 #define wxID_THEME_SHARP 2101
...@@ -44,7 +54,10 @@ ...@@ -44,7 +54,10 @@
#define wxID_THEME_HD 2105 #define wxID_THEME_HD 2105
#define wxID_THEME_RADAR 2106 #define wxID_THEME_RADAR 2106
#define wxID_DISPLAY_BOOKMARKS 2107
#define wxID_BANDWIDTH_BASE 2150 #define wxID_BANDWIDTH_BASE 2150
#define wxID_BANDWIDTH_MANUAL_DIALOG 2199
#define wxID_BANDWIDTH_MANUAL 2200 #define wxID_BANDWIDTH_MANUAL 2200
#define wxID_DISPLAY_BASE 2250