summaryrefslogtreecommitdiffstats
path: root/gui/muxrc.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-07 18:19:48 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-07 18:19:48 +0200
commitf02e4b97c487c980bc823f467e078a966f747bee (patch)
tree8b4d84eed3df78560e50576c762420ff35e777b4 /gui/muxrc.py
parent77b399804d0b7f3bdabcf8c1adcd95beafd9c8ad (diff)
downloaddabmux-f02e4b97c487c980bc823f467e078a966f747bee.tar.gz
dabmux-f02e4b97c487c980bc823f467e078a966f747bee.tar.bz2
dabmux-f02e4b97c487c980bc823f467e078a966f747bee.zip
Add ability to change RC settings from gui
Diffstat (limited to 'gui/muxrc.py')
-rw-r--r--gui/muxrc.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/gui/muxrc.py b/gui/muxrc.py
index 7644ae4..3bda046 100644
--- a/gui/muxrc.py
+++ b/gui/muxrc.py
@@ -90,3 +90,15 @@ class MuxRemoteControl(object):
def get_modules(self):
return self.module_list
+ def get_param_value(self, module, param):
+ value = self.zRead([b'get', module, param])
+ if value[0] == b'fail':
+ raise ValueError("Error getting param: {}".format(value[1]))
+ else:
+ return value[0]
+
+ def set_param_value(self, module, param, value):
+ ret = self.zRead([b'set', module, param, value])
+ if ret[0] == b'fail':
+ raise ValueError("Error getting param: {}".format(ret[1]))
+