Skip to content

Commit 8ff1c72

Browse files
committed
modify send_coord for atom4.0
1 parent 233b5a6 commit 8ff1c72

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pymycobot/generate.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,8 @@ def send_coord(self, id, coord, speed):
218218
speed(int): 0 ~ 100
219219
"""
220220
check_datas(speed=speed)
221-
return self._mesg(
222-
Command.SEND_COORD, id - 1, [self._coord_to_int(coord)], speed
223-
)
221+
value = self._coord_to_int(coord) if id <= 3 else self._angle_to_int(coord)
222+
return self._mesg(Command.SEND_COORD, id, [value], speed)
224223

225224
def send_coords(self, coords, speed, mode):
226225
"""Send all coordinations.

0 commit comments

Comments
 (0)