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).
This commit is contained in:
Jon Szymaniak 2014-05-05 19:30:38 -04:00 committed by Dimitri Stolnikov
parent 16c32a9fe0
commit 00b579532c
1 changed files with 3 additions and 3 deletions

View File

@ -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;