mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
PlutoSDR: print error string from libiio in console message
This commit is contained in:
parent
49db1b2273
commit
ca48070c84
@ -150,6 +150,7 @@ void DevicePlutoSDRBox::set_params(DeviceType devType,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
std::string item;
|
std::string item;
|
||||||
|
char errstr[256];
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
@ -166,7 +167,8 @@ void DevicePlutoSDRBox::set_params(DeviceType devType,
|
|||||||
item = "unknown";
|
item = "unknown";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
std::cerr << "DevicePlutoSDRBox::set_params: Unable to write " << item << " attribute " << key << "=" << val << ": " << ret << std::endl;
|
iio_strerror(-ret, errstr, 255);
|
||||||
|
std::cerr << "DevicePlutoSDRBox::set_params: Unable to write " << item << " attribute " << key << "=" << val << ": " << errstr << " (" << ret << ") " << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user