From 7a8967e71e49efdc5938eea4a1e446fedcef6dd5 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 8 Mar 2018 10:17:52 -0800 Subject: 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. --- mpm/python/usrp_mpm/periph_manager/n3xx.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mpm') 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) -- cgit v1.2.3