MLZ: enable the 'setposition' commands in entangle
The command 'setposition' wasn't sane declared so the use of one of the devices using this command lead always to a ProgrammingError during the 'describe' command via the server interface. Change-Id: I34a6b07e8f0fbd861496515a5e18d3181ad134d5 Reviewed-on: https://forge.frm2.tum.de/review/17715 Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Tested-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
parent
b49dcf0fa8
commit
b96bae8e6b
@ -397,6 +397,13 @@ class Sensor(AnalogInput):
|
|||||||
# note: we don't transport the formula to secop....
|
# note: we don't transport the formula to secop....
|
||||||
# we support the adjust method
|
# we support the adjust method
|
||||||
|
|
||||||
|
CMDS = {
|
||||||
|
'setposition' : CMD('Set the position to the given value.',
|
||||||
|
arguments=[FloatRange()],
|
||||||
|
result=None
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
def do_setposition(self, value):
|
def do_setposition(self, value):
|
||||||
self._dev.Adjust(value)
|
self._dev.Adjust(value)
|
||||||
|
|
||||||
@ -580,6 +587,13 @@ class Actuator(AnalogOutput):
|
|||||||
poll=30),
|
poll=30),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CMDS = {
|
||||||
|
'setposition' : CMD('Set the position to the given value.',
|
||||||
|
arguments=[FloatRange()],
|
||||||
|
result=None
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
def read_speed(self, maxage=0):
|
def read_speed(self, maxage=0):
|
||||||
return self._dev.speed
|
return self._dev.speed
|
||||||
|
|
||||||
@ -593,8 +607,8 @@ class Actuator(AnalogOutput):
|
|||||||
self.write_speed(value / 60.)
|
self.write_speed(value / 60.)
|
||||||
return self.read_speed(0) * 60
|
return self.read_speed(0) * 60
|
||||||
|
|
||||||
# def do_setposition(self, value=FloatRange()):
|
def do_setposition(self, value=FloatRange()):
|
||||||
# self._dev.Adjust(value)
|
self._dev.Adjust(value)
|
||||||
|
|
||||||
|
|
||||||
class Motor(Actuator):
|
class Motor(Actuator):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user