mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-07-09 10:35:21 +02:00
Formatted the entire codebase and added a CI check for formatting
This commit is contained in:
@ -14,12 +14,12 @@
|
||||
|
||||
ConfigManager config;
|
||||
|
||||
#define CONCAT(a, b) ((std::string(a) + b).c_str())
|
||||
#define CONCAT(a, b) ((std::string(a) + b).c_str())
|
||||
|
||||
std::map<DeemphasisMode, double> deempTaus = {
|
||||
{DEEMP_MODE_22US, 22e-6},
|
||||
{DEEMP_MODE_50US, 50e-6},
|
||||
{DEEMP_MODE_75US, 75e-6}
|
||||
{ DEEMP_MODE_22US, 22e-6 },
|
||||
{ DEEMP_MODE_50US, 50e-6 },
|
||||
{ DEEMP_MODE_75US, 75e-6 }
|
||||
};
|
||||
|
||||
class RadioModule : public ModuleManager::Instance {
|
||||
@ -91,11 +91,11 @@ public:
|
||||
config.conf[name][demod->getName()]["squelchEnabled"] = false;
|
||||
}
|
||||
bw = std::clamp<double>(bw, demod->getMinBandwidth(), demod->getMaxBandwidth());
|
||||
|
||||
|
||||
// Initialize
|
||||
demod->init(name, &config, ifChain.getOutput(), bw, _demodOutputChangeHandler, stream.getSampleRate());
|
||||
}
|
||||
|
||||
|
||||
// Initialize audio DSP chain
|
||||
afChainOutputChanged.ctx = this;
|
||||
afChainOutputChanged.handler = afChainOutputChangeHandler;
|
||||
@ -194,7 +194,7 @@ private:
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Columns(4, CONCAT("RadioModeColumns##_", _this->name), false);
|
||||
if (ImGui::RadioButton(CONCAT("NFM##_", _this->name), _this->selectedDemodID == 0) && _this->selectedDemodID != 0) {
|
||||
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) {
|
||||
@ -204,7 +204,7 @@ private:
|
||||
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) {
|
||||
if (ImGui::RadioButton(CONCAT("DSB##_", _this->name), _this->selectedDemodID == 3) && _this->selectedDemodID != 3) {
|
||||
_this->selectDemodByID(RADIO_DEMOD_DSB);
|
||||
}
|
||||
ImGui::NextColumn();
|
||||
@ -279,7 +279,7 @@ private:
|
||||
}
|
||||
if (!_this->nbEnabled && _this->enabled) { style::endDisabled(); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
// // Notch filter
|
||||
// if (ImGui::Checkbox("Notch##_radio_notch_ena_", &_this->notchEnabled)) {
|
||||
@ -484,7 +484,7 @@ private:
|
||||
|
||||
// Configure deemphasis sample rate
|
||||
deemp.block.setSampleRate(audioSampleRate);
|
||||
|
||||
|
||||
afChain.start();
|
||||
}
|
||||
|
||||
@ -626,7 +626,7 @@ private:
|
||||
// Success
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Handlers
|
||||
EventHandler<double> onUserChangedBandwidthHandler;
|
||||
EventHandler<float> srChangeHandler;
|
||||
@ -686,5 +686,4 @@ private:
|
||||
const double MAX_SQUELCH = 0.0;
|
||||
|
||||
bool enabled = true;
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user