Skip to content

Commit

Permalink
Merge pull request #22 from SDRplay/device_string_args
Browse files Browse the repository at this point in the history
Device string args
  • Loading branch information
fventuri authored Dec 25, 2020
2 parents 077cd98 + e07fe25 commit e315129
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@ SoapySDRPlay::SoapySDRPlay(const SoapySDR::Kwargs &args)
chParams->rspDuoTunerParams.rfDabNotchEnable = 0;
}

// process additional device string arguments
for (std::pair<std::string, std::string> arg : args) {
// ignore 'driver', 'label', and 'soapy'
if (arg.first == "driver" || arg.first == "label" || arg.first == "soapy") {
continue;
}
writeSetting(arg.first, arg.second);
}

_streams[0] = 0;
_streams[1] = 0;
useShort = true;
Expand Down Expand Up @@ -479,9 +488,12 @@ void SoapySDRPlay::setAntenna(const int direction, const size_t channel, const s
}
else
{
// preserve biasT setting when changing tuner/antenna
unsigned char biasTen = chParams->rspDuoTunerParams.biasTEnable;
releaseDevice();
device.tuner = device.tuner == sdrplay_api_Tuner_A ? sdrplay_api_Tuner_B : sdrplay_api_Tuner_A;
selectDevice();
chParams->rspDuoTunerParams.biasTEnable = biasTen;
}
}
}
Expand Down

0 comments on commit e315129

Please sign in to comment.