mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-07-08 18:15:21 +02:00
Formatted the entire codebase and added a CI check for formatting
This commit is contained in:
@ -7,7 +7,7 @@ namespace demod {
|
||||
class AM : public Demodulator {
|
||||
public:
|
||||
AM() {}
|
||||
|
||||
|
||||
AM(std::string name, ConfigManager* config, dsp::stream<dsp::complex_t>* input, double bandwidth, EventHandler<dsp::stream<dsp::stereo_t>*> outputChangeHandler, double audioSR) {
|
||||
init(name, config, input, bandwidth, outputChangeHandler, audioSR);
|
||||
}
|
||||
@ -52,23 +52,23 @@ namespace demod {
|
||||
|
||||
// ============= INFO =============
|
||||
|
||||
const char* getName() { return "AM"; }
|
||||
double getIFSampleRate() { return 15000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 10000.0; }
|
||||
double getMinBandwidth() { return 1000.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate(); }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 1000.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
const char* getName() { return "AM"; }
|
||||
double getIFSampleRate() { return 15000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 10000.0; }
|
||||
double getMinBandwidth() { return 1000.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate(); }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 1000.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
double getAFBandwidth(double bandwidth) { return bandwidth / 2.0; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return false; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return false; }
|
||||
dsp::stream<dsp::stereo_t>* getOutput() { return &m2s.out; }
|
||||
|
||||
private:
|
||||
|
@ -7,7 +7,7 @@ namespace demod {
|
||||
class CW : public Demodulator {
|
||||
public:
|
||||
CW() {}
|
||||
|
||||
|
||||
CW(std::string name, ConfigManager* config, dsp::stream<dsp::complex_t>* input, double bandwidth, EventHandler<dsp::stream<dsp::stereo_t>*> outputChangeHandler, double audioSR) {
|
||||
init(name, config, input, bandwidth, outputChangeHandler, audioSR);
|
||||
}
|
||||
@ -53,23 +53,23 @@ namespace demod {
|
||||
|
||||
// ============= INFO =============
|
||||
|
||||
const char* getName() { return "CW"; }
|
||||
double getIFSampleRate() { return 3000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 500.0; }
|
||||
double getMinBandwidth() { return 50.0; }
|
||||
double getMaxBandwidth() { return 500.0; }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 10.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
const char* getName() { return "CW"; }
|
||||
double getIFSampleRate() { return 3000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 500.0; }
|
||||
double getMinBandwidth() { return 50.0; }
|
||||
double getMaxBandwidth() { return 500.0; }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 10.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
double getAFBandwidth(double bandwidth) { return (bandwidth / 2.0) + 1000.0; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return false; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return false; }
|
||||
dsp::stream<dsp::stereo_t>* getOutput() { return &m2s.out; }
|
||||
|
||||
private:
|
||||
|
@ -7,7 +7,7 @@ namespace demod {
|
||||
class DSB : public Demodulator {
|
||||
public:
|
||||
DSB() {}
|
||||
|
||||
|
||||
DSB(std::string name, ConfigManager* config, dsp::stream<dsp::complex_t>* input, double bandwidth, EventHandler<dsp::stream<dsp::stereo_t>*> outputChangeHandler, double audioSR) {
|
||||
init(name, config, input, bandwidth, outputChangeHandler, audioSR);
|
||||
}
|
||||
@ -54,23 +54,23 @@ namespace demod {
|
||||
|
||||
// ============= INFO =============
|
||||
|
||||
const char* getName() { return "DSB"; }
|
||||
double getIFSampleRate() { return 24000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 4600.0; }
|
||||
double getMinBandwidth() { return 1000.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 100.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
const char* getName() { return "DSB"; }
|
||||
double getIFSampleRate() { return 24000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 4600.0; }
|
||||
double getMinBandwidth() { return 1000.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 100.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
double getAFBandwidth(double bandwidth) { return bandwidth / 2.0; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return true; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return true; }
|
||||
dsp::stream<dsp::stereo_t>* getOutput() { return &m2s.out; }
|
||||
|
||||
private:
|
||||
|
@ -7,7 +7,7 @@ namespace demod {
|
||||
class LSB : public Demodulator {
|
||||
public:
|
||||
LSB() {}
|
||||
|
||||
|
||||
LSB(std::string name, ConfigManager* config, dsp::stream<dsp::complex_t>* input, double bandwidth, EventHandler<dsp::stream<dsp::stereo_t>*> outputChangeHandler, double audioSR) {
|
||||
init(name, config, input, bandwidth, outputChangeHandler, audioSR);
|
||||
}
|
||||
@ -54,23 +54,23 @@ namespace demod {
|
||||
|
||||
// ============= INFO =============
|
||||
|
||||
const char* getName() { return "LSB"; }
|
||||
double getIFSampleRate() { return 24000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 2800.0; }
|
||||
double getMinBandwidth() { return 500.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 100.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_UPPER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
const char* getName() { return "LSB"; }
|
||||
double getIFSampleRate() { return 24000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 2800.0; }
|
||||
double getMinBandwidth() { return 500.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 100.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_UPPER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
double getAFBandwidth(double bandwidth) { return bandwidth; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return true; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return true; }
|
||||
dsp::stream<dsp::stereo_t>* getOutput() { return &m2s.out; }
|
||||
|
||||
private:
|
||||
|
@ -7,7 +7,7 @@ namespace demod {
|
||||
class NFM : public Demodulator {
|
||||
public:
|
||||
NFM() {}
|
||||
|
||||
|
||||
NFM(std::string name, ConfigManager* config, dsp::stream<dsp::complex_t>* input, double bandwidth, EventHandler<dsp::stream<dsp::stereo_t>*> outputChangeHandler, double audioSR) {
|
||||
init(name, config, input, bandwidth, outputChangeHandler, audioSR);
|
||||
}
|
||||
@ -46,23 +46,23 @@ namespace demod {
|
||||
|
||||
// ============= INFO =============
|
||||
|
||||
const char* getName() { return "FM"; }
|
||||
double getIFSampleRate() { return 50000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 12500.0; }
|
||||
double getMinBandwidth() { return 1000.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate(); }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 2500.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return true; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
const char* getName() { return "FM"; }
|
||||
double getIFSampleRate() { return 50000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 12500.0; }
|
||||
double getMinBandwidth() { return 1000.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate(); }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 2500.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return true; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
double getAFBandwidth(double bandwidth) { return bandwidth / 2.0; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return true; }
|
||||
bool getNBAllowed() { return false; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return true; }
|
||||
bool getNBAllowed() { return false; }
|
||||
dsp::stream<dsp::stereo_t>* getOutput() { return &demod.out; }
|
||||
|
||||
private:
|
||||
|
@ -7,7 +7,7 @@ namespace demod {
|
||||
class RAW : public Demodulator {
|
||||
public:
|
||||
RAW() {}
|
||||
|
||||
|
||||
RAW(std::string name, ConfigManager* config, dsp::stream<dsp::complex_t>* input, double bandwidth, EventHandler<dsp::stream<dsp::stereo_t>*> outputChangeHandler, double audioSR) {
|
||||
init(name, config, input, bandwidth, outputChangeHandler, audioSR);
|
||||
}
|
||||
@ -47,23 +47,23 @@ namespace demod {
|
||||
|
||||
// ============= INFO =============
|
||||
|
||||
const char* getName() { return "RAW"; }
|
||||
double getIFSampleRate() { return audioSampleRate; }
|
||||
double getAFSampleRate() { return audioSampleRate; }
|
||||
double getDefaultBandwidth() { return audioSampleRate; }
|
||||
double getMinBandwidth() { return audioSampleRate; }
|
||||
double getMaxBandwidth() { return audioSampleRate; }
|
||||
bool getBandwidthLocked() { return true; }
|
||||
double getMaxAFBandwidth() { return audioSampleRate; }
|
||||
double getDefaultSnapInterval() { return 2500.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return false; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
const char* getName() { return "RAW"; }
|
||||
double getIFSampleRate() { return audioSampleRate; }
|
||||
double getAFSampleRate() { return audioSampleRate; }
|
||||
double getDefaultBandwidth() { return audioSampleRate; }
|
||||
double getMinBandwidth() { return audioSampleRate; }
|
||||
double getMaxBandwidth() { return audioSampleRate; }
|
||||
bool getBandwidthLocked() { return true; }
|
||||
double getMaxAFBandwidth() { return audioSampleRate; }
|
||||
double getDefaultSnapInterval() { return 2500.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return false; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
double getAFBandwidth(double bandwidth) { return bandwidth; }
|
||||
bool getDynamicAFBandwidth() { return false; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return true; }
|
||||
bool getDynamicAFBandwidth() { return false; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return true; }
|
||||
dsp::stream<dsp::stereo_t>* getOutput() { return &c2s.out; }
|
||||
|
||||
private:
|
||||
|
@ -7,7 +7,7 @@ namespace demod {
|
||||
class USB : public Demodulator {
|
||||
public:
|
||||
USB() {}
|
||||
|
||||
|
||||
USB(std::string name, ConfigManager* config, dsp::stream<dsp::complex_t>* input, double bandwidth, EventHandler<dsp::stream<dsp::stereo_t>*> outputChangeHandler, double audioSR) {
|
||||
init(name, config, input, bandwidth, outputChangeHandler, audioSR);
|
||||
}
|
||||
@ -54,23 +54,23 @@ namespace demod {
|
||||
|
||||
// ============= INFO =============
|
||||
|
||||
const char* getName() { return "USB"; }
|
||||
double getIFSampleRate() { return 24000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 2800.0; }
|
||||
double getMinBandwidth() { return 500.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 100.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_LOWER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
const char* getName() { return "USB"; }
|
||||
double getIFSampleRate() { return 24000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 2800.0; }
|
||||
double getMinBandwidth() { return 500.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return getIFSampleRate() / 2.0; }
|
||||
double getDefaultSnapInterval() { return 100.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_LOWER; }
|
||||
bool getDeempAllowed() { return false; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_NONE; }
|
||||
double getAFBandwidth(double bandwidth) { return bandwidth; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return true; }
|
||||
bool getDynamicAFBandwidth() { return true; }
|
||||
bool getFMIFNRAllowed() { return false; }
|
||||
bool getNBAllowed() { return true; }
|
||||
dsp::stream<dsp::stereo_t>* getOutput() { return &m2s.out; }
|
||||
|
||||
private:
|
||||
|
@ -7,7 +7,7 @@ namespace demod {
|
||||
class WFM : public Demodulator {
|
||||
public:
|
||||
WFM() {}
|
||||
|
||||
|
||||
WFM(std::string name, ConfigManager* config, dsp::stream<dsp::complex_t>* input, double bandwidth, EventHandler<dsp::stream<dsp::stereo_t>*> outputChangeHandler, double audioSR) {
|
||||
init(name, config, input, bandwidth, outputChangeHandler, audioSR);
|
||||
}
|
||||
@ -23,7 +23,7 @@ namespace demod {
|
||||
|
||||
// Load config
|
||||
_config->acquire();
|
||||
bool modified =false;
|
||||
bool modified = false;
|
||||
if (!config->conf[name].contains(getName())) {
|
||||
config->conf[name][getName()]["stereo"] = false;
|
||||
modified = true;
|
||||
@ -70,23 +70,23 @@ namespace demod {
|
||||
|
||||
// ============= INFO =============
|
||||
|
||||
const char* getName() { return "WFM"; }
|
||||
double getIFSampleRate() { return 250000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 150000.0; }
|
||||
double getMinBandwidth() { return 50000.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate(); }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return 16000.0; }
|
||||
double getDefaultSnapInterval() { return 100000.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return true; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_50US; }
|
||||
const char* getName() { return "WFM"; }
|
||||
double getIFSampleRate() { return 250000.0; }
|
||||
double getAFSampleRate() { return getIFSampleRate(); }
|
||||
double getDefaultBandwidth() { return 150000.0; }
|
||||
double getMinBandwidth() { return 50000.0; }
|
||||
double getMaxBandwidth() { return getIFSampleRate(); }
|
||||
bool getBandwidthLocked() { return false; }
|
||||
double getMaxAFBandwidth() { return 16000.0; }
|
||||
double getDefaultSnapInterval() { return 100000.0; }
|
||||
int getVFOReference() { return ImGui::WaterfallVFO::REF_CENTER; }
|
||||
bool getDeempAllowed() { return true; }
|
||||
bool getPostProcEnabled() { return true; }
|
||||
int getDefaultDeemphasisMode() { return DEEMP_MODE_50US; }
|
||||
double getAFBandwidth(double bandwidth) { return 16000.0; }
|
||||
bool getDynamicAFBandwidth() { return false; }
|
||||
bool getFMIFNRAllowed() { return true; }
|
||||
bool getNBAllowed() { return false; }
|
||||
bool getDynamicAFBandwidth() { return false; }
|
||||
bool getFMIFNRAllowed() { return true; }
|
||||
bool getNBAllowed() { return false; }
|
||||
dsp::stream<dsp::stereo_t>* getOutput() { return stereo ? demodStereo.out : &demod.out; }
|
||||
|
||||
// ============= DEDICATED FUNCTIONS =============
|
||||
@ -108,9 +108,9 @@ namespace demod {
|
||||
private:
|
||||
dsp::FMDemod demod;
|
||||
dsp::StereoFMDemod demodStereo;
|
||||
|
||||
|
||||
ConfigManager* _config = NULL;
|
||||
|
||||
|
||||
bool stereo = false;
|
||||
|
||||
std::string name;
|
||||
|
Reference in New Issue
Block a user