diff options
| author | Martin Braun <martin.braun@ettus.com> | 2018-01-16 13:10:37 -0800 | 
|---|---|---|
| committer | Martin Braun <martin.braun@ettus.com> | 2018-01-16 13:10:37 -0800 | 
| commit | 0da3eefcc332fffea0b229a9d2bceeb1643e8ec3 (patch) | |
| tree | fa8bb0d78299df0a2579cdd400e9fe5541fa1bc5 /mpm/python | |
| parent | 3d2a9ac551f8e596bcc9d429c12b0cf571c8a9e5 (diff) | |
| download | uhd-0da3eefcc332fffea0b229a9d2bceeb1643e8ec3.tar.gz uhd-0da3eefcc332fffea0b229a9d2bceeb1643e8ec3.tar.bz2 uhd-0da3eefcc332fffea0b229a9d2bceeb1643e8ec3.zip | |
mpm/mpmd: Report device state using get_init_status() and verify
When trying to run init(), mpmd will first query the initialization
status of the MPM device. If it is found to be in a bad state, it will
not go forward with initialization, but instead print the error message.
Diffstat (limited to 'mpm/python')
| -rw-r--r-- | mpm/python/usrp_mpm/periph_manager/base.py | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py index 5b30bf1ec..93edb36ce 100644 --- a/mpm/python/usrp_mpm/periph_manager/base.py +++ b/mpm/python/usrp_mpm/periph_manager/base.py @@ -377,11 +377,17 @@ class PeriphManagerBase(object):          """          Returns the status of the device after its initialization (that happens          at startup, not that happens when init() is called). +        The status is a tuple of 2 strings, the first is either "true" or +        "false", depending on whether or not the device initialization was +        successful, and the second is an arbitrary error string.          Use this function to figure out if something went wrong at bootup, and          what.          """ -        return self._initialization_status +        return [ +            "true" if self._device_initialized else "false", +            self._initialization_status +        ]      @no_claim      def list_available_overlays(self): | 
