aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/periph_manager/base.py
diff options
context:
space:
mode:
authorBrent Stapleton <brent.stapleton@ettus.com>2017-11-29 17:05:41 -0800
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:05:58 -0800
commit0bf22a3e57dab4af3bfc66dbae999d3d9d11341b (patch)
treefd8af6de9c1578124f8cbd5d8c21052786d24913 /mpm/python/usrp_mpm/periph_manager/base.py
parent3cff6298cea5f3699aa5db5921cd6933f557a034 (diff)
downloaduhd-0bf22a3e57dab4af3bfc66dbae999d3d9d11341b.tar.gz
uhd-0bf22a3e57dab4af3bfc66dbae999d3d9d11341b.tar.bz2
uhd-0bf22a3e57dab4af3bfc66dbae999d3d9d11341b.zip
mpm: UIOs now open only when necessary
Refactoring to use the C++-based UIO objects. The Liberio and Ethernet objects now open the UIO before using it, and close it once done. Reviewed-By: Martin Braun <martin.braun@ettus.com>
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/base.py')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py
index c73ba6ef4..28b1656e4 100644
--- a/mpm/python/usrp_mpm/periph_manager/base.py
+++ b/mpm/python/usrp_mpm/periph_manager/base.py
@@ -22,6 +22,7 @@ from __future__ import print_function
import os
from hashlib import md5
from concurrent import futures
+from time import sleep
from builtins import str
from builtins import range
from builtins import object
@@ -226,6 +227,9 @@ class PeriphManagerBase(object):
))
for overlay in requested_overlays:
dtoverlay.apply_overlay_safe(overlay)
+ # Need to wait here a second to make sure the ethernet interfaces are up
+ # TODO: Fine-tune this number, or wait for some smarter signal.
+ sleep(1)
def _init_dboards(self, override_dboard_pids=None):