aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/dboard/db_twinrx.cpp3
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_experts.cpp9
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_experts.hpp7
3 files changed, 19 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/db_twinrx.cpp b/host/lib/usrp/dboard/db_twinrx.cpp
index 258dc95a4..a7c57979d 100644
--- a/host/lib/usrp/dboard/db_twinrx.cpp
+++ b/host/lib/usrp/dboard/db_twinrx.cpp
@@ -195,6 +195,9 @@ public:
prepend_ch("enabled", _ch_name),
false,
AUTO_RESOLVE_ON_WRITE);
+ // ID for cal data lookup. This depends on how many channels are enabled
+ expert_factory::add_prop_node<std::string>(
+ _expert, get_rx_subtree(), "id", prepend_ch("id", _ch_name), "twinrx");
// Readback
get_rx_subtree()
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp b/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp
index 36bcc1863..d196d99e2 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_experts.cpp
@@ -459,6 +459,15 @@ void twinrx_antenna_expert::resolve()
throw uhd::value_error(
"Cannot calibrate channel 1 and export the LO for channel 0.");
}
+
+ // Set ID for power cal
+ if (_enabled_ch0 and _enabled_ch1) {
+ _id_ch0 = "twinrx2";
+ _id_ch1 = "twinrx2";
+ } else {
+ _id_ch0 = "twinrx";
+ _id_ch1 = "twinrx";
+ }
}
/*!---------------------------------------------------------
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp b/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
index c7e021a90..9d2269916 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
@@ -374,6 +374,8 @@ public:
, _lo_export_ch1(db, prepend_ch("los/all/export", "1"))
, _ant_mapping(db, "com/ant_mapping")
, _cal_mode(db, "com/cal_mode")
+ , _id_ch0(db, prepend_ch("id", "0"))
+ , _id_ch1(db, prepend_ch("id", "1"))
{
bind_accessor(_antenna_ch0);
bind_accessor(_antenna_ch1);
@@ -383,6 +385,8 @@ public:
bind_accessor(_lo_export_ch1);
bind_accessor(_ant_mapping);
bind_accessor(_cal_mode);
+ bind_accessor(_id_ch0);
+ bind_accessor(_id_ch1);
}
private:
@@ -398,6 +402,9 @@ private:
// Outputs
experts::data_writer_t<twinrx_ctrl::antenna_mapping_t> _ant_mapping;
experts::data_writer_t<twinrx_ctrl::cal_mode_t> _cal_mode;
+
+ experts::data_writer_t<std::string> _id_ch0;
+ experts::data_writer_t<std::string> _id_ch1;
};
/*!---------------------------------------------------------