Skip to content

Commit 9424dca

Browse files
author
Leonid Fedorenchik
committed
pymycobot630: Clear encoder error only if actually have encoder error
1 parent 36883d8 commit 9424dca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pymycobot/mycobotpro630.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,9 @@ def start_robot(self, power_on_only=False):
744744
return False
745745

746746
for i in range(6):
747-
self._servo_init_can_output(Joint(i))
748-
self._servo_clear_encoder_error(Joint(i))
747+
if self.get_joint_error_mask(Joint(i)) & (1 << 16):
748+
self._servo_init_can_output(Joint(i))
749+
self._servo_clear_encoder_error(Joint(i))
749750

750751
os.system("halcmd setp or2.0.in1 1")
751752
return True

0 commit comments

Comments
 (0)