diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-02-18 21:42:28 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-02-19 15:33:05 -0800 |
commit | 94bc1897c9e3027b270f1d8cb9f6b94eb3b1593f (patch) | |
tree | e77e671b566355c0f63bcf14a450e8eb5d3a8790 /mpm/python/usrp_mpm/dboard_manager/rhodium.py | |
parent | a7430369713aa53eeed462e928f0c99a69ae93d9 (diff) | |
download | uhd-94bc1897c9e3027b270f1d8cb9f6b94eb3b1593f.tar.gz uhd-94bc1897c9e3027b270f1d8cb9f6b94eb3b1593f.tar.bz2 uhd-94bc1897c9e3027b270f1d8cb9f6b94eb3b1593f.zip |
mpm: n320: Properly check for the LO distribution board
Without this patch, the N320 code will rely on an error to occur to
determine the non-existence of the N321 LO distribution board. While
this works, it forces an error message where there's no error. This will
first check for the existence of the board before trying to initialize
it.
Diffstat (limited to 'mpm/python/usrp_mpm/dboard_manager/rhodium.py')
-rw-r--r-- | mpm/python/usrp_mpm/dboard_manager/rhodium.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/rhodium.py b/mpm/python/usrp_mpm/dboard_manager/rhodium.py index 8e036aa81..f3dad4a92 100644 --- a/mpm/python/usrp_mpm/dboard_manager/rhodium.py +++ b/mpm/python/usrp_mpm/dboard_manager/rhodium.py @@ -246,13 +246,11 @@ class Rhodium(BfrfsEEPROM, DboardManagerBase): } self._port_expander = TCA6408(_get_i2c_dev()) self._daughterboard_gpio = FPGAtoDbGPIO(self.slot_idx) - # TODO: applying the overlay without checking for the presence of the - # LO dist board will create a kernel error. Fix this when the I2C API - # is implemented by checking if the board is present before applying. - try: + if FPGAtoLoDist.lo_dist_present(_get_i2c_dev()): + self.log.info("Enabling LO distribution board") self._lo_dist = FPGAtoLoDist(_get_i2c_dev()) - except RuntimeError: - self._lo_dist = None + else: + self.log.debug("No LO distribution board detected") self.log.debug("Turning on Module and RF power supplies") self._power_on() BfrfsEEPROM.__init__(self) |