Skip to content

Commit

Permalink
Only set info name if available
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckschwerdt committed Mar 18, 2019
1 parent a49bf3b commit 69f5287
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PlutoSDR_Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,9 @@ SoapySDR::ArgInfo SoapyPlutoSDR::getSensorInfo(const std::string &key) const
iio_channel *chn = iio_device_find_channel(dev, channelStr.c_str(), false);
//if (!chn) ...

const char *name = iio_channel_get_name(chn);
info.key = key;
info.name = iio_channel_get_name(chn);
if (name) info.name = name;
info.type = SoapySDR::ArgInfo::FLOAT;
info.value = "0.0";
info.units = id_to_unit(channelStr.c_str());
Expand Down

0 comments on commit 69f5287

Please sign in to comment.