aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/rfnoc/ddc_block_control.cpp3
-rw-r--r--host/lib/rfnoc/duc_block_control.cpp7
2 files changed, 4 insertions, 6 deletions
diff --git a/host/lib/rfnoc/ddc_block_control.cpp b/host/lib/rfnoc/ddc_block_control.cpp
index 3326d4e46..dbcb1b763 100644
--- a/host/lib/rfnoc/ddc_block_control.cpp
+++ b/host/lib/rfnoc/ddc_block_control.cpp
@@ -126,8 +126,7 @@ public:
uhd::freq_range_t get_frequency_range(const size_t chan) const override
{
- const double input_rate =
- _samp_rate_in.at(chan).is_valid() ? _samp_rate_in.at(chan).get() : 1.0;
+ const double input_rate = get_input_rate(chan);
// TODO add steps
return uhd::freq_range_t(-input_rate / 2, input_rate / 2);
}
diff --git a/host/lib/rfnoc/duc_block_control.cpp b/host/lib/rfnoc/duc_block_control.cpp
index 12937ac21..674e9d309 100644
--- a/host/lib/rfnoc/duc_block_control.cpp
+++ b/host/lib/rfnoc/duc_block_control.cpp
@@ -123,10 +123,9 @@ public:
uhd::freq_range_t get_frequency_range(const size_t chan) const override
{
- const double input_rate =
- _samp_rate_in.at(chan).is_valid() ? _samp_rate_in.at(chan).get() : 1.0;
+ const double output_rate = get_output_rate(chan);
// TODO add steps
- return uhd::freq_range_t(-input_rate / 2, input_rate / 2);
+ return uhd::freq_range_t(-output_rate / 2, output_rate / 2);
}
double get_input_rate(const size_t chan) const override
@@ -241,7 +240,7 @@ private:
* Add resolvers
*********************************************************************/
// Resolver for _interp: this gets executed when the user directly
- // modifies interp. the desired behaviour is to coerce it first, then
+ // modifies 'interp'. The desired behaviour is to coerce it first, then
// keep the output rate constant, and re-calculate the input rate.
add_property_resolver({interp, scaling_in},
{interp, samp_rate_out, samp_rate_in, scaling_in},