fixes to make pylint happy
Change-Id: I95baf4e585603a640d4ec71076a4d509082775ed
This commit is contained in:
@ -34,13 +34,11 @@ class PhytronIO(StringIO):
|
||||
timeout = 0.5
|
||||
identification = [('0IVR', 'MCC Minilog .*')]
|
||||
|
||||
def communicate(self, command, expect_response=True):
|
||||
def communicate(self, command):
|
||||
for ntry in range(5, 0, -1):
|
||||
try:
|
||||
_, _, reply = super().communicate('\x02' + command).partition('\x02')
|
||||
if reply[0] == '\x06': # ACK
|
||||
if len(reply) == 1 and expect_response:
|
||||
raise CommunicationFailedError('empty response')
|
||||
break
|
||||
raise CommunicationFailedError('missing ACK %r' % reply)
|
||||
except Exception as e:
|
||||
@ -77,7 +75,7 @@ class Motor(PersistentMixin, HasIO, Drivable):
|
||||
_backlash_pending = False
|
||||
_mismatch_count = 0
|
||||
_rawlimits = None
|
||||
_step_size = None
|
||||
_step_size = None # degree / step
|
||||
|
||||
def earlyInit(self):
|
||||
super().earlyInit()
|
||||
@ -92,7 +90,7 @@ class Motor(PersistentMixin, HasIO, Drivable):
|
||||
return self.communicate('\x02%x%s%s' % (self.address, self.axis, cmd))
|
||||
|
||||
def set(self, cmd, value):
|
||||
self.communicate('\x02%x%s%s%g' % (self.address, self.axis, cmd, value), False)
|
||||
self.communicate('\x02%x%s%s%g' % (self.address, self.axis, cmd, value))
|
||||
|
||||
def set_get(self, cmd, value, query):
|
||||
self.set(cmd, value)
|
||||
|
Reference in New Issue
Block a user