From d50e013646de654b5c82745eccbc6310be4bda5d Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Wed, 26 Sep 2018 10:27:52 -0700 Subject: n3xx: e320: fixing GPSDIface sensor names N3xx and E320 were registering GPSDIface names as get_*_sensor instead of just the sensor name. Fixing this to now register the sensor name. --- mpm/python/usrp_mpm/periph_manager/e320.py | 2 +- mpm/python/usrp_mpm/periph_manager/n3xx.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mpm/python') diff --git a/mpm/python/usrp_mpm/periph_manager/e320.py b/mpm/python/usrp_mpm/periph_manager/e320.py index 7c8cd6893..035df436f 100644 --- a/mpm/python/usrp_mpm/periph_manager/e320.py +++ b/mpm/python/usrp_mpm/periph_manager/e320.py @@ -305,7 +305,7 @@ class e320(ZynqComponents, PeriphManagerBase): for method_name in new_methods: try: # Extract the sensor name from the getter - sensor_name = re.search(r"get_.*_sensor", method_name).string + sensor_name = re.search(r"get_(.*)_sensor", method_name).group(1) # Register it with the MB sensor framework self.mboard_sensor_callback_map[sensor_name] = method_name self.log.trace("Adding %s sensor function", sensor_name) diff --git a/mpm/python/usrp_mpm/periph_manager/n3xx.py b/mpm/python/usrp_mpm/periph_manager/n3xx.py index 04014f5b2..2615284dd 100644 --- a/mpm/python/usrp_mpm/periph_manager/n3xx.py +++ b/mpm/python/usrp_mpm/periph_manager/n3xx.py @@ -351,7 +351,7 @@ class n3xx(ZynqComponents, PeriphManagerBase): for method_name in new_methods: try: # Extract the sensor name from the getter - sensor_name = re.search(r"get_.*_sensor", method_name).string + sensor_name = re.search(r"get_(.*)_sensor", method_name).group(1) # Register it with the MB sensor framework self.mboard_sensor_callback_map[sensor_name] = method_name self.log.trace("Adding %s sensor function", sensor_name) -- cgit v1.2.3