diff --git a/grc/gen_bladerf_blocks.py b/grc/gen_bladerf_blocks.py index e9f59572087145a7945b43243eb170741160bc38..f2cdb8c6db6c9086b1429337caab45ccbc470021 100644 --- a/grc/gen_bladerf_blocks.py +++ b/grc/gen_bladerf_blocks.py @@ -149,6 +149,13 @@ parameters: option_labels: ['Disabled', 'Bypassed'] hide: part +- id: smb + label: 'SMB frequency' + category: x40/x115 + dtype: real + default: 0 + hide: part + - id: dc_calibration label: 'DC calibration' category: x40/x115 @@ -215,6 +222,7 @@ templates: + ",tamer=" + '${'$'}{tamer}' + ",sampling=" + '${'$'}{sampling}' + ",lpf_mode="+'${'$'}{lpf_mode}' + + ",smb="+str(int(${'$'}{smb})) + ",dc_calibration="+'${'$'}{dc_calibration}' + ",trigger0="+'${'$'}{trigger0}' + ",trigger_role0="+'${'$'}{trigger_role0}' diff --git a/lib/bladerf/bladerf_common.cc b/lib/bladerf/bladerf_common.cc index cfad5ee1fbe1043efba5f5297ccd5de911dbc8ac..42c2c220ea435a22c8627c770d9a04a88cf6b2f5 100644 --- a/lib/bladerf/bladerf_common.cc +++ b/lib/bladerf/bladerf_common.cc @@ -362,11 +362,7 @@ void bladerf_common::init(dict_t const &dict, bladerf_direction direction) - if (dict.count("smb")) { - set_smb_frequency(boost::lexical_cast<double>(_get(dict, "smb"))); - BLADERF_INFO(boost::str(boost::format("SMB frequency set to %f Hz") - % get_smb_frequency())); - } + /* Initialize buffer and sample configuration */ if (dict.count("buffers")) { @@ -462,6 +458,13 @@ void bladerf_common::init_bladerf1(const dict_t &dict, bladerf_direction directi ? BLADERF_LPF_BYPASSED : BLADERF_LPF_DISABLED; set_lpf_mode(ch, mode); } + if (dict.count("smb")) { + set_smb_frequency(boost::lexical_cast<double>(_get(dict, "smb"))); + BLADERF_INFO(boost::str(boost::format("SMB frequency set to %f Hz") + % get_smb_frequency())); + } + + }