Skip to content

Commit

Permalink
Merge pull request #72 from pothosware/add_writeSetting_to_constructor
Browse files Browse the repository at this point in the history
Allow extra arguments in the device string to change settings
  • Loading branch information
fventuri authored Nov 21, 2021
2 parents 8c4e330 + 092fe75 commit 4bf80bc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ SoapySDRPlay::SoapySDRPlay(const SoapySDR::Kwargs &args)
notchEn = 0;
dabNotchEn = 0;

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

bufferedElems = 0;
_currentBuff = 0;
resetBuffer = false;
Expand Down

0 comments on commit 4bf80bc

Please sign in to comment.