From 54379a586a64d307b20a65ff3297f95688a082e6 Mon Sep 17 00:00:00 2001 From: Enrico Faulhaber Date: Tue, 12 Sep 2017 18:32:09 +0200 Subject: [PATCH] remove unneeded commands Change-Id: I2b3a343a117fced0195f23c3051902c1387e6bcc --- secop/datatypes.py | 1 + secop/modules.py | 16 ---------------- secop_demo/modules.py | 3 +++ 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/secop/datatypes.py b/secop/datatypes.py index d9cee0e..94c6adc 100644 --- a/secop/datatypes.py +++ b/secop/datatypes.py @@ -480,6 +480,7 @@ class StructOf(DataType): return self.validate(dict(value)) +# idea to mix commands and params, not yet used.... class Command(DataType): IS_COMMAND = True diff --git a/secop/modules.py b/secop/modules.py index 2ffdabf..7dcd3a1 100644 --- a/secop/modules.py +++ b/secop/modules.py @@ -503,19 +503,3 @@ class Drivable(Readable): } # XXX: CMDS ???? auto deriving working well enough? - def do_start(self): - """normally does nothing, - - but there may be modules which _start_ the action here - """ - - def do_stop(self): - """Testing command implementation - - wait a second""" - time.sleep(1) # for testing ! - - def do_pause(self): - """if implemented should pause the module - use start to continue movement - """ diff --git a/secop_demo/modules.py b/secop_demo/modules.py index 9ac2124..dee5727 100644 --- a/secop_demo/modules.py +++ b/secop_demo/modules.py @@ -177,6 +177,9 @@ class MagneticField(Drivable): time.sleep(max(0.01, ts + loopdelay - time.time())) self.log.error(self, 'main thread exited unexpectedly!') + def do_stop(self): + self.write_target(self.read_value()) + class CoilTemp(Readable): """a coil temperature