diff options
Diffstat (limited to 'mpm/python/usrp_mpm')
-rw-r--r-- | mpm/python/usrp_mpm/mpmutils.py | 2 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/n310.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/mpm/python/usrp_mpm/mpmutils.py b/mpm/python/usrp_mpm/mpmutils.py index 49d6cb39d..08eb54798 100644 --- a/mpm/python/usrp_mpm/mpmutils.py +++ b/mpm/python/usrp_mpm/mpmutils.py @@ -140,3 +140,5 @@ def assert_compat_number( raise RuntimeError(err_msg) return +def str2bool(value): + return value.lower() in ("yes", "true", "t", "1") diff --git a/mpm/python/usrp_mpm/periph_manager/n310.py b/mpm/python/usrp_mpm/periph_manager/n310.py index 417b88d30..daa53f4ef 100644 --- a/mpm/python/usrp_mpm/periph_manager/n310.py +++ b/mpm/python/usrp_mpm/periph_manager/n310.py @@ -21,7 +21,7 @@ from builtins import object from usrp_mpm.gpsd_iface import GPSDIface from usrp_mpm.periph_manager import PeriphManagerBase from usrp_mpm.mpmtypes import SID -from usrp_mpm.mpmutils import assert_compat_number +from usrp_mpm.mpmutils import assert_compat_number, str2bool from usrp_mpm.rpc_server import no_rpc from usrp_mpm.sys_utils import dtoverlay from usrp_mpm.sys_utils.sysfs_gpio import SysFSGPIO, GPIOBank @@ -537,12 +537,12 @@ class n310(PeriphManagerBase): self._gpios.set("PWREN-CLK-MGT156MHz") self.enable_1g_ref_clock() self.enable_gps( - enable=bool( + enable=str2bool( args.default_args.get('enable_gps', N3XX_DEFAULT_ENABLE_GPS) ) ) self.enable_fp_gpio( - enable=bool( + enable=str2bool( args.default_args.get( 'enable_fp_gpio', N3XX_DEFAULT_ENABLE_FPGPIO |