From 0bf22a3e57dab4af3bfc66dbae999d3d9d11341b Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Wed, 29 Nov 2017 17:05:41 -0800 Subject: 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 --- mpm/python/usrp_mpm/periph_manager/base.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mpm/python/usrp_mpm/periph_manager/base.py') 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): -- cgit v1.2.3