mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-10 04:37:37 +01:00
Fix AGC for SDRplay
This commit is contained in:
parent
a91ed266d5
commit
f119af5e6f
@ -82,37 +82,4 @@ void ConfigManager::autoSaveWorker(ConfigManager* _this) {
|
|||||||
_this->mtx.unlock();
|
_this->mtx.unlock();
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// void ConfigManager::setResourceDir(std::string path) {
|
|
||||||
// if (!std::filesystem::exists(path)) {
|
|
||||||
// spdlog::error("Resource directory '{0}' does not exist", path);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// if (!std::filesystem::is_regular_file(path)) {
|
|
||||||
// spdlog::error("Resource directory '{0}' is not a directory", path);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// resDir = path;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// std::string ConfigManager::getResourceDir() {
|
|
||||||
// return resDir;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void ConfigManager::setConfigDir(std::string path) {
|
|
||||||
// if (!std::filesystem::exists(path)) {
|
|
||||||
// spdlog::error("Resource directory '{0}' does not exist", path);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// if (!std::filesystem::is_regular_file(path)) {
|
|
||||||
// spdlog::error("Resource directory '{0}' is not a directory", path);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// resDir = path;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// std::string ConfigManager::getConfigDir() {
|
|
||||||
// return configDir;
|
|
||||||
// }
|
|
||||||
|
|
@ -25,6 +25,7 @@ namespace sdrpp_credits {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const char* patrons[] = {
|
const char* patrons[] = {
|
||||||
|
"Croccydile",
|
||||||
"Daniele D'Agnelli",
|
"Daniele D'Agnelli",
|
||||||
"W4IPA",
|
"W4IPA",
|
||||||
"Lee Donaghy",
|
"Lee Donaghy",
|
||||||
|
@ -219,6 +219,7 @@ I will soon publish a contributing.md listing the code style to use.
|
|||||||
|
|
||||||
## Patrons
|
## Patrons
|
||||||
|
|
||||||
|
* [Croccydile](https://example.com/)
|
||||||
* [Daniele D'Agnelli](https://linkedin.com/in/dagnelli)
|
* [Daniele D'Agnelli](https://linkedin.com/in/dagnelli)
|
||||||
* [W4IPA](https://twitter.com/W4IPAstroke5)
|
* [W4IPA](https://twitter.com/W4IPAstroke5)
|
||||||
* [Lee Donaghy](https://github.com/github)
|
* [Lee Donaghy](https://github.com/github)
|
||||||
|
@ -514,7 +514,16 @@ private:
|
|||||||
_this->openDevParams->rxChannelA->tunerParams.rfFreq.rfHz = _this->freq;
|
_this->openDevParams->rxChannelA->tunerParams.rfFreq.rfHz = _this->freq;
|
||||||
_this->openDevParams->rxChannelA->tunerParams.gain.gRdB = _this->gain;
|
_this->openDevParams->rxChannelA->tunerParams.gain.gRdB = _this->gain;
|
||||||
_this->openDevParams->rxChannelA->tunerParams.gain.LNAstate = _this->lnaGain;
|
_this->openDevParams->rxChannelA->tunerParams.gain.LNAstate = _this->lnaGain;
|
||||||
|
|
||||||
|
|
||||||
|
// Hard coded AGC parameters
|
||||||
|
_this->openDevParams->rxChannelA->ctrlParams.agc.attack_ms = 500;
|
||||||
|
_this->openDevParams->rxChannelA->ctrlParams.agc.decay_ms = 500;
|
||||||
|
_this->openDevParams->rxChannelA->ctrlParams.agc.decay_delay_ms = 200;
|
||||||
|
_this->openDevParams->rxChannelA->ctrlParams.agc.decay_threshold_dB = 5;
|
||||||
|
_this->openDevParams->rxChannelA->ctrlParams.agc.setPoint_dBfs = -30;
|
||||||
_this->openDevParams->rxChannelA->ctrlParams.agc.enable = agcModes[_this->agc];
|
_this->openDevParams->rxChannelA->ctrlParams.agc.enable = agcModes[_this->agc];
|
||||||
|
|
||||||
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Dev_Fs, sdrplay_api_Update_Ext1_None);
|
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Dev_Fs, sdrplay_api_Update_Ext1_None);
|
||||||
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Tuner_BwType, sdrplay_api_Update_Ext1_None);
|
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Tuner_BwType, sdrplay_api_Update_Ext1_None);
|
||||||
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Tuner_Frf, sdrplay_api_Update_Ext1_None);
|
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Tuner_Frf, sdrplay_api_Update_Ext1_None);
|
||||||
|
Loading…
Reference in New Issue
Block a user