@@ -78,6 +78,8 @@ const char* ifModeTxt =
78
78
79
79
const char * rspduo_antennaPortsTxt = " Tuner 1 (50Ohm)\0 Tuner 1 (Hi-Z)\0 Tuner 2 (50Ohm)\0 " ;
80
80
81
+ #define MAX_DEV_COUNT 16
82
+
81
83
class SDRPlaySourceModule : public ModuleManager ::Instance {
82
84
public:
83
85
SDRPlaySourceModule (std::string name) {
@@ -146,9 +148,9 @@ class SDRPlaySourceModule : public ModuleManager::Instance {
146
148
devNameList.clear ();
147
149
devListTxt = " " ;
148
150
149
- sdrplay_api_DeviceT devArr[128 ];
151
+ sdrplay_api_DeviceT devArr[MAX_DEV_COUNT ];
150
152
unsigned int numDev = 0 ;
151
- sdrplay_api_GetDevices (devArr, &numDev, 128 );
153
+ sdrplay_api_GetDevices (devArr, &numDev, MAX_DEV_COUNT );
152
154
153
155
for (unsigned int i = 0 ; i < numDev; i++) {
154
156
devList.push_back (devArr[i]);
@@ -532,7 +534,7 @@ class SDRPlaySourceModule : public ModuleManager::Instance {
532
534
_this->bufferSize = (float )_this->sampleRate / 200 .0f ;
533
535
534
536
// RSP1A Options
535
- if (_this->openDev .hwVer == SDRPLAY_RSP1A_ID) {
537
+ if (_this->openDev .hwVer == SDRPLAY_RSP1A_ID || _this-> openDev . hwVer == SDRPLAY_RSP1B_ID ) {
536
538
_this->openDevParams ->devParams ->rsp1aParams .rfNotchEnable = _this->rsp1a_fmmwNotch ;
537
539
_this->openDevParams ->devParams ->rsp1aParams .rfDabNotchEnable = _this->rsp1a_dabNotch ;
538
540
_this->channelParams ->rsp1aTunerParams .biasTEnable = _this->rsp1a_biasT ;
@@ -562,7 +564,7 @@ class SDRPlaySourceModule : public ModuleManager::Instance {
562
564
sdrplay_api_Update (_this->openDev .dev , _this->openDev .tuner , sdrplay_api_Update_RspDuo_RfDabNotchControl, sdrplay_api_Update_Ext1_None);
563
565
sdrplay_api_Update (_this->openDev .dev , _this->openDev .tuner , sdrplay_api_Update_RspDuo_Tuner1AmNotchControl, sdrplay_api_Update_Ext1_None);
564
566
}
565
- else if (_this->openDev .hwVer == SDRPLAY_RSPdx_ID) {
567
+ else if (_this->openDev .hwVer == SDRPLAY_RSPdx_ID || _this-> openDev . hwVer == SDRPLAY_RSPdxR2_ID ) {
566
568
_this->openDevParams ->devParams ->rspDxParams .rfNotchEnable = _this->rspdx_fmmwNotch ;
567
569
_this->openDevParams ->devParams ->rspDxParams .rfDabNotchEnable = _this->rspdx_dabNotch ;
568
570
_this->openDevParams ->devParams ->rspDxParams .biasTEnable = _this->rspdx_biasT ;
0 commit comments