Commit e7b662d1 authored by Jens Krüger's avatar Jens Krüger Committed by Jens Krueger
Browse files

Devices/sim: implement 'MoveCont' command

Change-Id: I345a75ea1c3a7a56ef8a1c14f5d05db71fada56d
Reviewed-on: https://forge.frm2.tum.de/review/c/frm2/tango/entangle/+/26275

Tested-by: default avatarJenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: default avatarJens Krueger <jens.krueger@frm2.tum.de>
parent eabb7fd2
......@@ -32,7 +32,7 @@ from random import Random
from entangle import base
from entangle.core import OFF, ON, Prop, floatrange, listof, value_mapping
from entangle.core.errors import CommunicationFailure, NotSupported
from entangle.core.errors import CommunicationFailure
from entangle.lib.motor import LinearActuator
from entangle.lib.pycompat import bytes2str, list2bytes, str2bytes
from entangle.lib.ramp import RampGenMixin, RampGenPowerSupplyMixin
......@@ -165,7 +165,12 @@ class Motor(LinearActuator, RampGenMixin, base.Motor):
self._accel = value
def MoveCont(self, speed):
raise NotSupported('not supported')
if speed < 0:
self.write_speed(-speed)
self.write_value(self.absmin)
else:
self.write_speed(speed)
self.write_value(self.absmax)
def Reference(self):
self.raw_value = self.refpos
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment