bladerf: Apply 'verbosity' parameter before performing other operations

Setting the libbladeRF verbosity level needs to be performed prior to
other operations. Otherwise, the desired diagnostic output will not
appear for startup operations (e.g., device opening, enabling loopback).
soapy_support
Jon Szymaniak 9 years ago committed by Dimitri Stolnikov
parent 16c32a9fe0
commit 00b579532c
  1. 6
      lib/bladerf/bladerf_common.cc

@ -230,6 +230,9 @@ void bladerf_common::init(dict_t &dict, bladerf_module module)
_pfx = std::string("[bladeRF ") + std::string(type) + std::string("] ");
if ( dict.count("verbosity") )
set_verbosity( dict["verbosity"] );
if (dict.count("bladerf"))
{
std::string value = dict["bladerf"];
@ -289,9 +292,6 @@ void bladerf_common::init(dict_t &dict, bladerf_module module)
else
set_loopback_mode( "none" );
if ( dict.count("verbosity") )
set_verbosity( dict["verbosity"] );
/* Show some info about the device we've opened */
std::cerr << _pfx << "Using nuand LLC bladeRF #" << device_number;

Loading…
Cancel
Save