soapylms - fix writeSettings falls through if/else
The last for loop should be under an else statement,
otherwise matching keys will get passed to writeSetting
for each rx channel, and then will throw at std::stoi
@@ -759,16 +759,20 @@ void SoapyLMS7::writeSetting(const std::string &key, const std::string &value)
{
lms7Device->SaveConfig(value.c_str());
}
+
else if (key == "LOAD_CONFIG")
{
lms7Device->LoadConfig(value.c_str());
}
+ else
+ {
for (size_t channel = 0; channel < lms7Device->GetNumChannels(); channel++)
{
this->writeSetting(SOAPY_SDR_RX, channel, key, value);
}
}
+}
SoapySDR::ArgInfoList SoapyLMS7::getSettingInfo(const int direction, const size_t channel) const
{
