diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-12-01 10:15:14 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-01-10 08:02:41 -0600 |
commit | edf16b3a85507064d42da2021d5eaea4002f7912 (patch) | |
tree | 7bd37e229da275602f0d0e72a4670ad13a9366c8 /mpm/python | |
parent | 716ed77f7f65d83635a95815c8508ac49f013ad6 (diff) | |
download | uhd-edf16b3a85507064d42da2021d5eaea4002f7912.tar.gz uhd-edf16b3a85507064d42da2021d5eaea4002f7912.tar.bz2 uhd-edf16b3a85507064d42da2021d5eaea4002f7912.zip |
e31x/e320: Amend LO-locked sensor names
In UHD 3, we had two sensors names for LO lock on these devices:
lo_lock, and lo_locked. The latter is the more standard, and is checked
in examples like rx_samples_to_file.
In UHD 4, the latter was removed without comment. This adds the sensor
back again and also updates the documentation accordingly.
Diffstat (limited to 'mpm/python')
-rw-r--r-- | mpm/python/usrp_mpm/dboard_manager/e31x_db.py | 9 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/dboard_manager/neon.py | 17 |
2 files changed, 20 insertions, 6 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/e31x_db.py b/mpm/python/usrp_mpm/dboard_manager/e31x_db.py index 8c38fa652..861264e88 100644 --- a/mpm/python/usrp_mpm/dboard_manager/e31x_db.py +++ b/mpm/python/usrp_mpm/dboard_manager/e31x_db.py @@ -34,10 +34,17 @@ class E31x_db(DboardManagerBase): rx_sensor_callback_map = { 'ad9361_temperature': 'get_catalina_temp_sensor', 'rssi' : 'get_rssi_sensor', + # For backward compatibility reasons we have the same sensor with two + # different names 'lo_lock' : 'get_lo_lock_sensor', + 'lo_locked' : 'get_lo_lock_sensor', } tx_sensor_callback_map = { 'ad9361_temperature': 'get_catalina_temp_sensor', + # For backward compatibility reasons we have the same sensor with two + # different names + 'lo_lock' : 'get_lo_lock_sensor', + 'lo_locked' : 'get_lo_lock_sensor', } # Maps the chipselects to the corresponding devices: spi_chipselect = {"catalina": 0} @@ -154,7 +161,7 @@ class E31x_db(DboardManagerBase): MboardRegsControl(self.mboard_regs_label, self.log) if which == "tx": return mboard_regs_control.get_ad9361_tx_lo_lock() - elif which == "rx": + if which == "rx": return mboard_regs_control.get_ad9361_rx_lo_lock() self.log.warning("get_ad9361_lo_lock(): Invalid which param `{}'" .format(which)) diff --git a/mpm/python/usrp_mpm/dboard_manager/neon.py b/mpm/python/usrp_mpm/dboard_manager/neon.py index 7f9abd5ce..88839bd06 100644 --- a/mpm/python/usrp_mpm/dboard_manager/neon.py +++ b/mpm/python/usrp_mpm/dboard_manager/neon.py @@ -36,10 +36,17 @@ class Neon(DboardManagerBase): rx_sensor_callback_map = { 'ad9361_temperature': 'get_catalina_temp_sensor', 'rssi' : 'get_rssi_sensor', + # For backward compatibility reasons we have the same sensor with two + # different names 'lo_lock' : 'get_lo_lock_sensor', + 'lo_locked' : 'get_lo_lock_sensor', } tx_sensor_callback_map = { 'ad9361_temperature': 'get_catalina_temp_sensor', + # For backward compatibility reasons we have the same sensor with two + # different names + 'lo_lock' : 'get_lo_lock_sensor', + 'lo_locked' : 'get_lo_lock_sensor', } # Maps the chipselects to the corresponding devices: spi_chipselect = {"catalina": 0, @@ -266,13 +273,13 @@ class Neon(DboardManagerBase): Return LO lock status (Boolean!) of AD9361. 'which' must be either 'tx' or 'rx' """ - self.mboard_regs_label = "mboard-regs" - self.mboard_regs_control = MboardRegsControl( - self.mboard_regs_label, self.log) + mboard_regs_label = "mboard-regs" + mboard_regs_control = MboardRegsControl( + mboard_regs_label, self.log) if which == "tx": - locked = self. mboard_regs_control.get_ad9361_tx_lo_lock() + locked = mboard_regs_control.get_ad9361_tx_lo_lock() elif which == "rx": - locked = self. mboard_regs_control.get_ad9361_rx_lo_lock() + locked = mboard_regs_control.get_ad9361_rx_lo_lock() else: locked = False return locked |