summaryrefslogtreecommitdiffstats
path: root/gui/run.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-11-28 11:11:22 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-11-28 11:11:22 +0100
commitcfa9461f269e616d6d54658d583b37d215f35a7b (patch)
treebc56977f6479c297521dff9564ba6ecbffe00a52 /gui/run.py
parentee435c029eac59e0399dc3ae765cc74d66b9442e (diff)
downloaddabmod-cfa9461f269e616d6d54658d583b37d215f35a7b.tar.gz
dabmod-cfa9461f269e616d6d54658d583b37d215f35a7b.tar.bz2
dabmod-cfa9461f269e616d6d54658d583b37d215f35a7b.zip
GUI: Add part of calibration routine
Diffstat (limited to 'gui/run.py')
-rwxr-xr-xgui/run.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gui/run.py b/gui/run.py
index b4af742..dea3222 100755
--- a/gui/run.py
+++ b/gui/run.py
@@ -82,13 +82,18 @@ class DPDPlugin(plugins.SimplePlugin):
def start(self):
self.bus.subscribe("dpd-capture", self.trigger_capture)
+ self.bus.subscribe("dpd-calibrate", self.trigger_calibrate)
def stop(self):
self.bus.unsubscribe("dpd-capture", self.trigger_capture)
+ self.bus.unsubscribe("dpd-calibrate", self.trigger_calibrate)
def trigger_capture(self, param):
print("trigger_capture({})".format(param))
+ def trigger_calibrate(self, param):
+ cherrypy.engine.publish('dpd-calibration-result', self.dpd.capture_calibration())
+
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='ODR-DabMod Web GUI')
parser.add_argument('-c', '--config',