aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/zbx/zbx_expert.cpp
diff options
context:
space:
mode:
authorLane Kolbly <lane.kolbly@ni.com>2022-01-31 16:10:42 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2022-02-03 14:19:40 -0600
commitd2374c6ad67f94fa577d28d5660f32579f4775cc (patch)
tree5d18d4ae1ca9d5cd6720380d419a3888c64f4385 /host/lib/usrp/dboard/zbx/zbx_expert.cpp
parentc8849fadc8819f5dbfd2d5fd3ad010da8e102c7a (diff)
downloaduhd-d2374c6ad67f94fa577d28d5660f32579f4775cc.tar.gz
uhd-d2374c6ad67f94fa577d28d5660f32579f4775cc.tar.bz2
uhd-d2374c6ad67f94fa577d28d5660f32579f4775cc.zip
host: zbx: Expose tuning table on property tree
This allows viewing or, conceivably, customizing the tuning table that ZBX uses, depending on the particular needs of the end user.
Diffstat (limited to 'host/lib/usrp/dboard/zbx/zbx_expert.cpp')
-rw-r--r--host/lib/usrp/dboard/zbx/zbx_expert.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/host/lib/usrp/dboard/zbx/zbx_expert.cpp b/host/lib/usrp/dboard/zbx/zbx_expert.cpp
index ae39814ff..02b4873d9 100644
--- a/host/lib/usrp/dboard/zbx/zbx_expert.cpp
+++ b/host/lib/usrp/dboard/zbx/zbx_expert.cpp
@@ -28,11 +28,10 @@ bool _is_band_highband(const tune_map_item_t tune_setting)
return tune_setting.rf_fir == 0;
}
-tune_map_item_t _get_tune_settings(const double freq, const uhd::direction_t trx)
+tune_map_item_t _get_tune_settings(const double freq, const std::vector<tune_map_item_t>& tune_map)
{
- auto tune_setting = trx == RX_DIRECTION ? rx_tune_map.begin() : tx_tune_map.begin();
-
- auto tune_settings_end = trx == RX_DIRECTION ? rx_tune_map.end() : tx_tune_map.end();
+ auto tune_setting = tune_map.begin();
+ auto tune_settings_end = tune_map.end();
for (; tune_setting != tune_settings_end; ++tune_setting) {
if (tune_setting->max_band_freq >= freq) {
@@ -147,7 +146,7 @@ void zbx_scheduling_expert::resolve()
void zbx_freq_fe_expert::resolve()
{
const double tune_freq = ZBX_FREQ_RANGE.clip(_desired_frequency);
- _tune_settings = _get_tune_settings(tune_freq, _trx);
+ _tune_settings = _get_tune_settings(tune_freq, _tune_table.get());
// Set mixer values so the backend expert knows how to calculate final frequency
_mixer1_m = _tune_settings.mix1_m;