Skip to content

Commit 11e7504

Browse files
committed
fix bug
1 parent d0e5d67 commit 11e7504

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pymycobot/Interface.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ def collision_switch(self, state):
10621062
Args:
10631063
state (int): 0 - close 1 - open (Off by default)
10641064
"""
1065-
return self._mesg(ProtocolCode.COLLISION_SWITCH, state)
1065+
return self._mesg(ProtocolCode.COLLISION_SWITCH, 0, state)
10661066

10671067
def is_collision_on(self):
10681068
"""Get collision detection status
@@ -1082,7 +1082,7 @@ def get_servo_speeds(self, id):
10821082
Return:
10831083
unit step/s
10841084
"""
1085-
return self._mesg(ProtocolCode.GET_SERVO_SPEED, id, has_reply=True)
1085+
return self._mesg(0xE7, id, has_reply=True)
10861086

10871087
def set_encoders_drag(self, id, encoders, speeds):
10881088
"""Send all potential values and speeds
@@ -1093,7 +1093,7 @@ def set_encoders_drag(self, id, encoders, speeds):
10931093
speeds: from get_servo_speeds()
10941094
10951095
"""
1096-
return self._mesg(ProtocolCode.JOG_INC_COORD, id, encoders, speeds)
1096+
return self._mesg(ProtocolCode.SET_ENCODERS_DRAG, id, encoders, speeds)
10971097

10981098

10991099
# def init_iic(self):

pymycobot/generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def is_controller_connected(self):
182182

183183
def read_next_error(self):
184184
"""Robot Error Detection"""
185-
return self._mesg(ProtocolCode.READ_NEXT_ERROR, 0, has_reply=True)
185+
return self._mesg(ProtocolCode.READ_NEXT_ERROR, has_reply=True)
186186

187187
def set_free_mode(self, flag):
188188
"""set to free mode

0 commit comments

Comments
 (0)