Skip to content

Commit

Permalink
Ignore CMD POS REACHED impulse messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Feb 26, 2015
1 parent 2134c45 commit ac9eebf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions schunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,9 @@ def _send(self, command, data=b'', fmt=None, expected=None):
"""
with contextlib.closing(self._connection.open()) as gen:
response = gen.send(_data_frame(command, data))
if response[1] == 0x94:
# 2.2.3 CMD POS REACHED (0x94) is ignored
response = gen.send(None)
return _check_response(response, command, fmt, expected)

def _move_pos_helper(self, command, *args, **kwargs):
Expand Down Expand Up @@ -563,6 +566,9 @@ def _move_pos_helper(self, command, *args, **kwargs):
gen = self._connection.open()
try:
response = gen.send(_data_frame(command, data))
if response[1] == 0x94:
# 2.2.3 CMD POS REACHED (0x94) is ignored
response = gen.send(None)
response = _check_response(response, command)
if response == b'OK':
est_time = 0.0
Expand Down

0 comments on commit ac9eebf

Please sign in to comment.