SDRPlusPlus/decoder_modules/new_radio/src/radio_module.h

491 lines
18 KiB
C
Raw Normal View History

2021-12-03 19:46:09 +01:00
#pragma once
#include <imgui.h>
#include <module.h>
#include <gui/gui.h>
#include <gui/style.h>
#include <signal_path/signal_path.h>
#include <config.h>
2021-12-07 02:13:23 +01:00
#include <dsp/chain.h>
#include <dsp/noise_reduction.h>
2021-12-03 19:46:09 +01:00
ConfigManager config;
#define CONCAT(a, b) ((std::string(a) + b).c_str())
2021-12-04 04:49:51 +01:00
const double DeemphasisModes[] {
50e-6,
75e-6
};
const char* DeemhasisModesTxt = "50µS\00075µS\000None\000";
2021-12-04 19:59:30 +01:00
class NewRadioModule;
2021-12-03 19:46:09 +01:00
#include "demod.h"
2021-12-04 19:59:30 +01:00
class NewRadioModule : public ModuleManager::Instance {
2021-12-03 19:46:09 +01:00
public:
2021-12-04 19:59:30 +01:00
NewRadioModule(std::string name) {
2021-12-03 19:46:09 +01:00
this->name = name;
// Initialize the config if it doesn't exist
2021-12-04 19:59:30 +01:00
bool created = false;
2021-12-03 19:46:09 +01:00
config.acquire();
if (!config.conf.contains(name)) {
config.conf[name]["selectedDemodId"] = 1;
2021-12-04 19:59:30 +01:00
created = true;
2021-12-03 19:46:09 +01:00
}
selectedDemodID = config.conf[name]["selectedDemodId"];
2021-12-04 19:59:30 +01:00
config.release(created);
2021-12-03 19:46:09 +01:00
// Create demodulator instances
demods.fill(NULL);
demods[RADIO_DEMOD_WFM] = new demod::WFM();
2021-12-04 04:49:51 +01:00
demods[RADIO_DEMOD_NFM] = new demod::NFM();
demods[RADIO_DEMOD_AM] = new demod::AM();
demods[RADIO_DEMOD_USB] = new demod::USB();
demods[RADIO_DEMOD_LSB] = new demod::LSB();
demods[RADIO_DEMOD_DSB] = new demod::DSB();
demods[RADIO_DEMOD_CW] = new demod::CW();
2021-12-04 17:46:48 +01:00
demods[RADIO_DEMOD_RAW] = new demod::RAW();
2021-12-03 19:46:09 +01:00
// Initialize the VFO
vfo = sigpath::vfoManager.createVFO(name, ImGui::WaterfallVFO::REF_CENTER, 0, 200000, 200000, 50000, 200000, false);
onUserChangedBandwidthHandler.handler = vfoUserChangedBandwidthHandler;
onUserChangedBandwidthHandler.ctx = this;
vfo->wtfVFO->onUserChangedBandwidth.bindHandler(&onUserChangedBandwidthHandler);
2021-12-07 02:13:23 +01:00
// Initialize IF DSP chain
ifChainOutputChanged.ctx = this;
ifChainOutputChanged.handler = ifChainOutputChangeHandler;
ifChain.init(vfo->output, &ifChainOutputChanged);
2021-12-03 19:46:09 +01:00
2021-12-07 02:13:23 +01:00
squelch.block.init(NULL, MIN_SQUELCH);
ifChain.add(&squelch);
// Load configuration for and enabled all demodulators
2021-12-04 04:49:51 +01:00
EventHandler<dsp::stream<dsp::stereo_t>*> _demodOutputChangeHandler;
_demodOutputChangeHandler.handler = demodOutputChangeHandler;
_demodOutputChangeHandler.ctx = this;
2021-12-03 19:46:09 +01:00
for (auto& demod : demods) {
if (!demod) { continue; }
// Default config
double bw = demod->getDefaultBandwidth();
if (!config.conf[name].contains(demod->getName())) {
config.conf[name][demod->getName()]["bandwidth"] = bw;
config.conf[name][demod->getName()]["snapInterval"] = demod->getDefaultSnapInterval();
config.conf[name][demod->getName()]["squelchLevel"] = MIN_SQUELCH;
2021-12-04 04:49:51 +01:00
config.conf[name][demod->getName()]["squelchEnabled"] = false;
config.conf[name][demod->getName()]["deempMode"] = demod->getDefaultDeemphasisMode();
2021-12-03 19:46:09 +01:00
}
bw = std::clamp<double>(bw, demod->getMinBandwidth(), demod->getMaxBandwidth());
// Initialize
2021-12-07 02:13:23 +01:00
demod->init(name, &config, ifChain.getOutput(), bw, _demodOutputChangeHandler, stream.getSampleRate());
2021-12-03 19:46:09 +01:00
}
2021-12-07 02:13:23 +01:00
// Initialize audio DSP chain
afChainOutputChanged.ctx = this;
afChainOutputChanged.handler = afChainOutputChangeHandler;
afChain.init(&dummyAudioStream, &afChainOutputChanged);
2021-12-03 19:46:09 +01:00
win.init(24000, 24000, 48000);
2021-12-07 02:13:23 +01:00
resamp.block.init(NULL, &win, 250000, 48000);
deemp.block.init(NULL, 48000, 50e-6);
deemp.block.bypass = false;
afChain.add(&resamp);
afChain.add(&deemp);
// Initialize the sink
srChangeHandler.ctx = this;
srChangeHandler.handler = sampleRateChangeHandler;
stream.init(afChain.getOutput(), &srChangeHandler, audioSampleRate);
sigpath::sinkManager.registerStream(name, &stream);
2021-12-03 19:46:09 +01:00
// Select the demodulator
selectDemodByID((DemodID)selectedDemodID);
2021-12-07 02:13:23 +01:00
// Start IF chain
ifChain.start();
// Start AF chain
afChain.start();
2021-12-04 17:46:48 +01:00
// Start stream, the rest was started when selecting the demodulator
2021-12-03 19:46:09 +01:00
stream.start();
2021-12-04 17:46:48 +01:00
gui::menu.registerEntry(name, menuHandler, this, this);
2021-12-03 19:46:09 +01:00
}
2021-12-04 19:59:30 +01:00
~NewRadioModule() {
2021-12-03 19:46:09 +01:00
gui::menu.removeEntry(name);
2021-12-04 19:59:30 +01:00
stream.stop();
if (enabled) {
2021-12-07 02:13:23 +01:00
disable();
2021-12-04 19:59:30 +01:00
}
sigpath::sinkManager.unregisterStream(name);
2021-12-03 19:46:09 +01:00
}
void postInit() {}
void enable() {
enabled = true;
2021-12-04 17:46:48 +01:00
if (!vfo) {
vfo = sigpath::vfoManager.createVFO(name, ImGui::WaterfallVFO::REF_CENTER, 0, 200000, 200000, 50000, 200000, false);
vfo->wtfVFO->onUserChangedBandwidth.bindHandler(&onUserChangedBandwidthHandler);
2021-12-04 17:46:48 +01:00
}
selectDemodByID((DemodID)selectedDemodID);
2021-12-03 19:46:09 +01:00
}
void disable() {
enabled = false;
2021-12-07 02:13:23 +01:00
ifChain.stop();
2021-12-04 17:46:48 +01:00
if (selectedDemod) { selectedDemod->stop(); }
2021-12-07 02:13:23 +01:00
afChain.stop();
2021-12-04 17:46:48 +01:00
if (vfo) { sigpath::vfoManager.deleteVFO(vfo); }
vfo = NULL;
2021-12-03 19:46:09 +01:00
}
bool isEnabled() {
return enabled;
}
std::string name;
enum DemodID {
RADIO_DEMOD_NFM,
RADIO_DEMOD_WFM,
RADIO_DEMOD_AM,
RADIO_DEMOD_DSB,
RADIO_DEMOD_USB,
RADIO_DEMOD_CW,
RADIO_DEMOD_LSB,
RADIO_DEMOD_RAW,
_RADIO_DEMOD_COUNT,
};
private:
static void menuHandler(void* ctx) {
2021-12-04 19:59:30 +01:00
NewRadioModule* _this = (NewRadioModule*)ctx;
2021-12-03 19:46:09 +01:00
if (!_this->enabled) { style::beginDisabled(); }
float menuWidth = ImGui::GetContentRegionAvailWidth();
ImGui::BeginGroup();
ImGui::Columns(4, CONCAT("RadioModeColumns##_", _this->name), false);
if (ImGui::RadioButton(CONCAT("NFM##_", _this->name), _this->selectedDemodID == 0) && _this->selectedDemodID != 0) {
_this->selectDemodByID(RADIO_DEMOD_NFM);
}
if (ImGui::RadioButton(CONCAT("WFM##_", _this->name), _this->selectedDemodID == 1) && _this->selectedDemodID != 1) {
_this->selectDemodByID(RADIO_DEMOD_WFM);
}
ImGui::NextColumn();
if (ImGui::RadioButton(CONCAT("AM##_", _this->name), _this->selectedDemodID == 2) && _this->selectedDemodID != 2) {
_this->selectDemodByID(RADIO_DEMOD_AM);
}
if (ImGui::RadioButton(CONCAT("DSB##_", _this->name), _this->selectedDemodID == 3) && _this->selectedDemodID != 3) {
_this->selectDemodByID(RADIO_DEMOD_DSB);
}
ImGui::NextColumn();
if (ImGui::RadioButton(CONCAT("USB##_", _this->name), _this->selectedDemodID == 4) && _this->selectedDemodID != 4) {
_this->selectDemodByID(RADIO_DEMOD_USB);
}
if (ImGui::RadioButton(CONCAT("CW##_", _this->name), _this->selectedDemodID == 5) && _this->selectedDemodID != 5) {
_this->selectDemodByID(RADIO_DEMOD_CW);
};
ImGui::NextColumn();
if (ImGui::RadioButton(CONCAT("LSB##_", _this->name), _this->selectedDemodID == 6) && _this->selectedDemodID != 6) {
_this->selectDemodByID(RADIO_DEMOD_LSB);
}
if (ImGui::RadioButton(CONCAT("RAW##_", _this->name), _this->selectedDemodID == 7) && _this->selectedDemodID != 7) {
_this->selectDemodByID(RADIO_DEMOD_RAW);
};
ImGui::Columns(1, CONCAT("EndRadioModeColumns##_", _this->name), false);
ImGui::EndGroup();
2021-12-04 04:49:51 +01:00
if (!_this->bandwidthLocked) {
ImGui::LeftLabel("Bandwidth");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputFloat(("##_radio_bw_" + _this->name).c_str(), &_this->bandwidth, 1, 100, "%.0f")) {
_this->bandwidth = std::clamp<float>(_this->bandwidth, _this->minBandwidth, _this->maxBandwidth);
_this->setBandwidth(_this->bandwidth);
config.acquire();
config.conf[_this->name][_this->selectedDemod->getName()]["bandwidth"] = _this->bandwidth;
config.release(true);
}
}
2021-12-03 19:46:09 +01:00
2021-12-04 04:49:51 +01:00
ImGui::LeftLabel("Snap Interval");
2021-12-03 19:46:09 +01:00
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
2021-12-04 04:49:51 +01:00
if (ImGui::InputInt(("##_radio_snap_" + _this->name).c_str(), &_this->snapInterval, 1, 100)) {
if (_this->snapInterval < 1) { _this->snapInterval = 1; }
_this->vfo->setSnapInterval(_this->snapInterval);
config.acquire();
config.conf[_this->name][_this->selectedDemod->getName()]["snapInterval"] = _this->snapInterval;
config.release(true);
}
if (_this->deempAllowed) {
ImGui::LeftLabel("De-emphasis");
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::Combo(("##_radio_wfm_deemp_" + _this->name).c_str(), &_this->deempMode, DeemhasisModesTxt)) {
_this->setDeemphasisMode(_this->deempMode);
config.acquire();
config.conf[_this->name][_this->selectedDemod->getName()]["deempMode"] = _this->deempMode;
config.release(true);
}
}
if (ImGui::Checkbox(("Squelch##_radio_sqelch_ena_" + _this->name).c_str(), &_this->squelchEnabled)) {
_this->setSquelchEnabled(_this->squelchEnabled);
config.acquire();
config.conf[_this->name][_this->selectedDemod->getName()]["squelchEnabled"] = _this->squelchEnabled;
config.release(true);
}
if (!_this->squelchEnabled && _this->enabled) { style::beginDisabled(); }
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_sqelch_lvl_" + _this->name).c_str(), &_this->squelchLevel, _this->MIN_SQUELCH, _this->MAX_SQUELCH, "%.3fdB")) {
2021-12-07 02:13:23 +01:00
_this->squelch.block.setLevel(_this->squelchLevel);
2021-12-03 19:46:09 +01:00
config.acquire();
config.conf[_this->name][_this->selectedDemod->getName()]["squelchLevel"] = _this->squelchLevel;
config.release(true);
}
2021-12-04 04:49:51 +01:00
if (!_this->squelchEnabled && _this->enabled) { style::endDisabled(); }
_this->selectedDemod->showMenu();
2021-12-03 19:46:09 +01:00
if (!_this->enabled) { style::endDisabled(); }
}
void selectDemodByID(DemodID id) {
demod::Demodulator* demod = demods[id];
if (!demod) {
spdlog::error("Demodulator {0} not implemented", id);
return;
}
selectedDemodID = id;
selectDemod(demod);
2021-12-07 02:13:23 +01:00
2021-12-04 19:59:30 +01:00
// Save config
config.acquire();
config.conf[name]["selectedDemodId"] = id;
config.release(true);
2021-12-03 19:46:09 +01:00
}
void selectDemod(demod::Demodulator* demod) {
// Stopcurrently selected demodulator and select new
if (selectedDemod) { selectedDemod->stop(); }
selectedDemod = demod;
2021-12-04 17:46:48 +01:00
// Give the demodulator the most recent audio SR
selectedDemod->AFSampRateChanged(audioSampleRate);
2021-12-07 02:13:23 +01:00
// Set the demodulator's input
selectedDemod->setInput(ifChain.getOutput());
// Set AF chain's input
afChain.setInput(selectedDemod->getOutput());
2021-12-03 19:46:09 +01:00
// Load config
bandwidth = selectedDemod->getDefaultBandwidth();
2021-12-04 04:49:51 +01:00
minBandwidth = selectedDemod->getMinBandwidth();
maxBandwidth = selectedDemod->getMaxBandwidth();
bandwidthLocked = selectedDemod->getBandwidthLocked();
2021-12-03 19:46:09 +01:00
snapInterval = selectedDemod->getDefaultSnapInterval();
squelchLevel = MIN_SQUELCH;
2021-12-04 17:46:48 +01:00
deempAllowed = selectedDemod->getDeempAllowed();
2021-12-04 04:49:51 +01:00
deempMode = DEEMP_MODE_NONE;
squelchEnabled = false;
2021-12-07 02:13:23 +01:00
postProcEnabled = selectedDemod->getPostProcEnabled();
2021-12-03 19:46:09 +01:00
if (config.conf[name][selectedDemod->getName()].contains("snapInterval")) {
bandwidth = config.conf[name][selectedDemod->getName()]["bandwidth"];
bandwidth = std::clamp<double>(bandwidth, minBandwidth, maxBandwidth);
}
if (config.conf[name][selectedDemod->getName()].contains("snapInterval")) {
snapInterval = config.conf[name][selectedDemod->getName()]["snapInterval"];
}
if (config.conf[name][selectedDemod->getName()].contains("squelchLevel")) {
squelchLevel = config.conf[name][selectedDemod->getName()]["squelchLevel"];
}
2021-12-04 04:49:51 +01:00
if (config.conf[name][selectedDemod->getName()].contains("squelchEnabled")) {
squelchEnabled = config.conf[name][selectedDemod->getName()]["squelchEnabled"];
}
if (config.conf[name][selectedDemod->getName()].contains("deempMode")) {
deempMode = config.conf[name][selectedDemod->getName()]["deempMode"];
}
deempMode = std::clamp<int>(deempMode, 0, _DEEMP_MODE_COUNT-1);
2021-12-03 19:46:09 +01:00
// Configure VFO
if (vfo) {
2021-12-04 17:46:48 +01:00
vfo->setBandwidthLimits(minBandwidth, maxBandwidth, selectedDemod->getBandwidthLocked());
2021-12-03 19:46:09 +01:00
vfo->setReference(selectedDemod->getVFOReference());
vfo->setSnapInterval(snapInterval);
vfo->setSampleRate(selectedDemod->getIFSampleRate(), bandwidth);
}
2021-12-07 02:13:23 +01:00
// Configure IF chain
squelch.block.setLevel(squelchLevel);
2021-12-04 04:49:51 +01:00
setSquelchEnabled(squelchEnabled);
2021-12-03 19:46:09 +01:00
2021-12-07 02:13:23 +01:00
// Configure AF chain
2021-12-04 17:46:48 +01:00
if (postProcEnabled) {
// Configure resampler
2021-12-07 02:13:23 +01:00
afChain.stop();
resamp.block.setInSampleRate(selectedDemod->getAFSampleRate());
2021-12-04 17:46:48 +01:00
setAudioSampleRate(audioSampleRate);
2021-12-07 02:13:23 +01:00
afChain.enable(&resamp);
2021-12-04 17:46:48 +01:00
// Configure deemphasis
2021-12-07 02:13:23 +01:00
setDeemphasisMode(deempMode);
}
else {
// Disable everyting if post processing is disabled
afChain.disableAll();
2021-12-04 04:49:51 +01:00
}
2021-12-03 19:46:09 +01:00
// Start new demodulator
selectedDemod->start();
}
2021-12-04 17:46:48 +01:00
2021-12-03 19:46:09 +01:00
void setBandwidth(double bw) {
bandwidth = bw;
if (!selectedDemod) { return; }
2021-12-04 04:49:51 +01:00
float audioBW = std::min<float>(selectedDemod->getMaxAFBandwidth(), selectedDemod->getAFBandwidth(bandwidth));
2021-12-04 17:46:48 +01:00
audioBW = std::min<float>(audioBW, audioSampleRate / 2.0);
2021-12-04 04:49:51 +01:00
vfo->setBandwidth(bandwidth);
2021-12-03 19:46:09 +01:00
selectedDemod->setBandwidth(bandwidth);
2021-12-07 02:13:23 +01:00
// Only bother with setting the resampling setting if we're actually post processing and dynamic bw is enabled
2021-12-04 17:46:48 +01:00
if (selectedDemod->getDynamicAFBandwidth() && postProcEnabled) {
2021-12-04 04:49:51 +01:00
win.setCutoff(audioBW);
win.setTransWidth(audioBW);
2021-12-07 02:13:23 +01:00
resamp.block.updateWindow(&win);
2021-12-04 04:49:51 +01:00
}
2021-12-07 02:13:23 +01:00
2021-12-03 19:46:09 +01:00
config.acquire();
config.conf[name][selectedDemod->getName()]["bandwidth"] = bandwidth;
config.release(true);
}
void setAudioSampleRate(double sr) {
audioSampleRate = sr;
if (!selectedDemod) { return; }
2021-12-04 17:46:48 +01:00
selectedDemod->AFSampRateChanged(audioSampleRate);
if (!postProcEnabled) {
2021-12-07 02:13:23 +01:00
// If postproc is disabled, IF SR = AF SR
2021-12-04 17:46:48 +01:00
minBandwidth = selectedDemod->getMinBandwidth();
maxBandwidth = selectedDemod->getMaxBandwidth();
bandwidth = selectedDemod->getIFSampleRate();
vfo->setBandwidthLimits(minBandwidth, maxBandwidth, selectedDemod->getBandwidthLocked());
vfo->setSampleRate(selectedDemod->getIFSampleRate(), bandwidth);
return;
}
2021-12-04 04:49:51 +01:00
float audioBW = std::min<float>(selectedDemod->getMaxAFBandwidth(), selectedDemod->getAFBandwidth(bandwidth));
2021-12-04 17:46:48 +01:00
audioBW = std::min<float>(audioBW, audioSampleRate / 2.0);
2021-12-07 02:13:23 +01:00
afChain.stop();
// Configure resampler
resamp.block.setOutSampleRate(audioSampleRate);
win.setSampleRate(selectedDemod->getAFSampleRate() * resamp.block.getInterpolation());
2021-12-03 19:46:09 +01:00
win.setCutoff(audioBW);
win.setTransWidth(audioBW);
2021-12-07 02:13:23 +01:00
resamp.block.updateWindow(&win);
2021-12-04 04:49:51 +01:00
2021-12-07 02:13:23 +01:00
// Configure deemphasis sample rate
deemp.block.setSampleRate(audioSampleRate);
afChain.start();
2021-12-04 17:46:48 +01:00
}
2021-12-04 04:49:51 +01:00
void setDeemphasisMode(int mode) {
deempMode = mode;
2021-12-04 17:46:48 +01:00
if (!postProcEnabled) { return; }
2021-12-07 02:13:23 +01:00
bool deempEnabled = (deempMode != DEEMP_MODE_NONE);
if (deempEnabled) {
deemp.block.setTau(DeemphasisModes[deempMode]);
2021-12-04 04:49:51 +01:00
}
2021-12-07 02:13:23 +01:00
afChain.setState(&deemp, deempEnabled);
2021-12-04 04:49:51 +01:00
}
void setSquelchEnabled(bool enable) {
squelchEnabled = enable;
if (!selectedDemod) { return; }
2021-12-07 02:13:23 +01:00
ifChain.setState(&squelch, squelchEnabled);
2021-12-03 19:46:09 +01:00
}
static void vfoUserChangedBandwidthHandler(double newBw, void* ctx) {
2021-12-04 19:59:30 +01:00
NewRadioModule* _this = (NewRadioModule*)ctx;
2021-12-03 19:46:09 +01:00
_this->setBandwidth(newBw);
}
static void sampleRateChangeHandler(float sampleRate, void* ctx) {
2021-12-04 19:59:30 +01:00
NewRadioModule* _this = (NewRadioModule*)ctx;
2021-12-03 19:46:09 +01:00
_this->setAudioSampleRate(sampleRate);
}
2021-12-04 04:49:51 +01:00
static void demodOutputChangeHandler(dsp::stream<dsp::stereo_t>* output, void* ctx) {
2021-12-04 19:59:30 +01:00
NewRadioModule* _this = (NewRadioModule*)ctx;
2021-12-07 02:13:23 +01:00
_this->afChain.setInput(output);
}
static void ifChainOutputChangeHandler(dsp::stream<dsp::complex_t>* output, void* ctx) {
NewRadioModule* _this = (NewRadioModule*)ctx;
if (!_this->selectedDemod) { return; }
_this->selectedDemod->setInput(output);
}
static void afChainOutputChangeHandler(dsp::stream<dsp::stereo_t>* output, void* ctx) {
NewRadioModule* _this = (NewRadioModule*)ctx;
_this->stream.setInput(output);
2021-12-04 04:49:51 +01:00
}
2021-12-03 19:46:09 +01:00
2021-12-07 02:13:23 +01:00
// Handlers
2021-12-03 19:46:09 +01:00
EventHandler<double> onUserChangedBandwidthHandler;
2021-12-07 02:13:23 +01:00
EventHandler<float> srChangeHandler;
EventHandler<dsp::stream<dsp::complex_t>*> ifChainOutputChanged;
EventHandler<dsp::stream<dsp::stereo_t>*> afChainOutputChanged;
VFOManager::VFO* vfo = NULL;
2021-12-03 19:46:09 +01:00
2021-12-07 02:13:23 +01:00
// IF chain
dsp::Chain<dsp::complex_t> ifChain;
dsp::ChainLink<dsp::Squelch, dsp::complex_t> squelch;
// Audio chain
dsp::stream<dsp::stereo_t> dummyAudioStream;
dsp::Chain<dsp::stereo_t> afChain;
2021-12-03 19:46:09 +01:00
dsp::filter_window::BlackmanWindow win;
2021-12-07 02:13:23 +01:00
dsp::ChainLink<dsp::PolyphaseResampler<dsp::stereo_t>, dsp::stereo_t> resamp;
dsp::ChainLink<dsp::BFMDeemp, dsp::stereo_t> deemp;
2021-12-03 19:46:09 +01:00
SinkManager::Stream stream;
std::array<demod::Demodulator*, _RADIO_DEMOD_COUNT> demods;
demod::Demodulator* selectedDemod = NULL;
double audioSampleRate = 48000.0;
2021-12-04 04:49:51 +01:00
float minBandwidth;
float maxBandwidth;
float bandwidth;
bool bandwidthLocked;
int snapInterval;
bool squelchEnabled = false;
2021-12-03 19:46:09 +01:00
float squelchLevel;
int selectedDemodID = 1;
2021-12-04 04:49:51 +01:00
int deempMode = DEEMP_MODE_NONE;
bool deempAllowed;
2021-12-04 17:46:48 +01:00
bool postProcEnabled;
2021-12-03 19:46:09 +01:00
const double MIN_SQUELCH = -100.0;
const double MAX_SQUELCH = 0.0;
bool enabled = true;
};