diff --git a/grc/gen_bladerf_blocks.py b/grc/gen_bladerf_blocks.py index 9fba633c3d86d9877c9774bebe55b3ad2b9496c7..ccef8f731d55f7e69a740d0f9054b99f09815425 100644 --- a/grc/gen_bladerf_blocks.py +++ b/grc/gen_bladerf_blocks.py @@ -175,7 +175,7 @@ templates: + ",fpga=" + str(${'$'}{fpga_image}) + ",fpga-reload=" + '${'$'}{fpga_reload}' + ",power_monitoring=" + '${'$'}{power_monitoring}' - + ",ref_clk=" + str(${'$'}{ref_clk}) + + ",ref_clk=" + str(int(${'$'}{ref_clk})) + ",in_clk=" + '${'$'}{in_clk}' + ",out_clk=" + str(${'$'}{out_clk}) + ",dac=" + str(${'$'}{dac}) diff --git a/lib/bladerf/bladerf_common.cc b/lib/bladerf/bladerf_common.cc index 48882bed63e7b82d574edfe8d46c95ae58e08577..d3f781ce7f54d09785dcf8fa1501449a60181de3 100644 --- a/lib/bladerf/bladerf_common.cc +++ b/lib/bladerf/bladerf_common.cc @@ -259,6 +259,12 @@ void bladerf_common::init(dict_t const &dict, bladerf_direction direction) { init_refclk(freq); } + else + { + if (dict.count("dac")) { + init_dac(boost::lexical_cast<uint16_t>(_get(dict, "dac"))); + } + } } if (dict.count("in_clk")) { @@ -269,9 +275,7 @@ void bladerf_common::init(dict_t const &dict, bladerf_direction direction) init_output_clock(_get(dict, "out_clk") == "True"); } - if (dict.count("dac")) { - init_dac(boost::lexical_cast<uint16_t>(_get(dict, "dac"))); - } + /* Show some info about the device we've opened */