diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-03-08 10:17:52 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-03-09 11:54:53 -0800 |
commit | 7a8967e71e49efdc5938eea4a1e446fedcef6dd5 (patch) | |
tree | 3d465f3435c846386201fe0f926a021d4249a188 | |
parent | d7123f6e625711b4f689f7b23f1bc039f854fce1 (diff) | |
download | uhd-7a8967e71e49efdc5938eea4a1e446fedcef6dd5.tar.gz uhd-7a8967e71e49efdc5938eea4a1e446fedcef6dd5.tar.bz2 uhd-7a8967e71e49efdc5938eea4a1e446fedcef6dd5.zip |
mpm: n300: Warn when user tries to use external LOs
The N300-variant has no front-panel LO connectors, so we need to warn
ther user when trying to use them.
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/n3xx.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/n3xx.py b/mpm/python/usrp_mpm/periph_manager/n3xx.py index 0a532772d..ed75b1f51 100644 --- a/mpm/python/usrp_mpm/periph_manager/n3xx.py +++ b/mpm/python/usrp_mpm/periph_manager/n3xx.py @@ -682,6 +682,16 @@ class n3xx(PeriphManagerBase): self.set_clock_source(args.get("clock_source")) if "clock_source" in args or "time_source" in args: self.set_time_source(args.get("time_source", self.get_time_source())) + # Uh oh, some hard coded product-related info: The N300 has no LO + # source connectors on the front panel, so we assume that if this was + # selected, it was an artifact from N310-related code. The user gets + # a warning and the setting is reset to internal. + if self.mboard_info.get('product') == 'n300': + for lo_source in ('rx_lo_source', 'tx_lo_source'): + if lo_source in args and args.get(lo_source) != 'internal': + self.log.warning("The N300 variant does not support " + "external LOs! Setting to internal.") + args[lo_source] = 'internal' result = super(n3xx, self).init(args) for xport_mgr in itervalues(self._xport_mgrs): xport_mgr.init(args) |